Skip to content

chore: skip full CI for secrets baseline commits#5012

Open
lucarlig wants to merge 1 commit into
mainfrom
user/luca/secret-baseline-ci-guard
Open

chore: skip full CI for secrets baseline commits#5012
lucarlig wants to merge 1 commit into
mainfrom
user/luca/secret-baseline-ci-guard

Conversation

@lucarlig
Copy link
Copy Markdown
Collaborator

@lucarlig lucarlig commented Jun 2, 2026

🔗 Related Issue

Closes #4953


📝 Summary

Adds a shared CI decision script for secrets-baseline-only latest commits. Full CI is skipped only when the latest commit modifies only .secrets.baseline and the parent commit already has a successful run for the same workflow and event.

The PR workflows that fired in validation now gate their heavy jobs on that decision. Pre-commit still runs detect-secrets validation on the fast path, while Tests & Coverage, Rust CI, Build Python Package, and Vitest skip their heavy jobs after a completed parent run.


🏷️ Type of Change

  • Bug fix
  • Feature / Enhancement
  • Documentation
  • Refactor
  • Chore (deps, CI, tooling)
  • Other (describe below)

🧪 Verification

Check Command Status
Decision unit tests uv run pytest tests/unit/test_secret_baseline_ci_decision_workflow.py -q Pass
Workflow YAML parse ruby -e 'require "yaml"; ARGV.each { |f| YAML.load_file(f) }; puts "yaml ok"' .github/workflows/*.yml Pass
Workflow lint actionlint -shellcheck= .github/workflows/*.yml Pass
Diff whitespace git diff --check origin/main Pass
Secrets validation make --no-print-directory detect-secrets-hook Pass
Local Actions PR decision act pull_request -W .github/workflows/pre-commit.yml -j ci-decision ... Pass
GitHub test 1 Baseline-only commit with incomplete parent ran full PR CI Pass
GitHub test 2 Baseline-only commit with completed parent skipped heavy PR jobs and ran detect-secrets Pass
Commit hooks git commit -s Pass

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Tests added/updated for changes
  • Documentation updated (if applicable)
  • No secrets or credentials committed

📓 Notes (optional)

The secrets-detection-only allowlist is intentionally narrow: one modified .secrets.baseline file.


GitHub CI validation proof

Dummy PRs were opened with do-not-merge, used only to validate this CI behavior, then closed after verification:

Copy link
Copy Markdown
Collaborator

@madhu-mohan-jaishankar madhu-mohan-jaishankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

brian-hussey
brian-hussey previously approved these changes Jun 4, 2026
Copy link
Copy Markdown
Member

@brian-hussey brian-hussey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@brian-hussey brian-hussey enabled auto-merge June 4, 2026 09:44
@brian-hussey brian-hussey disabled auto-merge June 4, 2026 10:00
@lucarlig lucarlig force-pushed the user/luca/secret-baseline-ci-guard branch from 737fcad to 8586a57 Compare June 4, 2026 13:56
Signed-off-by: lucarlig <luca.carlig@ibm.com>
@lucarlig lucarlig force-pushed the user/luca/secret-baseline-ci-guard branch from 8586a57 to 2ce130b Compare June 5, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE][CICD]: Skip full CI for detect-secrets baseline-only commits

3 participants