Repository navigation
Add workflow to close community PRs with a canned comment using Close-PR- labels - #8235
Merged
Merged
Conversation
When a label starting with `Close-PR-` is added to a pull request, post the comment stored in `.github/comments/close-pr-<reason>.md` and close the pull request. Storing the comments in Markdown files eases maintenance, and adding a new reason only requires creating the label and its comment file. The workflow waits 10 seconds and checks that the label is still present before acting, so that a label added by mistake can be removed in time. Add comments for the most frequent reasons we closed community PRs in the past: Close-PR-Need-Meta, Close-PR-Not-Upstream, Close-PR-Not-Planned, Close-PR-Rich-Text-Editor, Close-PR-Rust-SDK, Close-PR-Translations and Close-PR-Low-Effort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the welcome comment text to `.github/comments/fork-pr-notice.md` so it is easier to maintain, and post it with `gh pr comment` instead of `actions/github-script`, consistent with the Close-Need-Meta workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8235 +/- ##
========================================
Coverage 81.11% 81.11%
========================================
Files 2906 2906
Lines 87593 87593
Branches 11906 11906
========================================
Hits 71052 71052
Misses 11900 11900
Partials 4641 4641 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Member
Author
|
(I sent one of the canned comment manually in 8261 - not using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Content
.github/workflows/close-pr.yml: when a label starting withClose-PR-is added to a pull request, it posts the comment stored in.github/comments/close-pr-<reason>.mdand closes the pull request.Close-PR-Need-MetaClose-PR-Not-UpstreamClose-PR-Not-PlannedClose-PR-Rich-Text-EditorClose-PR-Rust-SDKClose-PR-TranslationsClose-PR-Low-EffortghCLI and a Markdown file for its comment.Motivation and context
Ease closing community PRs with a consistent and maintainable explanation.
To choose the labels, I looked at all the closed (not merged) community PRs (148 PRs from forks) and the maintainer comments on them, and kept the most frequent reasons for closing. The
Close-PR-prefix (instead ofClose-) leaves room forClose-Issue-labels if we add a similar workflow for issues later, and avoids thePR-prefix used for the changelog.Past community PRs closed for each reason
Close-PR-Not-Upstream: sync fork #7720, Main #7506, Feral/sync/v26.08.2 #7507, Develop alpha #6810, Rebrand/dottie #7091, Milestone 1 – Connect branding with logo and filewire defaults #7319, chore: add automated upstream sync workflow and docs #6418, Ganikhodjaev 05.02.26 #6156, Element hq develop #6154, SYNC #5907, Moving to Mimosa-X-branch #4709, Mvp develop #4143, 20260826 #7580, Update build.yml #7615, Must be removed #4937, Must be removed #4929, Use synapse as default and disable checks #4956, Ci/test disabling systems to sprintapp modulehttps://github.com/mockito/mockito/issues/1879https://github.com/openjdk/jdk/commit/84f23149e22561173feb0e34bca31a7345b43c89https://github.com/wix-incubator/rules_scala/commit/d66c9d7506ecc6a1b454055b35bd10ef064b9d98https://github.com/githubnext/agentics/blob/main/workflows%2Frepo-status.mdhttps://github.com/element-hq/element-x-android/actions/runs/37632631458jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Show stack info if: github.event.pull_request.stack != null run: | echo "Stack base ref: ${{ github.event.pull_request.stack.base.ref } - name: Run only when the stack targets a release branch if: github.event.pull_request.stack != null startsWith(github.event.pull_request.stack.base.ref, 'release/') run: echo "This stack targets a release branch"github.event.pull_request.stack.base.ref #7786Close-PR-Not-Planned: Extract widget messaging transport from Element Call #8049, Implement Circles #7733, Change a member's role from their moderation actions #7556, Save microphone and camera state between group calls #7259, Add "Allow screenshots" option to the Screen lock #6914, Ask for user confirmation before trusting user CA certificates #6861, Allow adding DMs to private spaces #6524, Do not show "Not Encrypted" badge for public rooms #6349, feat: Add per-room custom notification sounds #6041, Add option to hide deleted messages #4434, Insert a mention when clicking user's name in the timeline #3858Close-PR-Need-Meta: Lock app #7108, Fix/animated avatar compression #7576Close-PR-Rich-Text-Editor: Show the summary of a details element on its own line #7444, Render heading tags as their own paragraph instead of dropping them #7358, Render <s> and <strike> as strikethrough instead of dropping the formatting #7341, Render nested bullet points as outline #6447, Display tables from other clients as formatted text #6201Close-PR-Rust-SDK: Name the homeserver's administrator when it cannot be reached #7553, Index older room history for message search, with a Start indexing control in developer settings #7511, Rebuild the search index when it cannot cover what the event cache already holds #7252Close-PR-Translations: Add Vietnamese translations for login features #6083, Add Vietnamese translations for call features #6082, Update translations and screenshots forHistoryVisibleview. #5896, Update translations let rec #5345Close-PR-Low-Effort: Create INSTALL.md #7893, fix: improve bridge icons and detection accuracy #6423Not listed: PRs that were superseded or duplicated, closed by their author, abandoned, or with an unclear reason.
Screenshots / GIFs
N/A
Tests
actionlintandzizmorreport no issue.pull_request_targetuses the workflow from the base branch: add aClose-PR-label to a PR, check that the comment is posted and the PR closed. Remove the label within 10 seconds and check that nothing happens.Tested devices
Checklist
🤖 Generated with Claude Code