|
1 |
| ---- |
2 |
| - |
3 | 1 | name: Source git Automation Scheduled/On Demand
|
4 | 2 | on:
|
5 | 3 | schedule:
|
@@ -59,62 +57,17 @@ jobs:
|
59 | 57 | matrix:
|
60 | 58 | pr-number: ${{ inputs.pr-number == 0 && fromJSON(needs.gather-pull-requests.outputs.pr-numbers) || fromJSON(needs.gather-pull-requests.outputs.pr-numbers-manual) }}
|
61 | 59 |
|
62 |
| - permissions: write-all |
63 |
| - # contents: write |
64 |
| - # statuses: write |
65 |
| - # checks: write |
66 |
| - # pull-requests: write |
| 60 | + permissions: |
| 61 | + # required for merging PRs |
| 62 | + contents: write |
| 63 | + # required for PR comments and setting labels |
| 64 | + pull-requests: write |
67 | 65 |
|
68 | 66 | steps:
|
69 |
| - - name: Repository checkout |
70 |
| - uses: actions/checkout@v3 |
71 |
| - |
72 |
| - - id: metadata |
73 |
| - name: Gather Pull Request Metadata |
74 |
| - uses: redhat-plumbers-in-action/gather-pull-request-metadata@v1 |
| 67 | + - name: Source-git Automation |
| 68 | + uses: redhat-plumbers-in-action/source-git-automation@v1 |
75 | 69 | with:
|
76 | 70 | pr-number: ${{ matrix.pr-number }}
|
77 |
| - |
78 |
| - - if: ${{ !cancelled() }} |
79 |
| - id: commit-linter |
80 |
| - name: Lint Commits |
81 |
| - uses: redhat-plumbers-in-action/advanced-commit-linter@v2 |
82 |
| - with: |
83 |
| - pr-metadata: ${{ steps.metadata.outputs.metadata }} |
84 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
85 |
| - |
86 |
| - # Validates tracker, changes tracker status, updates PR title |
87 |
| - - if: ${{ !cancelled() }} |
88 |
| - id: tracker-validator |
89 |
| - name: Validate Tracker |
90 |
| - uses: redhat-plumbers-in-action/tracker-validator@v1 |
91 |
| - with: |
92 |
| - pr-metadata: ${{ steps.metadata.outputs.metadata }} |
93 |
| - component: systemd |
94 |
| - tracker: ${{ fromJSON(steps.commit-linter.outputs.validated-pr-metadata).validation.tracker.id }} |
95 |
| - tracker-type: ${{ fromJSON(steps.commit-linter.outputs.validated-pr-metadata).validation.tracker.type }} |
96 |
| - bugzilla-instance: https://bugzilla.redhat.com |
97 |
| - bugzilla-api-token: ${{ secrets.BUGZILLA_API_TOKEN }} |
98 |
| - jira-instance: https://issues.redhat.com |
99 |
| - jira-api-token: ${{ secrets.JIRA_API_TOKEN }} |
100 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
101 |
| - |
102 |
| - - if: ${{ !cancelled() }} |
103 |
| - name: Pull Request Validator |
104 |
| - uses: redhat-plumbers-in-action/pull-request-validator@v1 |
105 |
| - with: |
106 |
| - pr-metadata: ${{ steps.metadata.outputs.metadata }} |
107 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
108 |
| - |
109 |
| - - id: auto-merge |
110 |
| - name: Auto Merge |
111 |
| - uses: redhat-plumbers-in-action/auto-merge@v1 |
112 |
| - with: |
113 |
| - pr-metadata: ${{ steps.metadata.outputs.metadata }} |
114 |
| - tracker: ${{ fromJSON(steps.commit-linter.outputs.validated-pr-metadata).validation.tracker.id }} |
115 |
| - tracker-type: ${{ fromJSON(steps.commit-linter.outputs.validated-pr-metadata).validation.tracker.type }} |
116 |
| - bugzilla-instance: https://bugzilla.redhat.com |
117 | 71 | bugzilla-api-token: ${{ secrets.BUGZILLA_API_TOKEN }}
|
118 |
| - jira-instance: https://issues.redhat.com |
119 | 72 | jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
|
120 | 73 | token: ${{ secrets.GITHUB_TOKEN }}
|
0 commit comments