Skip to content

feat: add reusable dependabot-auto-merge workflow - #6

Merged
dwisiswant0 merged 1 commit into
mainfrom
dwisiswant0/feat/add-reusable-dependabot-auto-merge-workflow
Nov 20, 2026
Merged

dwisiswant0 merged 1 commit into
mainfrom
dwisiswant0/feat/add-reusable-dependabot-auto-merge-workflow

Conversation

@dwisiswant0

Copy link
Copy Markdown
Member

12 repos check Dependabot pull requests in one workflow and merge them
from a second workflow that starts when the first completes. The merge
acts on the pull request's head at that moment, not on the commit the
checks ran on, and the 8 copies that still merge never check where the
pull request came from.

The workflow checks the head commit of a pull request that Dependabot
opened from a branch of this repository, then merges it directly with
pr/merge's match-head-commit set to that commit. It skips GitHub
auto-merge, which doesn't keep the expected head, and stops before
approving once a push has moved the head. A maintainer's push to the
branch is checked but left for a manual merge. The check job can't
push, so a go mod tidy fix from compat-checks fails the run instead of
landing unchecked. Checks in other workflows block the merge only when
they are required, and then the merge fails instead of waiting.

This needs the match-head-commit input from projectdiscovery/actions.
A pr/merge@v1 without it drops the input with only a warning and
merges whatever the head is, so this must land after the input reaches
v1.

Closes: #3
Refs: projectdiscovery/actions#122

12 repos check Dependabot pull requests in one workflow and merge them
from a second workflow that starts when the first completes. The merge
acts on the pull request's head at that moment, not on the commit the
checks ran on, and the 8 copies that still merge never check where the
pull request came from.

The workflow checks the head commit of a pull request that Dependabot
opened from a branch of this repository, then merges it directly with
pr/merge's match-head-commit set to that commit. It skips GitHub
auto-merge, which doesn't keep the expected head, and stops before
approving once a push has moved the head. A maintainer's push to the
branch is checked but left for a manual merge. The check job can't
push, so a go mod tidy fix from compat-checks fails the run instead of
landing unchecked. Checks in other workflows block the merge only when
they are required, and then the merge fails instead of waiting.

This needs the match-head-commit input from projectdiscovery/actions.
A pr/merge@v1 without it drops the input with only a warning and
merges whatever the head is, so this must land after the input reaches
v1.

Closes: #3
Refs: projectdiscovery/actions#122
Signed-off-by: Dwi Siswanto <[email protected]>
@dwisiswant0
dwisiswant0 merged commit 16ba552 into main Nov 20, 2026
@dwisiswant0
dwisiswant0 deleted the dwisiswant0/feat/add-reusable-dependabot-auto-merge-workflow branch November 20, 2026 06:46
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.

Add reusable dependabot-auto-merge workflow that merges only the commit that passed checks

1 participant