-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create PRs on other repos with GitHub CLI
No functional change here except removal of the PR number from outputs (URL is more directly available and useful)
- Loading branch information
Showing
1 changed file
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,14 +65,9 @@ jobs: | |
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
path: ${{ env.DESTINATION_REPO_DIR }} | ||
token: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_REPO }} | ||
branch: "nextstrain-bot/test-auspice-pr/${{ steps.detect-pr.outputs.pr-number }}" | ||
commit-message: "[testing only] Upgrade Auspice to ${{ github.sha }}" | ||
author: 'nextstrain-bot <[email protected]>' | ||
committer: 'nextstrain-bot <[email protected]>' | ||
working-directory: ${{ env.DESTINATION_REPO_DIR }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_REPO }} | ||
title: '[bot] [DO NOT MERGE] Test Auspice PR ${{ steps.detect-pr.outputs.pr-number }}' | ||
body: | | ||
This PR has been created to test this project running Auspice with changes from https://github.com/nextstrain/auspice/pull/${{ steps.detect-pr.outputs.pr-number }}. | ||
|
@@ -81,10 +76,18 @@ jobs: | |
This will surface any issues that can arise from merging the PR in Auspice. To address these issues locally, update the source branch (e.g. with a git rebase). | ||
This message and corresponding commits were automatically created by a GitHub Action from [nextstrain/auspice](https://github.com/nextstrain/auspice). | ||
draft: true | ||
delete-branch: true | ||
body_file: pr_body.txt | ||
run: | | ||
git config user.name "nextstrain-bot" | ||
git config user.email "[email protected]" | ||
git switch -c "nextstrain-bot/test-auspice-pr/${{ steps.detect-pr.outputs.pr-number }}" | ||
git commit --message="[testing only] Upgrade Auspice to ${{ github.sha }}" | ||
echo "$body" > "$body_file" | ||
pr_url="$(gh pr create --title "$title" --body-file "$body_file" --draft)" | ||
echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" | ||
- name: Check outputs | ||
run: | | ||
echo "PR number: ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "PR URL: ${{ steps.cpr.outputs.pull-request-url }}" | ||
echo "PR URL: ${{ steps.cpr.outputs.pr_url }}" |