Skip to content

Commit 86b9677

Browse files
authored
Add dependabot as conditional to not fail checks. (#37743)
* Add dependabot as conditional to not fail checks. Dependabot almost always changes submodules and has its own template for PRs. Remove some of the checks for PRs created by dependabot. * Fix dependabot name
1 parent 8a87131 commit 86b9677

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/pr-validation.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# })
4646

4747
- name: Fail if PR instructions were not deleted
48-
if: steps.check-instructions.outcome == 'failure'
48+
if: (steps.check-instructions.outcome == 'failure') && (github.event.pull_request.user.login != 'dependabot[bot]')
4949
run: |
5050
python -c 'import sys; print("PR instructions were not replaced"); sys.exit(1)'
5151
@@ -63,7 +63,8 @@ jobs:
6363
# })
6464

6565
- name: Fail if `### Testing` section not in PR
66-
if: steps.check-testing.outcome == 'failure'
66+
if: (steps.check-testing.outcome == 'failure') && (github.event.pull_request.user.login != 'dependabot[bot]')
67+
6768
run: |
6869
python -c 'import sys; print("Testing section missing (test failed)"); sys.exit(1)'
6970

.github/workflows/third-party-check.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
name: Check For Submodule Update Label
2929
runs-on: ubuntu-latest
3030
steps:
31-
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
32-
name: Fail
31+
- name: Fail
32+
if: (github.event.pull_request.user.login != 'dependabot[bot]') && !contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose')
3333
run: |
3434
echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes.
3535
exit 1
36-
- if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
37-
name: Success
36+
- name: Success
37+
if: contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose')
3838
run: |
3939
echo PR looks good.
4040
exit 0

0 commit comments

Comments
 (0)