Route scheduled post publishing through PRs to satisfy protected-branch policy#54
Merged
Merged
Conversation
Copilot
AI
changed the title
Fix scheduled publish workflow for protected branch
Route scheduled post publishing through PRs to satisfy protected-branch policy
Jun 9, 2026
Copilot created this pull request from a session on behalf of
dauble
June 9, 2026 12:06
View session
dauble
approved these changes
Jun 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the scheduled publishing automation to comply with protected-branch rules by replacing the direct commit/push to master with an automated pull request workflow.
Changes:
- Expanded workflow permissions to include
pull-requests: writein addition tocontents: write. - Replaced the “commit and push” step with
peter-evans/create-pull-request@v5to open a PR targetingmaster. - Limited the PR’s committed changes to
_posts/and_drafts/viaadd-paths.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The scheduled publish workflow failed at push time because it attempted to write directly to
master, which is protected and requires PR-based updates. This change updates the automation to publish posts through an autogenerated pull request instead of a direct push.Root cause addressed
Publish Scheduled Postspreviously committed and rangit pushagainstmaster, which is rejected by branch protection (GH006).Workflow behavior change
peter-evans/create-pull-request@v5.published-posts-${{ github.run_id }}) and opens a PR targetingmaster.Permissions alignment
contents: write(commit to automation branch)pull-requests: write(open PR)Example of the key change