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
45 changes: 5 additions & 40 deletions .agents/skills/finish-line/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: finish-line
description: Bring a blocked React Router community pull request across the finish line. Use when the user invokes `/finish-line` or `$finish-line`, provides a PR number or URL, and asks Codex to resolve merge blockers such as an unsigned CLA, missing change file, missing documentation, or stale contributor follow-up. Handles deciding whether to push small maintainer fixes onto the contributor PR branch or recreate the PR from main under a maintainer branch when the contributor's CLA is not signed.
description: Bring a blocked React Router community pull request across the finish line. Use when the user invokes `/finish-line` or `$finish-line`, provides a PR number or URL, and asks Codex to resolve merge blockers such as a missing change file, missing documentation, missing tests, or stale contributor follow-up. Handles evaluating the blocker and pushing small maintainer fixes onto a contributor PR branch when authorized.
---

# Finish Line

## Overview

Finish blocked community PRs in `remix-run/react-router` while respecting contributor ownership, CLA constraints, and the repo's PR packaging conventions.
Finish blocked community PRs in `remix-run/react-router` while respecting contributor ownership and the repo's PR packaging conventions.

Treat the PR number or URL in `$ARGUMENTS` as the target PR. If no target is provided, ask for it before doing anything.

Expand All @@ -31,8 +31,8 @@ gh pr view <pr> --repo remix-run/react-router --comments

4. Identify merge blockers. In particular:

- If a CLA check or comment shows the author has not signed the CLA, use the unsigned-CLA replacement workflow.
- If the PR only needs repo-maintainer additions such as a change file or docs, use the contributor-branch workflow.
- If the PR only needs repo-maintainer additions such as tests, a change file, or docs, use the contributor-branch workflow.
- If the contributor branch cannot be modified, summarize the evidence and ask the user whether to wait for the contributor or recreate the work on a maintainer branch.
- If the blocker is unclear, summarize the evidence and ask the user which path to take.

5. Evaluate test coverage before deciding the finish-line changes:
Expand All @@ -42,44 +42,9 @@ gh pr view <pr> --repo remix-run/react-router --comments
- If tests are not needed because the change is documentation-only, packaging-only, a change file, or otherwise not executable behavior, note that rationale in the final report.
- If a useful test is required but too large or risky for the finish-line scope, stop and ask the user before broadening the PR.

## Unsigned CLA Replacement

Use this path when the PR author's CLA is not signed. Do not merge, cherry-pick, rebase, or push the contributor's commits. Use the PR diff as the behavior/content reference and recreate the final file changes in maintainer-authored commits from current `origin/main`.

1. Save the original PR title, body, labels, changed-file list, and diff for reference.
2. Create a fresh branch from current main:

```sh
git checkout -B brophdawg11/finish-line-pr-<pr-number> origin/main
```

3. Recreate the same resulting changes on the fresh branch. Keep the implementation as close as possible to the original PR unless main has moved and a tiny adaptation is required.
4. Add any missing finish-line work, such as tests, a change file, or docs, if those are also required.
5. Run focused validation that matches the touched area. Prefer the narrowest meaningful test/build command.
6. Commit the recreated changes with a concise imperative subject.
7. Before pushing/opening the replacement PR, read `.agents/skills/create-pr/SKILL.md` and follow its current branch, PR body, and label guidance unless this skill gives a more specific instruction for replacement PRs.
8. Push the maintainer branch and open a replacement PR against `main`.
- Reuse the original title unless it is misleading.
- Use a similar description, but make it clear this is a agent/maintainer-authored replacement.
- Include the old PR number in the description (`#<pr-number>`).
- Default to a ready PR when validation passed and the original PR was otherwise mergeable; use a draft PR if validation is incomplete or the original PR was draft.
- Apply the relevant labels from the original PR plus any package/feature labels required by `.agents/skills/create-pr/SKILL.md`.
9. Comment on the original PR and close it after the replacement PR exists:

```markdown
Thanks for the PR! We can't merge this without the CLA being signed, so we're going to re-implement this work in #<new-pr-number> to keep this moving.
```

Then run:

```sh
gh pr comment <old-pr-number> --repo remix-run/react-router --body-file <comment-file>
gh pr close <old-pr-number> --repo remix-run/react-router
```

## Contributor-Branch Workflow

Use this path when the contributor's CLA is signed and the missing work is small maintainer follow-up, such as a change file or docs.
Use this path when the missing work is a small maintainer follow-up, such as tests, a change file, or docs, and the contributor branch can be modified.

1. Check out the PR branch:

Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/change-file-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Change File Check

on:
pull_request:
branches: [main, v7]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read

jobs:
check:
# Keep the existing required-check context while replacing its behavior.
name: PR Checks
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest

steps:
# Execute only the trusted main branch version of the check, never code
# supplied by the pull request.
- name: Checkout trusted main branch
uses: actions/checkout@v7
with:
ref: main
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@v6.0.10

- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: pnpm

- name: Install deps
run: pnpm install --frozen-lockfile

- name: Check for package change files
env:
GITHUB_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: node scripts/change-file-check.ts
38 changes: 38 additions & 0 deletions .github/workflows/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Feature Request

on:
pull_request_target:
types: [labeled]

permissions: {}

jobs:
close-feature-request:
name: Close Feature Request
if: >
github.repository == 'remix-run/react-router' &&
github.event.label.name == 'feature-request'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

# SECURITY WARNING: This job runs in the privileged pull_request_target
# context with write access to pull requests and issues. NEVER checkout PR
# code, execute repository code, install dependencies, use a third-party
# action, or interpolate PR-controlled values into commands. Keep this job
# limited to fixed gh CLI commands using trusted event metadata.
steps:
- name: Comment and close
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMENT_BODY: |
To align with our new [Open Governance](https://remix.run/blog/rr-governance) model, we are now asking that all new features go through the [Proposal/RFC process](https://github.com/remix-run/react-router/blob/main/GOVERNANCE.md#new-feature-process) and that we don't open PRs until a proposal has been accepted and advanced to Stage 1.
If this feature doesn't have a Proposal, please [open one](https://github.com/remix-run/react-router/discussions/new?category=proposals) so we can evaluate/discuss the proposed feature. You can link to this PR as an example of a potential implementation and we can re-open it if the proposal advances.
If this PR already has a Proposal but it has not yet been accepted, let's continue the discussion in the Proposal until it gets accepted and then we can look to open a PR. Feel free to link to this PR or to a branch in a forked repo to show what a potential implementation might look like.
If you have any questions, you can always reach out on [Discord](https://remix.run/discord). Thanks again for providing feedback and helping us make React Router even better!
run: gh pr close "$PR_NUMBER" --repo remix-run/react-router --comment "$COMMENT_BODY"
3 changes: 0 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Install deps
run: pnpm install --frozen-lockfile

- name: Sort contributors.yml
run: sort --ignore-case --output contributors.yml contributors.yml

- name: Format
run: pnpm format

Expand Down
Loading