Skip to content

ci: redirect issues/PRs to amule-org + gate workflows + drop mirror-only static files - #919

Merged
mrjimenez merged 2 commits into
amule-project:masterfrom
got3nks:ci/redirect-prs-workflow
Jun 7, 2026
Merged

ci: redirect issues/PRs to amule-org + gate workflows + drop mirror-only static files#919
mrjimenez merged 2 commits into
amule-project:masterfrom
got3nks:ci/redirect-prs-workflow

Conversation

@got3nks

@got3nks got3nks commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Make amule-project's .github/ safe to "Sync fork" into amule-org/amule without breaking the active fork.

  1. New 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).
  2. Both redirect workflows gated on 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.
  3. Drop .github/ISSUE_TEMPLATE/config.yml and .github/pull_request_template.md. Static GitHub config can't carry conditional logic. After a sync, the contact_link in config.yml would bounce amule-org users to the page they're already on, blank_issues_enabled: false would 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 (not pull_request) — needed to get a write-capable GITHUB_TOKEN for PRs opened from forks. Safe here because the workflow only fires actions/github-script@v7 with a hardcoded comment body; no actions/checkout, no contributor-code execution, no fork-controlled input reaches the script.
  • permissions: pull-requests: write — minimum scope for createComment. No contents access, 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.

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.
…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.
@got3nks got3nks changed the title ci: redirect PRs to amule-org + gate both redirect workflows on repo ci: redirect issues/PRs to amule-org + gate workflows + drop mirror-only static files Jun 7, 2026
@mrjimenez
mrjimenez merged commit 16a424b into amule-project:master Jun 7, 2026
7 checks passed
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).
@got3nks
got3nks deleted the ci/redirect-prs-workflow branch June 8, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants