Skip to content

feat(github-project): document PR merge, branch protection, and CodeQL gotchas#72

Merged
CybotTM merged 3 commits intomainfrom
feat/cross-project-pr-and-merge-gotchas
May 5, 2026
Merged

feat(github-project): document PR merge, branch protection, and CodeQL gotchas#72
CybotTM merged 3 commits intomainfrom
feat/cross-project-pr-and-merge-gotchas

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented May 5, 2026

Summary

Capture cross-project gotchas that were siloed in downstream project memory (t3x-nr-passkeys-be's MEMORY.md) so all consumers of the skill see them.

security-config.md:

  • New "Anti-pattern: permissions: read-all" subsection in the Token-Permissions area. read-all scores 0 on the Scorecard Token-Permissions check; explicit per-permission scopes score 10. Includes before/after snippet.
  • New "Supported Languages — PHP Is NOT Supported" subsection under CodeQL Configuration. Lists javascript-typescript + actions as the matrix to use on PHP/TYPO3 repos. Cites community discussion #158392 and notes that listing javascript (the deprecated name) breaks v3+.

tag-validation.md: promote one-line bullets in "Batch PR Merging Gotchas" into proper subsections:

  • "gh pr merge --delete-branch fails with merge queues" — with gh api repos/$REPO --jq '.merge_queue // null' detection snippet for batch loops.
  • "Contents API commits don't satisfy required_signatures" — explains the web-flow committer identity issue, lists three workarounds: --admin bypass, SSH push of locally-signed commits, GitHub App with verified signing. Cross-references multi-repo-operations.md for the related HTTP 409 angle.
  • The bullets that ARE already canonically documented elsewhere now cross-reference instead of restating: signed-rebase compatibility → auto-merge-guide.md "Signed Commits and Merge Strategy Compatibility"; stale-reviews / Copilot race → auto-merge-guide.md "Auto-Approve Race Condition with Copilot Reviewer". Adds a real-world heterogeneity note (Netresearch fleet has repos with all three permutations of allowed merge methods).

Two of the six lessons from the source MEMORY.md are intentionally not added: the per-repo merge-method detection snippet and the dismiss_stale_reviews + Copilot race are already canonically documented in auto-merge-guide.md (which explicitly says it's the canonical home and project memories should cross-reference). Adding them again would duplicate exactly what those sections warn against.

Test plan

  • CI green on this branch
  • Markdown lint passes (no trailing blank lines, headings well-formed)
  • Cross-references resolve (auto-merge-guide.md sections still exist with the named anchors)
  • No regression on existing references/security-config.md / references/tag-validation.md sections — only additions and one bullet rewrite

…L gotchas

Capture cross-project gotchas siloed in downstream project memory:

- security-config.md: explicit `permissions: read-all` anti-pattern in
  Token-Permissions section (scores 0 vs 10 for explicit per-permission
  scopes); CodeQL Supported Languages subsection noting PHP is not
  supported (use `javascript-typescript` + `actions` matrix on PHP/TYPO3
  repos).
- tag-validation.md: expand the one-line bullets in "Batch PR Merging
  Gotchas" into proper subsections covering `gh pr merge --delete-branch`
  failing under merge queues (with detection snippet) and Contents API
  commits not satisfying `required_signatures` (with three workarounds:
  `--admin`, SSH push, GitHub App). Cross-reference auto-merge-guide.md
  for the stale-reviews / Copilot-race and signed-rebase cases that are
  already canonically documented there rather than restate them.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI review requested due to automatic review settings May 5, 2026 21:34
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates documentation regarding GitHub Actions security configurations, CodeQL language support, and multi-repo merge strategies. It specifically warns against using permissions: read-all, clarifies that CodeQL does not support PHP, and provides workarounds for merge queue and commit signing issues. A review comment correctly pointed out that the suggested script for detecting merge queues used an incorrect API endpoint and lacked error handling, providing a corrected version using gh pr view.

Comment thread skills/github-project/references/tag-validation.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the GitHub project reference docs with cross-project operational guidance around batch PR merging, branch protection, workflow permissions, and CodeQL configuration so consumers of the skill have the same gotchas documented centrally.

Changes:

  • Expanded tag-validation.md with fuller guidance for batch PR merges, including merge-queue and signed-commit caveats.
  • Added a new permissions: read-all anti-pattern section to security-config.md.
  • Added CodeQL guidance for PHP/TYPO3 repositories, including supported language matrix recommendations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
skills/github-project/references/tag-validation.md Reworked batch-merge gotchas into subsections and added merge-queue / required-signatures guidance with cross-references.
skills/github-project/references/security-config.md Added workflow-permissions guidance and a new CodeQL subsection for PHP/TYPO3 repositories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/github-project/references/tag-validation.md Outdated
Comment thread skills/github-project/references/tag-validation.md Outdated
CybotTM added 2 commits May 5, 2026 23:38
…ction

The original snippet queried `gh api "repos/$REPO"` for a `merge_queue`
field that the REST endpoint does not actually return — it would always
evaluate to null and never detect the queue, defeating the gotcha's whole
purpose. Caught by Gemini Code Assist on PR #72.

Use the GraphQL `Repository.mergeQueue` field instead (returns null when
no queue is configured) and add explicit error handling on the API call.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
…ranch snippet

Hardcoding `--merge` contradicts the bullet right above warning that
repos may only allow squash or rebase. In a mixed fleet, copying the
"fix" still produces "merge method not allowed" failures on
squash-only or rebase-only repos. Wire in the same dynamic strategy
detection used in auto-merge-guide.md so both the queue check and the
strategy choice are per-repo. Caught by Copilot review on PR #72.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@CybotTM CybotTM merged commit 052c7e3 into main May 5, 2026
15 checks passed
@CybotTM CybotTM deleted the feat/cross-project-pr-and-merge-gotchas branch May 5, 2026 21:42
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