Skip to content

Commit 4db050e

Browse files
justin808claude
andauthored
Add /run-skipped-tests as alias for /run-skipped-ci (#XXXX) (#2068)
## Summary Adds `/run-skipped-tests` as a shorter, more intuitive alias for the `/run-skipped-ci` GitHub PR comment command. ## Problem When users tried `/run-skipped-tests` in PR comments, nothing happened - no workflow triggered and no help message appeared. This was confusing because: 1. The command seemed like it should work (it's more intuitive than `/run-skipped-ci`) 2. The help detection workflow should have caught it and displayed available commands 3. Users were left wondering if the command was broken or if they did something wrong ## Root Cause The `/run-skipped-tests` command wasn't recognized as either valid or invalid, so it fell into a gap where no workflow would trigger. ## Changes 1. **Updated `run-skipped-ci.yml`**: Added `/run-skipped-tests` as an alias that triggers the same workflow 2. **Updated `detect-invalid-ci-commands.yml`**: - Added `/run-skipped-tests` to the valid commands list - Added it to the exclusion filter to prevent false "invalid command" detection - Updated help message to document the alias ## Testing Verified the logic works correctly: - `/run-skipped-tests` now triggers the run-skipped-ci workflow ✅ - `/run-skipped-tests` does NOT trigger the help message (it's valid) ✅ - `/run-skipped-ci` still works as before ✅ - Invalid commands like `/run-foo` still trigger the help message ✅ ## Impact - Users can now use the more intuitive `/run-skipped-tests` command - The existing `/run-skipped-ci` command continues to work - Help messages now document both options 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `/run-skipped-tests` command alias as an alternative way to trigger the skipped CI workflow. * **Documentation** * Updated help text and examples to document both `/run-skipped-ci` and `/run-skipped-tests` command options. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <[email protected]>
1 parent 74cd58b commit 4db050e

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.github/read-me.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ This directory contains GitHub Actions workflows for continuous integration and
44

55
## PR Comment Commands
66

7-
### `/run-skipped-ci` - Run Full CI Suite
7+
### `/run-skipped-ci` (or `/run-skipped-tests`) - Run Full CI Suite
88

99
When you open a PR, CI automatically runs a subset of tests for faster feedback (latest Ruby/Node versions only). To run the **complete CI suite** including all dependency combinations, add a comment to your PR:
1010

1111
```
1212
/run-skipped-ci
13+
# or use the shorter alias:
14+
/run-skipped-tests
1315
```
1416

1517
This command will trigger:
@@ -33,7 +35,7 @@ By default, PRs run a subset of CI jobs to provide fast feedback:
3335
- Skips example generator tests
3436
- Skips some Pro package tests
3537

36-
This is intentional to keep PR feedback loops fast. However, before merging, you should verify compatibility across all supported versions. The `/run-skipped-ci` command makes this easy without waiting for the PR to be merged to master.
38+
This is intentional to keep PR feedback loops fast. However, before merging, you should verify compatibility across all supported versions. The `/run-skipped-ci` (or `/run-skipped-tests`) command makes this easy without waiting for the PR to be merged to master.
3739

3840
### Security & Access Control
3941

@@ -43,11 +45,11 @@ This is intentional to keep PR feedback loops fast. However, before merging, you
4345
- Unauthorized access to Pro package tests
4446
- Potential DoS attacks via repeated CI runs
4547

46-
If an unauthorized user attempts to use `/run-skipped-ci`, they'll receive a message explaining the restriction.
48+
If an unauthorized user attempts to use `/run-skipped-ci` or `/run-skipped-tests`, they'll receive a message explaining the restriction.
4749

4850
### Concurrency Protection
4951

50-
Multiple `/run-skipped-ci` comments on the same PR will cancel in-progress runs to prevent resource waste and duplicate results.
52+
Multiple `/run-skipped-ci` or `/run-skipped-tests` comments on the same PR will cancel in-progress runs to prevent resource waste and duplicate results.
5153

5254
## Testing Comment-Triggered Workflows
5355

@@ -82,7 +84,7 @@ For more details, see [GitHub's documentation on issue_comment events](https://d
8284

8385
### Utility Workflows
8486

85-
- **`run-skipped-ci.yml`** - Triggered by `/run-skipped-ci` comment on PRs
87+
- **`run-skipped-ci.yml`** - Triggered by `/run-skipped-ci` or `/run-skipped-tests` comment on PRs
8688
- **`pr-welcome-comment.yml`** - Auto-comments on new PRs with helpful info
8789
- **`detect-changes.yml`** - Detects which parts of the codebase changed
8890

@@ -109,6 +111,6 @@ Many workflows use change detection to skip unnecessary jobs:
109111

110112
- Runs all jobs on pushes to `master`
111113
- Runs only relevant jobs on PRs based on changed files
112-
- Can be overridden with `workflow_dispatch` or `/run-skipped-ci` command
114+
- Can be overridden with `workflow_dispatch` or `/run-skipped-ci` (or `/run-skipped-tests`) command
113115

114116
See `script/ci-changes-detector` for the change detection logic.

.github/workflows/detect-invalid-ci-commands.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
contains(github.event.comment.body, '/help')
1919
) &&
2020
!contains(github.event.comment.body, '/run-skipped-ci') &&
21+
!contains(github.event.comment.body, '/run-skipped-tests') &&
2122
!contains(github.event.comment.body, '/stop-run-skipped-ci')
2223
runs-on: ubuntu-22.04
2324
permissions:
@@ -42,7 +43,7 @@ jobs:
4243
}
4344
4445
// Valid commands
45-
const validCommands = ['/run-skipped-ci', '/stop-run-skipped-ci'];
46+
const validCommands = ['/run-skipped-ci', '/run-skipped-tests', '/stop-run-skipped-ci'];
4647
4748
// Check if any command is invalid
4849
const invalidCommands = matches
@@ -78,7 +79,7 @@ jobs:
7879
7980
## Available GitHub Comment Commands
8081
81-
### 1. \\\`/run-skipped-ci\\\` - Enable Full CI Mode
82+
### 1. \\\`/run-skipped-ci\\\` (or \\\`/run-skipped-tests\\\`) - Enable Full CI Mode
8283
Triggers all CI workflows that were skipped due to unchanged code.
8384
8485
**What it does:**
@@ -93,6 +94,8 @@ jobs:
9394
**Example:**
9495
\\\`\\\`\\\`
9596
/run-skipped-ci
97+
# or use the shorter alias:
98+
/run-skipped-tests
9699
\\\`\\\`\\\`
97100
98101
---

.github/workflows/run-skipped-ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
github.event.issue.pull_request &&
1717
(
1818
startsWith(github.event.comment.body, '/run-skipped-ci') ||
19-
contains(github.event.comment.body, '\n/run-skipped-ci')
19+
contains(github.event.comment.body, '\n/run-skipped-ci') ||
20+
startsWith(github.event.comment.body, '/run-skipped-tests') ||
21+
contains(github.event.comment.body, '\n/run-skipped-tests')
2022
)
2123
runs-on: ubuntu-22.04
2224
permissions:
@@ -114,10 +116,11 @@ jobs:
114116
115117
// Map workflow names to workflow files
116118
const workflowMap = {
117-
'Main test': 'main.yml',
119+
'Integration Tests': 'integration-tests.yml',
120+
'Rspec test for gem': 'gem-tests.yml',
118121
'Generator tests': 'examples.yml',
119122
'React on Rails Pro - Integration Tests': 'pro-integration-tests.yml',
120-
'React on Rails Pro - Package Tests': 'pro-package-tests.yml',
123+
'React on Rails Pro - Package Tests': 'pro-test-package-and-gem.yml',
121124
'React on Rails Pro - Lint': 'pro-lint.yml'
122125
};
123126

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,14 @@ For more details, see [`docs/CI_OPTIMIZATION.md`](./docs/CI_OPTIMIZATION.md).
426426

427427
React on Rails provides PR comment commands to control CI behavior:
428428

429-
#### `/run-skipped-ci` - Enable Full CI Mode
429+
#### `/run-skipped-ci` (or `/run-skipped-tests`) - Enable Full CI Mode
430430

431431
Runs all skipped CI checks and enables full CI mode for the PR:
432432

433433
```
434434
/run-skipped-ci
435+
# or use the shorter alias:
436+
/run-skipped-tests
435437
```
436438

437439
**What it does:**

0 commit comments

Comments
 (0)