Skip to content

fix: CompatHelper PRs made with BOT_PAT were never recognised as bot PRs - #30

Merged
sotashimozono merged 1 commit into
mainfrom
compathelper-dedupe
Sep 28, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
compathelper-dedupe

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

With BOT_PAT, a CompatHelper PR is authored by the PAT's owner (a User). Three reusable workflows assumed a bot author:

Workflow Assumed Effect
compathelper.yml CompatHelper counts only PRs by github-actions[bot] as duplicates Every run reopened the same PR (15 copies on DataVault.jl, #59–#73)
automerge.yml user.type == 'Bot' CompatHelper PRs were never auto-merged
version-check.yml user.type == 'Bot' exempts from the version bump CompatHelper PRs always failed check-version

Fix

  • compathelper.yml: pass the token's own login (gh api user) as CompatHelper.GitHubActions(; username). Under GITHUB_TOKEN, /user fails and the default is kept.
  • automerge.yml / version-check.yml: also treat a PR from a compathelper/ or dependabot/ branch in the same repository as a dependency PR. The head.repo check keeps forks out. The user.type == 'Bot' path is unchanged.

Checked locally

  • CompatHelper's my_prs on a PR by sotashimozono: false with the default username, true with the passed login.
  • The version-check branch logic on four cases (CompatHelper same repo → exempt; CompatHelper from a fork → checked; feature branch → checked; Bot → exempt).
  • YAML parses.

Takes effect on the next scheduled CompatHelper run (every 4h). DataVault.jl's Artifacts false positive is fixed separately in QAtlasHub/DataVault.jl#74, which should merge first: once this lands, that proposal would otherwise auto-merge.

🤖 Generated with Claude Code

With BOT_PAT a CompatHelper PR is authored by the PAT's owner, a User.
Three checks assumed otherwise:

- CompatHelper's duplicate check counts only PRs by github-actions[bot],
  so every scheduled run reopened the same PR (15 copies on DataVault.jl).
  Pass the token's own login as `username`.
- automerge and version-check keyed on user.type == 'Bot', so these PRs
  were never auto-merged and always failed check-version. Recognise them
  by a compathelper/ or dependabot/ branch in the same repository too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit 198dd53 into main Sep 28, 2026
1 check passed
@sotashimozono
sotashimozono deleted the compathelper-dedupe branch September 28, 2026 15:29
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.

1 participant