Skip to content

ci: label PRs with reviewed/wait-merge when auto-merge is enabled - #39120

Draft
bircni wants to merge 1 commit into
go-gitea:mainfrom
bircni:ci/automerge-wait-merge-label
Draft

ci: label PRs with reviewed/wait-merge when auto-merge is enabled#39120
bircni wants to merge 1 commit into
go-gitea:mainfrom
bircni:ci/automerge-wait-merge-label

Conversation

@bircni

@bircni bircni commented Aug 25, 2026

Copy link
Copy Markdown
Member

GitHub emits auto_merge_enabled and auto_merge_disabled activity types on
pull_request, so reviewed/wait-merge can follow the auto-merge state
instead of being applied by hand.

pull_request_target is needed to write labels on fork PRs; the job only calls
the label API and never checks out PR-head code.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 25, 2026
@github-actions github-actions Bot added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Aug 25, 2026
@bircni
bircni enabled auto-merge (squash) August 25, 2026 18:40
@bircni
bircni disabled auto-merge August 25, 2026 18:40
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 25, 2026
@silverwind

Copy link
Copy Markdown
Member

Why not merge it into pull-labeler typescript?

@wxiaoguang

wxiaoguang commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Maybe it could be smarter: only mark one PR with "wait-merge", or only merge one PR in "auto merge" status with main branch.

Otherwise, if there are 5 PRs in "auto merge" status, you will trigger 5+4+3+2+1 times CI runs.

@wxiaoguang
wxiaoguang marked this pull request as draft August 26, 2026 02:44
@silverwind

silverwind commented Aug 26, 2026

Copy link
Copy Markdown
Member

Maybe it could be smarter: only mark one PR with "wait-merge", or only merge one PR in "auto merge" status with main branch.

GitHub has exactly this feature called "merge queue", if we enable it we don't even need reviewed/wait-merge labels or that bot mechanism.

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue

@bircni

bircni commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Maybe it could be smarter: only mark one PR with "wait-merge", or only merge one PR in "auto merge" status with main branch.

GitHub has exactly this feature called "merge queue", if we enable it we don't even need reviewed/wait-merge labels or that bot mechanism.

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue

good idea

@silverwind

silverwind commented Aug 26, 2026

Copy link
Copy Markdown
Member

Will be good if we test that, should later implement this in Gitea too and fix #36392.

@bircni

bircni commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Will be good if we test that, should later implement this in Gitea too and fix #36392.

Reminds me that I have a branch for that somewhere 😂🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants