We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 147cfa8 commit ecec490Copy full SHA for ecec490
1 file changed
.github/workflows/go-apidiff.yaml
@@ -16,3 +16,22 @@ jobs:
16
go-version-file: go.mod
17
18
- uses: joelanford/go-apidiff@main
19
+ id: check-api
20
+ continue-on-error: true
21
+
22
+ - name: Check for override label
23
+ if: ${{ steps.check-api.outcome == 'failure' }}
24
+ run: |
25
+ if gh api repos/$OWNER/$REPO/pulls/$PR --jq '.labels.[].name' | grep -q "${OVERRIDE_LABEL}"; then
26
+ echo "Found ${OVERRIDE_LABEL} label, overriding failed results."
27
+ exit 0
28
+ else
29
+ echo "No ${OVERRIDE_LABEL} label found, failing the job."
30
+ exit 1
31
+ fi
32
+ env:
33
+ GH_TOKEN: ${{ github.token }}
34
+ OWNER: ${{ github.repository_owner }}
35
+ REPO: ${{ github.event.repository.name }}
36
+ PR: ${{ github.event.pull_request.number }}
37
+ OVERRIDE_LABEL: "go-apidiff-override"
0 commit comments