Skip to content

Improve cleanup workflow resilience and fork compatibility#6822

Draft
Copilot wants to merge 4 commits intodocs-v2-jts-agentic-workflowfrom
copilot/sub-pr-6809-again
Draft

Improve cleanup workflow resilience and fork compatibility#6822
Copilot wants to merge 4 commits intodocs-v2-jts-agentic-workflowfrom
copilot/sub-pr-6809-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

Addresses review feedback on the ephemeral docs cleanup workflow to handle concurrent merges and support fork PRs.

Changes

Workflow trigger and permissions

  • Switch from pull_request to pull_request_target for fork PR write access
  • Document security model: workflow only touches base branch with hardcoded file list

Concurrent merge handling

  • Use fetch-depth: 0 for full history
  • Add git pull --rebase before push with fallback to git pull --no-rebase --no-edit on conflict
  • Prevents non-fast-forward errors when multiple PRs merge simultaneously

Documentation accuracy

  • Change startup hook reference from definitive to configurable in .claude/commands/plan.md

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 12, 2026 17:12
- Switch from pull_request to pull_request_target for fork compatibility
- Use fetch-depth: 0 to get full history
- Add git pull --rebase before push to handle concurrent merges
- Soften startup hook reference to clarify it's configurable

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
- Add fallback to regular merge if rebase fails due to conflicts
- Document security considerations for pull_request_target usage
- Clarify why this workflow is safe for fork PRs

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Use --no-rebase --no-edit flags to ensure merge doesn't prompt for editor

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Copilot AI changed the title [WIP] Create and manage context and planning files for agents Improve cleanup workflow resilience and fork compatibility Feb 12, 2026
Copilot AI requested a review from jstirnaman February 12, 2026 17:15
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