-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1376 from alejoe91/black-formatting-action
Add black-formatting action
- Loading branch information
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Black formatting | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * 0" # Weekly at noon UTC on Sundays | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check and apply black formatting | ||
id: black-check | ||
uses: psf/black@stable | ||
with: | ||
options: "--check --verbose" | ||
continue-on-error: true | ||
|
||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v5 | ||
if : ${{ steps.black-check.outcome == 'failure' }} | ||
with: | ||
commit-message: black formatting | ||
title: Black formatting | ||
body: Reformatting code with black style | ||
branch: black-formatting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters