Repository navigation
Stop the Build catalog workflow from opening pull requests - #565
Merged
Alejandro Lopez (soyalejolopez) merged 1 commit intoOct 28, 2026
Merged
Alejandro Lopez (soyalejolopez) merged 1 commit into
Alejandro Lopez (soyalejolopez) merged 1 commit into
Conversation
The repository blocks GitHub Actions from opening pull requests and protects master, so the fallback could only strand a branch and fail the run. When the direct push is rejected, the workflow now warns and lists the out-of-date generated files in its summary. Adds a regression test and documents how to publish generated files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alejandro Lopez (soyalejolopez)
merged commit Oct 28, 2026
5173993
into
microsoft:master
5 checks passed
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category
What's in this pull request?
Stops the Build catalog workflow from pushing a branch and opening a pull request after it rebuilds the catalog.
masterrequires pull requests, and the repository blocks GitHub Actions from opening them. After every merge the workflow's direct push was rejected, it pushed acatalog-refresh/...branch it could never turn into a PR, and the run failed (for example, #564's run). Nothing was lost, but each merge showed a red X and left a stray branch.What changed
build-catalog.yml: the publish step still tries a direct push, so it keeps working if the policy changes or a bypass is configured. When the push is rejected, it no longer creates a branch or callsgh pr. It prints a warning and writes the out-of-date files and the rebuild command to the run summary, and the run succeeds. It also drops thepull-requests: writepermission and theGH_TOKENit no longer needs.test-traffic-workflow.js: a regression check that the publish step does not open pull requests, does not fail on a rejected push, and does not requestpull-requestsaccess.tools/catalog-build/README.md: a Publishing changes section with the manual steps (build, render the social card for new resources, rebuild, commit generated files in the PR).CHANGELOG.md: a line for the change.How it was tested
I ran the extracted step in a throwaway repository against two remotes. With a remote that rejects the push, it exits 0, creates no branch, and writes the summary. With a remote that accepts the push, it commits and pushes as before.
Not changed: the weekly traffic workflow still opens its pull request with
AUTOMATION_PATand fails loudly with a compare link when it cannot. That failure is the reminder to open the weekly PR, so it is left alone.Related issues
Part of the revamp tracked in #482.
Checklist
npm ci --prefix tools/catalog-build && npm run check --prefix tools/catalog-build(passes: metadata valid for 58 resources, internal links resolve, all tests pass)versionandupdatedwere bumped (not applicable: no resource changed)See CONTRIBUTING.md for details.