Skip to content

Commit

Permalink
ci: Use gh cli to create PR
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth committed Jan 25, 2024
1 parent d204a52 commit c0cf4ac
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ jobs:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Authenticate GitHub CLI
run: |
gh auth login --with-token ${{ secrets.MY_GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
token: ${{ secrets.MY_GITHUB_TOKEN }}
committer: library-action[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: library-action[bot] <41898282+github-actions[bot]@users.noreply.github.com>
base: trunk
branch: origin/gitbook
title: 'chore(gitbook): Update Gitbook Docs'
body: |
Automated PR to update the gitbook docs.
reviewers: xavierchanth
draft: false
run: |
gh_pr_up() { gh pr create $* || gh pr edit $* }
gh_pr_up \
--base 'trunk' \
--head 'gitbook' \
--title 'chore(gitbook): Update Gitbook Docs' \
--body 'Automated PR to update gitbook docs.' \
--reviewer 'xavierchanth' \
--fill

0 comments on commit c0cf4ac

Please sign in to comment.