Skip to content

ci: add black auto-format workflow (#2827)#2883

Open
priyank766 wants to merge 2 commits intomandiant:masterfrom
priyank766:ci/black-auto-format-2827
Open

ci: add black auto-format workflow (#2827)#2883
priyank766 wants to merge 2 commits intomandiant:masterfrom
priyank766:ci/black-auto-format-2827

Conversation

@priyank766
Copy link

Closes #2827

Adds a GitHub Actions workflow (black-format.yml) that automatically runs black and isort on dependabot PRs, removing the need to manually format code after dependency updates.

How it works:

  • Triggers on pull_request (only runs if the actor is dependabot[bot]) or workflow_dispatch (manual trigger)
  • Runs isort and black with the same configuration used in .pre-commit-config.yaml:
    • --line-length 120
    • Excludes *_pb2.py files
    • Targets capa/, scripts/, tests/, web/rules/scripts/
  • If any files change, it commits and pushes them back to the PR branch automatically

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed
  • This submission includes AI-generated code and I have provided details in the description.

Signed-off-by: priyank <priyank8445@gmail.com>
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@google-cla
Copy link

google-cla bot commented Feb 25, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@priyank766
Copy link
Author

@williballenthin

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.

CI: black create auto-format workflow

1 participant