forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 1.11 KB
/
autoformat2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Autoformat code - push results
on:
workflow_run:
workflows: ["Autoformat code"]
types:
- completed
# This action needs the following permissions in order to push the results back to the original branch.
permissions:
pull-requests: write
contents: write
jobs:
push-and-notify:
name: Push autoformatted code and notify user
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Push autoformatted patch'
uses: rolfbjarne/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
git_user_email: '[email protected]'
git_user_name: 'GitHub Actions Autoformatter'
commentContents: '# :warning: Your code has been reformatted. :warning:\n\nIf this is not desired, add the `actions-disable-autoformat` label, and revert the reformatting commit.\n\nIf files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).'