Skip to content

Commit 603e602

Browse files
committed
feat(ci): acknowledge new pull requests automatically
Contributors could not distinguish "blocked" from "ignored". Several PRs sat on green, mergeable work for over a week with no maintainer comment while release-critical work absorbed review capacity, and nothing on the PR page said so. GitHub has no repo-scoped banner for pull requests -- an org announcement banner renders only for org members, and pinned issues and discussions never appear on the PR tab -- so a comment on open is the only surface that reaches an external contributor at the moment they contribute. Posts one comment when a PR is opened, stating that it is queued, that it will not be closed for inactivity, and what genuinely speeds up review (rebased branch, green CI, one claim per PR, signed-off commits). The message lives in .github/pr-acknowledgement.md rather than in the workflow, so the status can be edited -- or acknowledgements switched off by blanking the file -- without a workflow change. A missing, empty, or whitespace-only file is the documented off switch. Uses pull_request_target because a pull_request trigger hands fork PRs a read-only token, which would fail on exactly the contributions most worth acknowledging. The job never checks out, builds, or executes PR code: checkout carries no ref and so resolves to the base commit, it is used only to read our own message file, and the PR number reaches the shell through the environment rather than string interpolation. Skips bots and owner-authored PRs. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 97ce23f commit 603e602

2 files changed

Lines changed: 101 additions & 0 deletions

File tree

.github/pr-acknowledgement.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--
2+
Posted automatically on every newly opened pull request by
3+
.github/workflows/pr-acknowledgement.yml
4+
5+
EDIT THIS FILE to change what contributors are told. Blank it out to stop
6+
posting acknowledgements entirely — no workflow change needed.
7+
8+
Keep it short, and keep it honest about what happens next. A promise of a
9+
timeline you will not meet is worse than no acknowledgement at all.
10+
Remove the review-status section below the moment it stops being true.
11+
-->
12+
13+
Thanks for opening this — it has been seen, and it is queued.
14+
15+
This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.
16+
17+
**Current review status: reviews are running behind.** We are finishing release-critical work for `0.9.1-rc.1` — a coordination daemon that changed how the whole system runs, and the root-cause fix for a severe Windows memory leak ([#581](https://github.com/DeusData/codebase-memory-mcp/issues/581)) that could exhaust a machine's commit charge over hours. Those changes cross the memory allocator, thread lifecycle, and the store-resolution path that every tool call runs through, so merging other work on top of them while they settle would leave neither change trustworthy. The full explanation is in [discussion #1144](https://github.com/DeusData/codebase-memory-mcp/discussions/1144).
18+
19+
What that means for this PR, concretely:
20+
21+
- **It will not be closed for inactivity.** No stale bot touches pull requests here.
22+
- It may sit longer than it should before a human reads it. That is on us, not on you.
23+
- Review resumes once the release path is clear.
24+
25+
Things that will genuinely speed it up whenever review does happen:
26+
27+
- **Keep it rebased** on `main` — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
28+
- **Get CI green**, or say which failures you believe are pre-existing.
29+
- **Keep the change to one claim.** Bundled features and refactors get split before they get merged, which costs you a round trip.
30+
- Every commit needs a sign-off (`git commit -s`) — CI enforces DCO.
31+
32+
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.
33+
34+
Thanks for contributing, and sorry in advance for the wait.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: PR acknowledgement
2+
3+
# Posts one acknowledgement comment when a pull request is opened, so a
4+
# contributor learns the current review status immediately instead of inferring
5+
# it from silence.
6+
#
7+
# The message text lives in `.github/pr-acknowledgement.md`. Edit that file to
8+
# change what is said; blank it (or delete it) to turn acknowledgements off
9+
# without touching this workflow. No code change is needed to switch it.
10+
#
11+
# SECURITY — this uses `pull_request_target`, which runs against the BASE repo
12+
# with a token that can write. That is required: a `pull_request` trigger gives
13+
# fork PRs a read-only token, so commenting on exactly the contributions we most
14+
# want to acknowledge would fail.
15+
#
16+
# The safety rule that makes it sound: this job NEVER checks out, builds, or
17+
# executes pull-request code. `actions/checkout` here resolves to the base
18+
# commit (the default under `pull_request_target`), and it is used only to read
19+
# the message file out of our own tree. Do not add a `ref:` pointing at the PR
20+
# head, and do not add a build step. Nothing from the PR is interpolated into a
21+
# shell command either — the body comes from a file, and the PR number is passed
22+
# through the environment rather than expanded inline.
23+
24+
on:
25+
pull_request_target:
26+
types: [opened]
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
acknowledge:
33+
runs-on: ubuntu-latest
34+
# Bots do not read comments, and acknowledging our own PRs is noise.
35+
if: >-
36+
github.event.pull_request.user.type != 'Bot' &&
37+
github.event.pull_request.author_association != 'OWNER'
38+
permissions:
39+
pull-requests: write
40+
steps:
41+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
42+
with:
43+
# Base commit only — never the PR head. See the security note above.
44+
persist-credentials: false
45+
46+
- name: Post acknowledgement
47+
env:
48+
GH_TOKEN: ${{ github.token }}
49+
PR_NUMBER: ${{ github.event.pull_request.number }}
50+
REPO: ${{ github.repository }}
51+
run: |
52+
set -euo pipefail
53+
MESSAGE_FILE=.github/pr-acknowledgement.md
54+
55+
if [ ! -f "$MESSAGE_FILE" ]; then
56+
echo "No $MESSAGE_FILE in the base tree — acknowledgements are off."
57+
exit 0
58+
fi
59+
60+
# An empty or whitespace-only file is the documented off switch.
61+
if [ -z "$(tr -d '[:space:]' < "$MESSAGE_FILE")" ]; then
62+
echo "$MESSAGE_FILE is blank — acknowledgements are off."
63+
exit 0
64+
fi
65+
66+
gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file "$MESSAGE_FILE"
67+
echo "Acknowledged PR #${PR_NUMBER}."

0 commit comments

Comments
 (0)