Skip to content

Add Copilot auto-fix workflow for dependabot PRs#19508

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/add-github-action-fix-tests
Open

Add Copilot auto-fix workflow for dependabot PRs#19508
Copilot wants to merge 1 commit into
mainfrom
copilot/add-github-action-fix-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

Dependabot PRs that break tests or land with merge conflicts require manual intervention. This workflow automates prompting GitHub Copilot to handle both cases.

What's added

.github/workflows/copilot-auto-fix.yml — two jobs:

  • fix-failing-tests — fires on workflow_run completion (Build, failure) for any dependabot/* branch. Resolves the associated open PR, deduplicates by scanning existing comments for the run ID, then posts a @copilot comment with repo-specific guidance:

    • Baseline regeneration (dotnet test -- --filter TestCategory=Baseline --test-parameter SetBaseLine=true)
    • Unit/integration test failure triage
    • npm/TypeScript compatibility checks for vscode-bicep / vscode-bicep-ui
  • fix-merge-conflicts — fires on pull_request events from dependabot[bot]. Polls mergeStateStatus (10 s intervals, up to ~100 s) until GitHub resolves mergeability, then posts a @copilot comment on DIRTY PRs asking it to resolve conflicts while preserving dependabot's version bumps. Deduplicates to avoid repeat comments on re-sync.

Microsoft Reviewers: Open in CodeFlow

Agent-Logs-Url: https://github.com/Azure/bicep/sessions/c3bf4e81-3452-4699-a931-6fb97149e548

Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Test this change out locally with the following install scripts (Action run 24867668643)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 24867668643
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 24867668643"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 24867668643
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 24867668643"

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants