Commit graph

4 commits

Author SHA1 Message Date
Vault Automation
0a163f449e
[VAULT-40165] pipeline(github): add check go-mod-diff command (#10369) (#10377)
* [VAULT-40165] pipeline(github): add `check go-mod-diff` command

Add `pipeline github check go-mod-diff` command that is capable of
creating a Go module diff between one-or-more go.mod files in two
different Github branches. There are flags for the owner, repo, and
branch for both the A and B sides of the diff, as well as the `--path`
or `-p` flag that can be specified any number of times with relative
paths in the repository of go.mod files to compare. We assume that the
path is the same in both repositories.

This work will be followed up with another PR that removes the
enterprise only go.mod file and enables Go module diff checking on pull
requests to CE branches that change the go toolchain.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-27 20:03:36 +00:00
Vault Automation
0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* license: update headers to IBM Corp.
* `make proto`
* update offset because source file changed

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-21 15:20:20 -06:00
Vault Automation
e781da5a29
[VAULT-39424] pipeline(close-origin-pr): add support for closing the origin of copied PRs (#9907) (#10029)
* [VAULT-39424] pipeline(close-origin-pr): add support for closing the origin of copied PRs

When we copy a community contributed Pull Request to Enterprise the
source PR is effectively orphaned, leaving the original PR still
opened, the author unsure of what state the copied PR is in, and any
issues associated with it open.

When the copied PR is closed we ought to close the origin PR if it's
still open, and any other issues that might be associated with either
the origin PR or the copied PR.

We can also add comments to both PRs that include links to each other
and the squash commit to make discovery of the work visible to those
with access to both repos. Unfortunately there is no way to know what
the SHA will be when it's synced so we have to rely on the
'Co-Authored-By:' trailers in commit message.

There are some challenges to this:
  - The automation should only execute when copied PRs are closed
  - How to determine the origin PR from only the copied PR
  - How to determine the PR's linked issues (which the v3 REST API does not expose)

We solved them by:
  - Requiring the PR HEAD ref to start with `copy/`
  - Encoding the origin PR information in the PR HEAD ref.
    e.g. `copy/hashicorp/vault/31580/ryan/VAULT-39424-test-ce`
  - Using the V4 GraphQL API to determine "closed issue references"

The result is a new `pipeline` CLI command that can close the origin PR,
all of the issues, and write status comments on each PR with links to
everything to establish omnidirectional linking in the Github UI.

```bash
pipeline github close origin-pull-request 9903
```



* fix feedback



---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-09 21:58:55 +00:00
Vault Automation
334683e5c9
[VAULT-39890] actions(copy-pr): enforce license/cla before triggering copy workflow (#9795) (#9919)
* [VAULT-39890] pipeline(github): add list commit-statuses command
* [VAULT-39890] pipeline(github): add check commit-status command
* [VAULT-39890] actions(copy-pr): enforce license/cla before triggering copy workflow

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-07 16:15:14 +00:00