Skip to content

Commit d2172e0

Browse files
authored
Update site-policy-sync.yml
Passes closed PR title as pushed commit message and assigns authorship to site-policy-bot
1 parent 944538d commit d2172e0

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

.github/workflows/site-policy-sync.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,9 @@ jobs:
3131
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3232
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
3333
# Sets commit message
34-
- name: default message
35-
run: |
36-
echo "MESSAGE=Automatic sync with changes from GitHub Docs" >> $GITHUB_ENV
3734
- name: custom message
38-
if: contains(github.event.pull_request.body, '### Public summary for site-policy changes:')
3935
run: |
40-
NEW=$(echo $MESSAGE | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g')
41-
NEW2=$(echo $NEW | sed 's/^.*### Public summary for site-policy changes://')
42-
echo MESSAGE=$NEW2 >> $GITHUB_ENV
43-
env:
44-
MESSAGE: >
45-
${{github.event.pull_request.body}}
36+
echo "MESSAGE=${{github.event.pull_request.title}}" >> $GITHUB_ENV
4637
4738
# Pushes to other repo
4839
- name: Push folder to another repository
@@ -55,6 +46,6 @@ jobs:
5546
destination_branch: 'main'
5647
destination_branch_create: 'repo-sync'
5748
destination_folder: 'Policies'
58-
user_email: 'pcihon@users.noreply.github.com'
59-
user_name: 'pcihon'
49+
user_email: 'site-policy-bot@users.noreply.github.com'
50+
user_name: 'site-policy-bot'
6051
commit_msg: '${{ env.MESSAGE }}'

0 commit comments

Comments
 (0)