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
33 changes: 33 additions & 0 deletions .github/workflows/close-linked-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Closes the issues of merged pull requests (`Closes #n`). GitHub does not do it
# here: auto-merge runs as github-actions with GITHUB_TOKEN, and such a merge
# neither processes closing keywords nor starts a workflow on pull_request closed,
# so this runs on a schedule. An issue reopened by hand stays open.
name: Close linked issues

on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: read

jobs:
close:
name: Close issues of merged pull requests
runs-on: ubuntu-24.04
steps:
- name: gh issue close
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
run: |
gh pr list -R "$REPO" --state merged --limit 50 --json number,closingIssuesReferences \
--jq '.[] | .number as $pr | .closingIssuesReferences[] | "\(.number) \($pr)"' |
while read -r issue pr; do
state=$(gh api "repos/$REPO/issues/$issue" --jq '"\(.state) \(.state_reason)"')
if [ "$state" = "open null" ]; then
gh issue close "$issue" -R "$REPO" --comment "Closed by #$pr."
fi
done
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Every task is tracked by a GitHub issue and lands in `master` through a pull req
1. The working tree contains modifications belonging to the task;
2. All regression, verification, and smoke tests have passed cleanly;
3. There is no explicit instruction from the user forbidding commits.
4. **Push** the branch (`git push -u origin <branch>`) and **open a pull request** into `master` whose body says what changed, how it was verified, and `Closes #<n>`. CI runs on the pull request.
4. **Push** the branch (`git push -u origin <branch>`) and **open a pull request** into `master` whose body says what changed, how it was verified, and `Closes #<n>`. CI runs on the pull request. GitHub does not process `Closes` for auto-merges, so `.github/workflows/close-linked-issues.yml` closes those issues within about 30 minutes; an issue reopened by hand stays open.
5. **Merge**: a pull request opened by `endercodezz` (also the ones the agent opens with the maintainer's `gh` login) is **auto-merged** with a merge commit once the required CI checks pass (`.github/workflows/automerge.yml`; `master` requires `Linux host build + tests`, `Windows host build + tests`, `New 3DS runtime (devkitARM)`, `texpack (Rust)`, and `BinDiff` and `CPK tool` on both systems; the last two have the Zig version in their names, so a Zig update renames the required checks too). So open a pull request only for verified, finished work; work in progress is opened as a draft (`gh pr create --draft`), which is not auto-merged; `gh pr merge <n> --disable-auto` stops a pending auto-merge. Other pull requests (contributors) are merged by the maintainer; the agent merges them only when the user says so. Always a merge commit, never squash or rebase (section 17). Releases are tagged on `master` after the merge.

Never stage temporary files, `.claude/LOCAL.md`, credentials or game assets. The procedure and its pre/post-commit check scripts are in the `p3p3ds-commit` skill.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Every task is tracked by a GitHub issue and lands in `master` through a pull req
1. The working tree contains modifications belonging to the task;
2. All regression, verification, and smoke tests have passed cleanly;
3. There is no explicit instruction from the user forbidding commits.
4. **Push** the branch (`git push -u origin <branch>`) and **open a pull request** into `master` whose body says what changed, how it was verified, and `Closes #<n>`. CI runs on the pull request.
4. **Push** the branch (`git push -u origin <branch>`) and **open a pull request** into `master` whose body says what changed, how it was verified, and `Closes #<n>`. CI runs on the pull request. GitHub does not process `Closes` for auto-merges, so `.github/workflows/close-linked-issues.yml` closes those issues within about 30 minutes; an issue reopened by hand stays open.
5. **Merge**: a pull request opened by `endercodezz` (also the ones the agent opens with the maintainer's `gh` login) is **auto-merged** with a merge commit once the required CI checks pass (`.github/workflows/automerge.yml`; `master` requires `Linux host build + tests`, `Windows host build + tests`, `New 3DS runtime (devkitARM)`, `texpack (Rust)`, and `BinDiff` and `CPK tool` on both systems; the last two have the Zig version in their names, so a Zig update renames the required checks too). So open a pull request only for verified, finished work; work in progress is opened as a draft (`gh pr create --draft`), which is not auto-merged; `gh pr merge <n> --disable-auto` stops a pending auto-merge. Other pull requests (contributors) are merged by the maintainer; the agent merges them only when the user says so. Always a merge commit, never squash or rebase (section 17). Releases are tagged on `master` after the merge.

Never stage temporary files, `.claude/LOCAL.md`, credentials or game assets. The procedure and its pre/post-commit check scripts are in the `p3p3ds-commit` skill.
Expand Down