From 195f1a11ff9c654cc8ecbbf66f0ec12ebdf63e87 Mon Sep 17 00:00:00 2001 From: Susan Shi Date: Tue, 18 Jun 2024 17:31:53 +1000 Subject: [PATCH] Update pr-to-main.yml Signed-off-by: Susan Shi --- .github/workflows/pr-to-main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-to-main.yml b/.github/workflows/pr-to-main.yml index 5815d6742..ee267bb4c 100644 --- a/.github/workflows/pr-to-main.yml +++ b/.github/workflows/pr-to-main.yml @@ -17,11 +17,14 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # https://github.com/marketplace/actions/github-pull-request-action + - name: pull-request + run: | + gh_pr_up() { gh pr create $* || gh pr edit $* } + gh_pr_up --title ${{ github.event.commits[0].message }} --body "This is a automated PR to main" --base main - name: create pull request with reposync action id: open-pr uses: repo-sync/pull-request@7e79a9f5dc3ad0ce53138f01df2fad14a04831c5 #v2.12.1 with: - github_token: ${{ secrets.PR_TOKEN }} destination_branch: main pr_title: ${{ github.event.commits[0].message }} pr_body: "Automated Pull Request"