ci: redirect issues/PRs to amule-org + gate workflows + drop mirror-only static files - #919
Merged
Merged
Conversation
Adds .github/workflows/redirect-prs.yml: a comment-only auto-reply that fires once when a PR is opened, pointing the contributor at the active fork. Comment-only (no close, no lock) so maintainers can still merge from this side. Retrofits .github/workflows/redirect-issues.yml with the same `if: github.repository == 'amule-project/amule'` guard so neither workflow self-references when synced to amule-org or other forks. Uses pull_request_target (with minimum pull-requests:write permission, no checkout, no contributor-code execution) so the comment-write token works on PRs from forks.
13 tasks
…e.md Static GitHub config files can't carry conditional logic, so they'd self-reference on amule-org/amule after a sync — the contact_link in config.yml would bounce users to the page they're already on, blank_issues_enabled: false would propagate as policy, and the PR template would prompt "this repo is a mirror" on amule-org's own new-PR form. Removing both. On amule-project the redirect-issues.yml + redirect-prs.yml workflows (both gated on github.repository == 'amule-project/amule') still catch every newly-opened issue / PR and post the redirect comment — we just lose the pre-emptive contact-link nudge and the blank-issues block. Net result: clean "Sync fork" pass to amule-org with no follow-up cleanup needed.
This was referenced Jun 8, 2026
mrjimenez
pushed a commit
that referenced
this pull request
Jun 8, 2026
Re-introduces the two static GitHub-UI redirects that #919 removed in d8db711 to make amule-project's .github/ safe to "Sync fork" into amule-org/amule: .github/ISSUE_TEMPLATE/config.yml -- blank_issues_enabled + contact_link to amule-org .github/pull_request_template.md -- "this repo is a mirror" soft nudge prefill Both restored verbatim to their PR #915 / commit 1dea568 state. This PR exists in draft as the follow-up #919's body referenced: > After 3.0.0 ships and amule-org has its own .github/ going > forward, the two static files can be re-added to amule-project > unconditionally as full-strength mirror UX -- at that point > the repos are intentionally divergent and there's no sync > to break. See the PR description for the pre-merge checklist (3.0.0 release on amule-project, amule-org override files in place, maintainer sign-off).
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.
Summary
Make amule-project's
.github/safe to "Sync fork" into amule-org/amule without breaking the active fork.redirect-prs.yml— comment-only auto-reply when a PR is opened on amule-project, pointing at https://github.com/amule-org/amule/pulls. Does not close or lock (maintainers can still merge small fixes from this side).github.repository == 'amule-project/amule'. The YAML still syncs to forks, but every job is a no-op there — so amule-org doesn't end up auto-closing its own issues with a self-referential redirect..github/ISSUE_TEMPLATE/config.ymland.github/pull_request_template.md. Static GitHub config can't carry conditional logic. After a sync, the contact_link inconfig.ymlwould bounce amule-org users to the page they're already on,blank_issues_enabled: falsewould propagate as policy, and the PR template would tell amule-org contributors "this repo is a mirror".Net result: a "Sync fork" pass from amule-project to amule-org is a no-op on amule-org. On amule-project the gated workflows still catch every issue/PR and post the redirect comment — only thing lost on the mirror is the pre-emptive contact-link nudge and the blank-issues block.
Design notes
pull_request_target(notpull_request) — needed to get a write-capableGITHUB_TOKENfor PRs opened from forks. Safe here because the workflow only firesactions/github-script@v7with a hardcoded comment body; noactions/checkout, no contributor-code execution, no fork-controlled input reaches the script.permissions: pull-requests: write— minimum scope forcreateComment. Nocontentsaccess, so a compromised workflow can't push code or alter other workflows.Follow-up
After 3.0.0 ships and amule-org has its own
.github/going forward, the two static files (ISSUE_TEMPLATE/config.yml,pull_request_template.md) can be re-added to amule-project unconditionally as full-strength mirror UX — at that point the repos are intentionally divergent and there's no sync to break.