mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(skills): drop GitHub issue/project finalization from PR workflow skills
GitHub Projects are no longer used in this repo. Remove issue/project finalization from review-and-merge-pr and the project-board step from make-closed-issue in all three toolchain mirrors, record the surprise in known-surprises.md, and regenerate llms files.
This commit is contained in:
@@ -149,32 +149,7 @@ If the user later explicitly asks to merge after reviews pass, a separate merge
|
||||
gh pr merge --squash --delete-branch
|
||||
```
|
||||
|
||||
### 9. Add to project board
|
||||
|
||||
Use **gh CLI** for project operations (never GitHub MCP).
|
||||
|
||||
Add the issue to the project when the PR is opened, but do **not** force it to `Done` yet.
|
||||
|
||||
```bash
|
||||
ITEM_JSON=$(gh project item-add 1 --owner bitsocialnet --url "https://github.com/bitsocialnet/5chan/issues/ISSUE_NUMBER" --format json)
|
||||
ITEM_ID=$(echo "$ITEM_JSON" | jq -r '.id')
|
||||
```
|
||||
|
||||
If the user later explicitly asks to merge the reviewed PR in the same run, reuse `ITEM_ID` and then set the project item to `Done`:
|
||||
|
||||
```bash
|
||||
# Get Status field ID and Done option ID from project
|
||||
FIELD_JSON=$(gh project field-list 1 --owner bitsocialnet --format json)
|
||||
STATUS_FIELD_ID=$(echo "$FIELD_JSON" | jq -r '.fields[] | select(.name=="Status") | .id')
|
||||
DONE_OPTION_ID=$(echo "$FIELD_JSON" | jq -r '.fields[] | select(.name=="Status") | .options[] | select(.name=="Done") | .id')
|
||||
|
||||
# Set status to Done
|
||||
gh project item-edit --id "$ITEM_ID" --project-id PVT_kwDODohK7M4BM4wg --field-id "$STATUS_FIELD_ID" --single-select-option-id "$DONE_OPTION_ID"
|
||||
```
|
||||
|
||||
Assignees and labels are inherited from the issue (set in step 6) — no separate project update needed.
|
||||
|
||||
### 10. Report summary
|
||||
### 9. Report summary
|
||||
|
||||
Print a summary to the user:
|
||||
|
||||
@@ -184,7 +159,6 @@ Issue #NUMBER created, committed, pushed, and linked to a PR into master.
|
||||
Commit: HASH
|
||||
Labels: label1, label2
|
||||
PR: PR_URL
|
||||
Project: 5chan
|
||||
URL: https://github.com/bitsocialnet/5chan/issues/NUMBER
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: review-and-merge-pr
|
||||
description: Review an open GitHub pull request, inspect feedback from Cursor Bugbot, CodeRabbit, CI, and human reviewers, decide which findings are valid, implement fixes on the PR branch, merge the PR into master when it is ready, and finalize any linked GitHub issue so it matches the make-closed-issue workflow after merge. Use when the user says "check the PR", "address bugbot comments", "handle CodeRabbit feedback", "review PR feedback", or "merge this PR".
|
||||
description: Review an open GitHub pull request, inspect feedback from Cursor Bugbot, CodeRabbit, CI, and human reviewers, decide which findings are valid, implement fixes on the PR branch, and merge the PR into master when it is ready. Use when the user says "check the PR", "address bugbot comments", "handle CodeRabbit feedback", "review PR feedback", or "merge this PR".
|
||||
---
|
||||
|
||||
# Review And Merge Pr
|
||||
@@ -11,6 +11,7 @@ Use this skill after a feature branch already has an open PR into `master`.
|
||||
Stay on the PR branch, treat review bots as input rather than authority, and only merge once the branch is verified and the remaining comments are either fixed, explicitly deferred, or explicitly declined with a reason.
|
||||
Do not let repeated nitpicks, speculative future-work comments, or low-value bot suggestions keep the PR open once they have been triaged as non-blocking.
|
||||
Finish the workflow by cleaning up local git state yourself; do not assume GitHub, `gh pr merge --delete-branch`, or GitHub Desktop removed the local feature branch or any local `pr/<number>` alias.
|
||||
Do not create or update GitHub issues or projects as part of this workflow.
|
||||
|
||||
## Workflow
|
||||
|
||||
@@ -18,7 +19,7 @@ Finish the workflow by cleaning up local git state yourself; do not assume GitHu
|
||||
|
||||
Prefer the PR for the current branch when the branch is not `master`.
|
||||
If the current branch is `master`, inspect open PRs and choose the one that matches the user request.
|
||||
If there is no open PR yet, stop and use `make-closed-issue` first.
|
||||
If there is no open PR yet, stop and report that this skill requires an existing PR.
|
||||
|
||||
Useful commands:
|
||||
|
||||
@@ -120,59 +121,7 @@ Preferred merge command:
|
||||
gh pr merge <pr-number> --repo bitsocialnet/5chan --squash --delete-branch
|
||||
```
|
||||
|
||||
### 7. Finalize linked issues to match `make-closed-issue`
|
||||
|
||||
After merge, inspect the PR's linked closing issues.
|
||||
For every linked issue, bring it into the same final state expected from `make-closed-issue`:
|
||||
|
||||
- closed
|
||||
- assigned to the current GitHub user
|
||||
- added to the `5chan` project if missing
|
||||
- project status `Done`
|
||||
|
||||
Before editing issue assignees, determine the current contributor's GitHub username from the authenticated `gh` session.
|
||||
If `gh` is not signed in or cannot resolve the login, stop and ask the contributor for their GitHub username before proceeding.
|
||||
If the PR has no linked issue, explicitly tell the user that there was no associated issue to finalize.
|
||||
|
||||
Useful commands:
|
||||
|
||||
```bash
|
||||
GH_LOGIN=$(gh api user --jq '.login' 2>/dev/null || true)
|
||||
|
||||
if [ -z "$GH_LOGIN" ]; then
|
||||
echo "GitHub username could not be determined from gh auth. Ask the contributor for their GitHub username before proceeding."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ISSUE_NUMBERS=$(gh pr view <pr-number> --repo bitsocialnet/5chan --json closingIssuesReferences --jq '.closingIssuesReferences[].number')
|
||||
|
||||
if [ -n "$ISSUE_NUMBERS" ]; then
|
||||
FIELD_JSON=$(gh project field-list 1 --owner bitsocialnet --format json)
|
||||
STATUS_FIELD_ID=$(echo "$FIELD_JSON" | jq -r '.fields[] | select(.name=="Status") | .id')
|
||||
DONE_OPTION_ID=$(echo "$FIELD_JSON" | jq -r '.fields[] | select(.name=="Status") | .options[] | select(.name=="Done") | .id')
|
||||
|
||||
for ISSUE_NUMBER in $ISSUE_NUMBERS; do
|
||||
ISSUE_STATE=$(gh issue view "$ISSUE_NUMBER" --repo bitsocialnet/5chan --json state --jq '.state')
|
||||
if [ "$ISSUE_STATE" != "CLOSED" ]; then
|
||||
gh issue close "$ISSUE_NUMBER" --repo bitsocialnet/5chan
|
||||
fi
|
||||
|
||||
if ! gh issue view "$ISSUE_NUMBER" --repo bitsocialnet/5chan --json assignees --jq '.assignees[].login' | grep -qx "$GH_LOGIN"; then
|
||||
gh issue edit "$ISSUE_NUMBER" --repo bitsocialnet/5chan --add-assignee "$GH_LOGIN"
|
||||
fi
|
||||
|
||||
ITEM_ID=$(gh project item-list 1 --owner bitsocialnet --limit 1000 --format json --jq ".items[] | select(.content.number == $ISSUE_NUMBER) | .id" | head -n1)
|
||||
if [ -z "$ITEM_ID" ]; then
|
||||
ITEM_JSON=$(gh project item-add 1 --owner bitsocialnet --url "https://github.com/bitsocialnet/5chan/issues/$ISSUE_NUMBER" --format json)
|
||||
ITEM_ID=$(echo "$ITEM_JSON" | jq -r '.id')
|
||||
fi
|
||||
|
||||
gh project item-edit --id "$ITEM_ID" --project-id PVT_kwDODohK7M4BM4wg --field-id "$STATUS_FIELD_ID" --single-select-option-id "$DONE_OPTION_ID"
|
||||
done
|
||||
fi
|
||||
```
|
||||
|
||||
### 8. Clean up local state after merge
|
||||
### 7. Clean up local state after merge
|
||||
|
||||
After the PR is merged:
|
||||
|
||||
@@ -195,7 +144,7 @@ git worktree list
|
||||
git worktree remove /path/to/worktree
|
||||
```
|
||||
|
||||
### 9. Report the outcome
|
||||
### 8. Report the outcome
|
||||
|
||||
Tell the user:
|
||||
|
||||
@@ -204,8 +153,5 @@ Tell the user:
|
||||
- which findings were declined and why
|
||||
- which verification commands ran
|
||||
- whether the PR was merged
|
||||
- whether linked issues were confirmed closed
|
||||
- whether linked issues were assigned to the current GitHub user
|
||||
- whether linked project items were confirmed `Done`
|
||||
- whether stale remote-tracking refs were pruned
|
||||
- whether the feature branch, local `pr/<number>` alias, and any worktree were cleaned up
|
||||
|
||||
Reference in New Issue
Block a user