Skip to content

[ci] don't let vouch auto-close a pr re-opened by a maintainer.#880

Merged
sayakpaul merged 3 commits into
mainfrom
vouch-modification
May 19, 2026
Merged

[ci] don't let vouch auto-close a pr re-opened by a maintainer.#880
sayakpaul merged 3 commits into
mainfrom
vouch-modification

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

No description provided.

@sayakpaul sayakpaul requested review from danieldk and drbh as code owners May 19, 2026 06:04
steps:
- uses: mitchellh/vouch/action/check-pr@c6d80ead49839655b61b422700b7a3bc9d0804a9 # v1.4.2
- name: Check if reopened by a maintainer
id: maintainer
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, currently we use:

  pull_request_target:
    types: [opened, reopened]

Can an unprivileged user re-open a PR? If not, I think we can achieve the same by removing reopened above?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but I think the PR author themselves can reopen their own PR even without write access (per GitHub's permission model — anyone who opens a PR can close/reopen it). So if we drop reopened, an unvouched author could reopen the auto-closed PR and it would stay open without re-triggering the check.

That said, if that's an acceptable trade-off (closing once on opened is enough as a signal), removing reopened would indeed be the simpler fix.

LMK which route you would prefer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's annoying, let's do it as in your PR then.

@sayakpaul sayakpaul merged commit 9b0cb84 into main May 19, 2026
4 checks passed
@sayakpaul sayakpaul deleted the vouch-modification branch May 19, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants