Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions .claude/commands/run-epic.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .claude/commands/run-feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ This section applies only under the `landing` line's `merge=auto`. Under `merge=
Whatever happened, then delete `<gate folder>` and `<gate script>` in it, and when `Test-Path -LiteralPath '<gate folder>'` still finds it, name its path in the report. When a step failed, leave the pull request as under `merge=person`: clean, a draft when it was one, and with the merge recommended, for me to merge.
6. **Ready and auto-merge.**
- Read the pull request again: `gh pr view <pr> --json headRefOid,isDraft,autoMergeRequest`, or `gh api repos/{owner}/{repo}/pulls/<pr>`, whose `auto_merge` is `null` while auto-merge is off. When its head isn't the head item 2 judged, land nothing at this check.
- Pick the merge method that ADR-0065 decision 3 orders first among those the repository's settings and the default branch's rules both allow, before anything changes the pull request. The settings are `allow_merge_commit`, `allow_rebase_merge` and `allow_squash_merge` in `gh api repos/{owner}/{repo}`. The rules are in `gh api "repos/{owner}/{repo}/rules/branches/<default>?per_page=100&page=<n>"`: a `required_linear_history` rule rules out a merge commit, a `pull_request` rule's `parameters.allowed_merge_methods`, when it has one, rules out each method it doesn't list, and a `merge_queue` rule's `parameters.merge_method` is then the only method, because the queue merges. Take `merge`, else `rebase`, else `squash`. When this command has posted that the pull request must merge with a merge commit, as after a renumber or merge step, only `merge` will do. When no method is left, or a read fails, land nothing, and post the notice, saying why.
- Pick the merge method that ADR-0065 decision 3 orders first among those the repository's settings and the default branch's rules both allow, before anything changes the pull request. The settings are `allow_merge_commit`, `allow_rebase_merge` and `allow_squash_merge` in `gh api repos/{owner}/{repo}`. The rules are in `gh api "repos/{owner}/{repo}/rules/branches/<default>?per_page=100&page=<n>"`: a `required_linear_history` rule rules out a merge commit, a `pull_request` rule's `parameters.allowed_merge_methods`, when it has one, rules out each method it doesn't list, and a `merge_queue` rule's `parameters.merge_method` is then the only method, because the queue merges. Take `merge`, else `rebase`, else `squash`. When a commit of the pull request is a merge, as after a renumber or merge step, whichever command or session made it, rule out `rebase` alone: take `merge`, else `squash`, because a rebase would drop the merge of the default branch, while a squash lands the reviewed tree as one commit, as ADR-0089 says. A commit is a merge when its `parents` list holds two or more commits in `gh api "repos/{owner}/{repo}/pulls/<pr>/commits?per_page=100&page=<n>"`, read a page at a time until one holds fewer than 100. When no method is left, or a read fails, land nothing, and post the notice, saying why.
- When it is a draft, mark it ready: `gh pr ready <pr>`, or, where the session refuses GitHub's GraphQL API, the GitHub MCP tool `update_pull_request` with `draft` set to `false`. NCode Review reviews a pull request marked ready again, and the checks that follow answer that review's findings like any other's.
- Turn on auto-merge: `gh pr merge <pr> --auto --<method> --match-head-commit <head sha>`. Where the session refuses GitHub's GraphQL API, use the GitHub MCP tool `enable_pr_auto_merge` with `mergeMethod` `MERGE`, `REBASE` or `SQUASH`. It takes no head commit, so read the head again right after it, and when it moved, turn auto-merge off with the tool `disable_pr_auto_merge`, post a top-level comment, starting with `Autopilot:`, that says a run turned auto-merge off because the head moved, and land at a later check. Without either, land nothing, post the notice, and leave the pull request for me, as item 5 does.
- When auto-merge isn't on at the end of this item and this item marked the pull request ready, make it a draft again, as item 5 leaves it: `gh pr ready <pr> --undo`, or the GitHub MCP tool `update_pull_request` with `draft` set to `true`.
Expand Down
6 changes: 3 additions & 3 deletions .claude/commands/run-issues.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .claude/commands/ship-plan.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Written by Copier; never edit by hand. Change an answer with .template\Update-Project.ps1 -Data.
_commit: v0.166.0
_commit: v0.167.1
_src_path: https://github.com/NCodeGroup/project-template.git
author_name: NCode Group
best_practices_project: '17129'
Expand Down
43 changes: 33 additions & 10 deletions .github/prompts/run-epic.prompt.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/prompts/run-feedback.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This section applies only under the `landing` line's `merge=auto`. Under `merge=
Whatever happened, then delete `<gate folder>` and `<gate script>` in it, and when `Test-Path -LiteralPath '<gate folder>'` still finds it, name its path in the report. When a step failed, leave the pull request as under `merge=person`: clean, a draft when it was one, and with the merge recommended, for me to merge.
6. **Ready and auto-merge.**
- Read the pull request again: `gh pr view <pr> --json headRefOid,isDraft,autoMergeRequest`, or `gh api repos/{owner}/{repo}/pulls/<pr>`, whose `auto_merge` is `null` while auto-merge is off. When its head isn't the head item 2 judged, land nothing at this check.
- Pick the merge method that ADR-0065 decision 3 orders first among those the repository's settings and the default branch's rules both allow, before anything changes the pull request. The settings are `allow_merge_commit`, `allow_rebase_merge` and `allow_squash_merge` in `gh api repos/{owner}/{repo}`. The rules are in `gh api "repos/{owner}/{repo}/rules/branches/<default>?per_page=100&page=<n>"`: a `required_linear_history` rule rules out a merge commit, a `pull_request` rule's `parameters.allowed_merge_methods`, when it has one, rules out each method it doesn't list, and a `merge_queue` rule's `parameters.merge_method` is then the only method, because the queue merges. Take `merge`, else `rebase`, else `squash`. When this command has posted that the pull request must merge with a merge commit, as after a renumber or merge step, only `merge` will do. When no method is left, or a read fails, land nothing, and post the notice, saying why.
- Pick the merge method that ADR-0065 decision 3 orders first among those the repository's settings and the default branch's rules both allow, before anything changes the pull request. The settings are `allow_merge_commit`, `allow_rebase_merge` and `allow_squash_merge` in `gh api repos/{owner}/{repo}`. The rules are in `gh api "repos/{owner}/{repo}/rules/branches/<default>?per_page=100&page=<n>"`: a `required_linear_history` rule rules out a merge commit, a `pull_request` rule's `parameters.allowed_merge_methods`, when it has one, rules out each method it doesn't list, and a `merge_queue` rule's `parameters.merge_method` is then the only method, because the queue merges. Take `merge`, else `rebase`, else `squash`. When a commit of the pull request is a merge, as after a renumber or merge step, whichever command or session made it, rule out `rebase` alone: take `merge`, else `squash`, because a rebase would drop the merge of the default branch, while a squash lands the reviewed tree as one commit, as ADR-0089 says. A commit is a merge when its `parents` list holds two or more commits in `gh api "repos/{owner}/{repo}/pulls/<pr>/commits?per_page=100&page=<n>"`, read a page at a time until one holds fewer than 100. When no method is left, or a read fails, land nothing, and post the notice, saying why.
- When it is a draft, mark it ready: `gh pr ready <pr>`, or, where the session refuses GitHub's GraphQL API, the GitHub MCP tool `update_pull_request` with `draft` set to `false`. NCode Review reviews a pull request marked ready again, and the checks that follow answer that review's findings like any other's.
- Turn on auto-merge: `gh pr merge <pr> --auto --<method> --match-head-commit <head sha>`. Where the session refuses GitHub's GraphQL API, use the GitHub MCP tool `enable_pr_auto_merge` with `mergeMethod` `MERGE`, `REBASE` or `SQUASH`. It takes no head commit, so read the head again right after it, and when it moved, turn auto-merge off with the tool `disable_pr_auto_merge`, post a top-level comment, starting with `Autopilot:`, that says a run turned auto-merge off because the head moved, and land at a later check. Without either, land nothing, post the notice, and leave the pull request for me, as item 5 does.
- When auto-merge isn't on at the end of this item and this item marked the pull request ready, make it a draft again, as item 5 leaves it: `gh pr ready <pr> --undo`, or the GitHub MCP tool `update_pull_request` with `draft` set to `true`.
Expand Down
Loading