Skip to content

Commit e80d64e

Browse files
get rid of pull_request event fields (#293)
1 parent c71c7eb commit e80d64e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/docs-push.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: Get branch name
2929
id: get_branch
30-
run: echo "branch_name=sync/${{ github.event.ref }}" >> $GITHUB_ENV
30+
run: echo "branch_name=sync/${{ github.event.ref }}_${{github.event.head_commit.timestamp}}" >> $GITHUB_ENV
3131

3232
- name: Commit changes
3333
env:
@@ -38,16 +38,16 @@ jobs:
3838
git config user.name "${{ github.triggering_actor }}"
3939
git config user.email "mike@dock.io"
4040
# Get the commit message from the merged PR
41-
commit_message="${{ github.event.pull_request.title }}"
41+
commit_message="${{ github.event.head_commit.message }}"
4242
git add -A .
4343
git status
44-
git commit -m "Copy files from ${{ github.event.pull_request.head.repo.full_name }} branch $branch_name: $commit_message"
44+
git commit -m "Copy files from ${{ github.event.repository.full_name }} branch $branch_name: $commit_message"
4545
# Create PR
4646
git ls-remote --get-url origin
4747
git push -u origin ${{ env.branch_name }}
4848
gh pr create \
49-
--body "This PR copies /docs files from ${{ github.event.pull_request.head.repo.full_name }}." \
50-
--title "${{ github.event.pull_request.title }}" \
49+
--body "This PR copies /docs files from ${{ github.event.repository.full_name }}." \
50+
--title "${{ github.event.head_commit.message }}" \
5151
--head "${{ env.branch_name }}" \
5252
--base "main"
5353
echo "Docs successfully pushed to knowledgebase-docs"

0 commit comments

Comments
 (0)