Commit 83f2686
Add workflow to detect invalid CI command attempts (#2037)
## Summary
This PR adds a GitHub Actions workflow that detects when users try to
use CI commands in PR comments but get the syntax wrong. It provides
helpful guidance on the correct commands and available alternatives.
## Problem
Users sometimes try variations like:
- `/run-ci`
- `/skip-ci`
- `/enable-full-ci`
- `/trigger-tests`
These don't match our actual commands (`/run-skipped-ci`,
`/stop-run-skipped-ci`), so nothing happens and users are left confused.
## Solution
New workflow (`.github/workflows/detect-invalid-ci-commands.yml`) that:
1. **Detects similar commands**: Watches for slash commands containing
CI-related keywords (run, skip, ci, full, trigger, enable, disable,
test, etc.)
2. **Excludes valid commands**: Doesn't trigger for `/run-skipped-ci` or
`/stop-run-skipped-ci`
3. **Posts helpful response**: Provides comprehensive documentation of:
- All available GitHub comment commands
- What each command does
- Requirements and examples
- Local debugging alternatives (CI scripts)
4. **Adds reaction**: Puts a 👀 emoji on the original comment so users
know it was seen
## Example Response
When someone comments `/run-ci`, the bot will respond with:
> 👋 It looks like you may have tried to use a CI command, but it doesn't
match the available commands.
>
> **Invalid command(s) detected:** `/run-ci`
>
> ## Available GitHub Comment Commands
>
> ### 1. `/run-skipped-ci` - Enable Full CI Mode
> [Full documentation...]
>
> ### 2. `/stop-run-skipped-ci` - Disable Full CI Mode
> [Full documentation...]
>
> ### 3. `@claude` - Claude Code AI Review
> [Full documentation...]
>
> ## Local CI Debugging
> [Local alternatives like `bin/ci-rerun-failures`...]
## Testing
- ✅ Validated YAML syntax
- ✅ Tested command detection logic with 10 test cases
- ✅ Verified pattern matching for slash commands
- ✅ Confirmed valid commands are excluded
- ✅ Prettier and RuboCop passing
## Benefits
- **Better DX**: Users get immediate, helpful feedback
- **Self-service**: Reduces need to ask maintainers for help
- **Documentation**: Commands are documented in the response
- **Discoverability**: Users learn about local debugging tools
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/shakacode/react_on_rails/2037)
<!-- Reviewable:end -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Added a workflow that detects potential CI-related slash commands in
PR comments and posts a helpful, formatted response listing detected
commands, usage tips, and debugging/local CI guidance.
* Updated CI trigger behavior to run all workflows when no skipped
checks are found, simplified status and comment messaging, and improved
progress/label reporting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <[email protected]>1 parent 1002154 commit 83f2686
File tree
2 files changed
+192
-15
lines changed- .github/workflows
2 files changed
+192
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| |||
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| |||
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| 208 | + | |
| 209 | + | |
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | | - | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
0 commit comments