Commit c3827ff
committed
Declare GraphQL variables in
The previous query body referenced `$NUMBER_OF_THREADS` and
`$NUMBER_OF_COMMENTS_PER_THREAD` inside `gh api graphql -f query='…'`
without declaring them in the `query(...)` header or forwarding them
via `-F`, so every invocation came back with
`Variable $NUMBER_OF_THREADS is not defined`. The script could not
have completed a single fetch in this state.
Declare `$prComments`, `$reviews`, `$threads`, and `$comments` as
proper GraphQL Int parameters and forward the corresponding
`$NUMBER_OF_*` shell variables — the ones SKILL.md tells the user to
substitute — via matching `-F` flags. Also add a `#!/usr/bin/env bash`
shebang so the script is self-contained, and quote
`-F number="$PR_NUMBER"` for consistency with the other parameters.
The single-quoted redirect path that
fedify-dev#765 (comment)
flagged is already addressed: the prior refactor pointed the redirect
target at the double-quoted `"$FETCHED_FILE"` shell variable, so the
literal `$PR_NUMBER` directory bug it described can no longer occur.
Addresses:
- fedify-dev#765 (comment)
- fedify-dev#765 (comment)
Assisted-by: Claude Code:claude-opus-4-7fetch_reviews.sh
1 parent 096c817 commit c3827ff
1 file changed
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | | - | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| |||
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
19 | | - | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| |||
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
30 | | - | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
37 | | - | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | | - | |
56 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
0 commit comments