Commit bb48bd1
fix: support fork PRs in commit-recordings workflow (#5204)
## Summary
- Fix empty `headRepository.nameWithOwner` from `gh pr view` for fork
PRs by constructing repo name from
`headRepositoryOwner.login/headRepository.name`
- Split checkout in commit-recordings into same-repo and fork paths
since `github.token` cannot clone fork repos
- Use `RELEASE_PAT` (classic PAT with `repo` scope) for fork checkout
and push, as `maintainerCanModify` requires a maintainer's credentials
- Preserve recording artifacts across checkout by moving to `/tmp`
## Test plan
- [x] Verified `headRepository.nameWithOwner` is empty for all PRs via
`gh pr view`
- [x] Verified new `headRepositoryOwner.login/headRepository.name`
construction works for both fork and same-repo PRs
- [x] Verified artifact preserve/restore round-trip
- [ ] Run workflow_dispatch on a fork PR to validate end-to-end
---------
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Co-authored-by: Sébastien Han <seb@redhat.com>1 parent 4e6a48b commit bb48bd1
File tree
2 files changed
+28
-5
lines changed- .github/workflows
2 files changed
+28
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
166 | 188 | | |
167 | 189 | | |
168 | 190 | | |
| |||
186 | 208 | | |
187 | 209 | | |
188 | 210 | | |
189 | | - | |
| 211 | + | |
190 | 212 | | |
191 | 213 | | |
192 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
0 commit comments