10000 Open PR with gh CLI · github/codeql-action@07e43a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 07e43a2

Browse files
committed
Open PR with gh CLI
1 parent 9d2dd7c commit 07e43a2

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/update-supported-enterprise-server-versions.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,22 @@ jobs:
3535
npm run build
3636
env:
3737
ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/
38-
- name: Commit Changes
39-
uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v5.0.1
40-
with:
41-
commit-message: Update supported GitHub Enterprise Server versions.
42-
title: Update supported GitHub Enterprise Server versions.
43-
body: ""
44-
author: GitHub <noreply@github.com>
45-
branch: update-supported-enterprise-server-versions
46-
draft: true
38+
39+
- name: Update git config
40+
run: |
41+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+
git config --global user.name "github-actions[bot]"
43+
44+
- name: Commit changes and open PR
4745
env:
4846
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
run: |
48+
if [[ -z $(git status --porcelain) ]]; then
49+
echo "No changes to commit"
50+
else
51+
git checkout -b update-supported-enterprise-server-versions
52+
git add .
53+
git commit --message "Update supported GitHub Enterprise Server versions"
54+
git push
55+
gh pr create --fill --draft
56+
fi

0 commit comments

Comments
 (0)
0