Skip to content

fix: allow sync bot PRs through redirect workflow#578

Merged
brandom-msft merged 1 commit into
mainfrom
fix/redirect-allowlist-sync-bot
Mar 6, 2026
Merged

fix: allow sync bot PRs through redirect workflow#578
brandom-msft merged 1 commit into
mainfrom
fix/redirect-allowlist-sync-bot

Conversation

@brandom-msft
Copy link
Copy Markdown
Member

Problem

The nightly sync automation from foundry-samples-pr creates PRs using foundry-samples-repo-sync[bot], but the redirect workflow (added in #552) auto-closes all opened PRs. This breaks the sync pipeline — e.g., PR #576 was closed 10 seconds after creation.

Fix

Add a named bot allowlist to redirect-pull-requests.yml. PRs authored by foundry-samples-repo-sync[bot] are now skipped by the redirect workflow. The list is easily extensible for future bots.

Changes

  • .github/workflows/redirect-pull-requests.yml: Added allowedBots array check before the org membership/redirect logic.

Testing

After merge, trigger the sync workflow via workflow_dispatch on foundry-samples-pr and verify the resulting PR stays open.

⚠️ NOTE: This PR itself will be auto-closed by the redirect workflow (the very bug it fixes). An admin will need to re-open it for review/merge.

Fixes ADO#5063962

Add a named bot allowlist to the redirect-pull-requests workflow so
that PRs created by foundry-samples-repo-sync[bot] are not auto-closed.
The nightly sync from foundry-samples-pr needs these PRs to stay open
for review and merge.

Fixes ADO#5063962

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

👋 Thanks for your contribution, @brandom-msft!

This repository is read-only. As a Microsoft contributor, please submit your PR to the private staging repository instead:

👉 foundry-samples-pr

See CONTRIBUTING.md for full instructions.

@github-actions github-actions Bot closed this Mar 6, 2026
@brandom-msft brandom-msft reopened this Mar 6, 2026
@brandom-msft brandom-msft merged commit 2222495 into main Mar 6, 2026
7 checks passed
@brandom-msft brandom-msft deleted the fix/redirect-allowlist-sync-bot branch March 6, 2026 22:04
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