We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa78cdf commit 5bb18e0Copy full SHA for 5bb18e0
1 file changed
.github/workflows/pr-audit.yml
@@ -0,0 +1,27 @@
1
+name: PR Audit
2
+
3
+on:
4
+ pull_request:
5
+ types: [labeled]
6
7
+jobs:
8
+ gate:
9
+ if: github.event.label.name == 'cyclops'
10
+ runs-on: ubuntu-latest
11
+ outputs:
12
+ allowed: ${{ steps.check.outputs.allowed }}
13
+ steps:
14
+ - id: check
15
+ env:
16
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
+ run: |
18
+ PERM=$(gh api "repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission" --jq '.permission')
19
+ if [ "$PERM" = "admin" ]; then
20
+ echo "allowed=true" >> "$GITHUB_OUTPUT"
21
+ fi
22
23
+ pr-audit:
24
+ needs: gate
25
+ if: needs.gate.outputs.allowed == 'true'
26
+ uses: tempoxyz/gh-actions/.github/workflows/pr-audit.yml@main
27
+ secrets: inherit
0 commit comments