Skip to content

Commit 3b50515

Browse files
authored
fix(ci): prevent spurious Dependabot PR failures from auto-approve and @types/vscode bumps (#143)
* fix(ci): stop broken auto-approve runs for Dependabot and ignore @types/vscode - Remove dependabot[bot] from auto-approve.yml condition. That workflow runs on pull_request (no secrets for Dependabot) and always failed the create-github-app-token step, producing a permanent red 'auto-approve' check on every Dependabot PR. - Dependabot approval + auto-merge (patch/minor) is already handled by the dedicated dependabot-auto-merge.yml on pull_request_target. - Add @types/vscode to dependabot ignore for npm. vsce package enforces that the @types/vscode version must not exceed engines.vscode. Bumps produced failing 'build' jobs (package step). - New Dependabot PRs will no longer have spurious failures. Majors still require manual review per existing policy. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> * ci(security): pin Gitleaks version to avoid rate-limit 404s on install The previous dynamic fetch of 'latest' via unauthenticated GitHub API was brittle: - Rate limits (60/hr unauth) often return error JSON instead of release. - grep/cut produces empty GITLEAKS_VERSION. - Download URL becomes invalid → 404 + tar failure. This caused the 'Gitleaks secret detection' job to fail on PR #143 (even though the PR changes are unrelated to secrets scanning). Fix: pin to a recent stable release (8.30.1) with comment for future updates. This is consistent with how other tools/actions are handled in the repo. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> --------- Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent bf2f270 commit 3b50515

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ updates:
77
labels:
88
- dependencies
99
open-pull-requests-limit: 10
10+
ignore:
11+
# @types/vscode must be kept in sync with engines.vscode (vsce enforces
12+
# @types/vscode version <= declared engine). Update both together when
13+
# raising the minimum supported VS Code version.
14+
- dependency-name: "@types/vscode"
1015

1116
- package-ecosystem: github-actions
1217
directory: /

.github/workflows/auto-approve.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
if: >-
2323
github.event.pull_request.user.login != 'github-actions[bot]' &&
2424
(github.actor == 'SebTardif' ||
25-
github.actor == 'dependabot[bot]' ||
2625
github.actor == 'patchloom-release[bot]')
2726
steps:
2827
- name: Harden runner

.github/workflows/security.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ jobs:
8383
fetch-depth: 0
8484

8585
- name: Install Gitleaks
86+
# Pinned version to avoid flakiness from unauthenticated /releases/latest
87+
# (rate limits cause empty version → 404 on download). Update periodically.
8688
run: |
87-
GITLEAKS_VERSION=$(curl -s https://api.github.com/repos/gitleaks/gitleaks/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')
89+
GITLEAKS_VERSION=8.30.1
8890
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" | sudo tar -xz -C /usr/local/bin gitleaks
8991
9092
- name: Run Gitleaks

0 commit comments

Comments
 (0)