Commit e3de578
authored
⚙️ [Maintenance]: Fix Update-FontsData script: gh CLI json args and hardcoded repo name (#152)
The Update-FontsData workflow script now correctly passes arguments to
the `gh` CLI and uses the `GITHUB_REPOSITORY` environment variable
instead of a hardcoded repository name, making the script portable and
fixing the workflow failure.
- Fixes #151
## Fix `--json` argument parsing
The `--json number, title` argument was split by PowerShell into two
separate arguments (`number,` and `title`), causing `gh` CLI to report
`Unknown JSON field: "number title"`. The argument is now quoted as
`'number,title'` to ensure it is passed as a single value.
## Replace hardcoded repository name with variable
All four occurrences of the hardcoded `'PSModule/GoogleFonts'` repo name
in `gh` CLI calls have been replaced with a `$repoName` variable, set
from `$env:GITHUB_REPOSITORY`. This makes the script work correctly in
any fork or renamed repository without code changes.
## Fix `gh` CLI typo
A typo in the PR close command (`Run h pr close` instead of `Run gh pr
close`) has been corrected.1 parent 57437c4 commit e3de578
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | | - | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
162 | | - | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | | - | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
0 commit comments