Commit ccc6286
Fix PR creation on GitHub App auth path (pass --head to gh pr create)
The GitHub App auth generation path clones repos with `git clone --depth 1`,
which implies --single-branch and only tracks the base branch. After pushing
the generated feature branch, no `refs/remotes/origin/<branch>` tracking ref
exists locally, so `gh pr create` (which auto-detects the pushed head via that
ref) aborts with "you must first push the current branch to a remote, or use
the --head flag" even though the push succeeded.
- create-pull-request.ps1: pass `-H $env:BranchName` and `-R $env:RepoName` to
`gh pr create`, and fail the step on a non-zero exit code instead of always
printing "Pull Request Created successfully."
- language-generation-kiota.yml: thread `BranchName` into the
create-pull-request.ps1 step env so the head branch is available.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f11b751 commit ccc6286
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- .azure-pipelines/generation-templates
- scripts
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
40 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
0 commit comments