Skip to content

Add repository checkout to CompatHelper workflow to prevent duplicate PRs#449

Merged
Oddan merged 2 commits intomainfrom
copilot/fix-duplicate-prs-in-workflow
Feb 13, 2026
Merged

Add repository checkout to CompatHelper workflow to prevent duplicate PRs#449
Oddan merged 2 commits intomainfrom
copilot/fix-duplicate-prs-in-workflow

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

CompatHelper is creating duplicate PRs daily because it cannot detect existing compathelper/* branches without a repository checkout. Without access to the repo state, each cron run opens new PRs for the same compat updates (currently up to PR #448+).

Changes

  • Added actions/checkout@v4 as the first workflow step
steps:
  - name: Check out repository
    uses: actions/checkout@v4
  - name: Pkg.add("CompatHelper")
    run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
  - name: CompatHelper.main()
    # ... rest unchanged

This allows CompatHelper to inspect existing branches and skip opening duplicate PRs.

Original prompt

Problem

The CompatHelper GitHub Actions workflow is creating duplicate PRs every single day for the same package compat updates. For example, the same set of ~19 compat updates (DifferentialEquations, Jutul, JutulDarcy, SpecialFunctions, Roots, Literate, Interpolations, etc.) are being opened as new PRs on every cron run, leading to hundreds of duplicate PRs (currently up to PR #448+).

Root Cause

The workflow at .github/workflows/CompatHelper.yml is missing a repository checkout step. Without checking out the repo, CompatHelper cannot inspect existing branches (named like compathelper/...) to detect that a PR for the same compat update is already open, causing it to create duplicates every run.

Current workflow

name: CompatHelper
on:
  schedule:
    - cron: 0 0 * * *
  workflow_dispatch:
jobs:
  CompatHelper:
    runs-on: ubuntu-latest
    steps:
      - name: Pkg.add("CompatHelper")
        run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
      - name: CompatHelper.main()
        env:
          GITHUB_TOKEN: ${{ secrets.CompatHelperTokenPrivateRepos }}
          COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
        run: julia -e 'using CompatHelper; CompatHelper.main()'

Required Fix

Add an actions/checkout@v4 step before the CompatHelper steps so the tool can detect existing branches and open PRs:

name: CompatHelper
on:
  schedule:
    - cron: 0 0 * * *
  workflow_dispatch:
jobs:
  CompatHelper:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4
      - name: Pkg.add("CompatHelper")
        run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
      - name: CompatHelper.main()
        env:
          GITHUB_TOKEN: ${{ secrets.CompatHelperTokenPrivateRepos }}
          COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
        run: julia -e 'using CompatHelper; CompatHelper.main()'

The only change needed is adding the actions/checkout@v4 step as the first step in the job.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Oddan <1742010+Oddan@users.noreply.github.com>
@Oddan Oddan marked this pull request as ready for review February 13, 2026 22:44
Copilot AI changed the title [WIP] Fix duplicate PRs in CompatHelper GitHub Actions workflow Add repository checkout to CompatHelper workflow to prevent duplicate PRs Feb 13, 2026
Copilot AI requested a review from Oddan February 13, 2026 22:45
@Oddan Oddan merged commit f962e98 into main Feb 13, 2026
1 check passed
@Oddan Oddan deleted the copilot/fix-duplicate-prs-in-workflow branch February 13, 2026 22:45
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