Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
Update black.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick2bad4u authored May 17, 2024
1 parent 0ac4fbe commit 1076e4a
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
name: black-formatter

on: [push, pull_request]

jobs:
linter_name:
name: runner / black
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: datadog/action-py-black-formatter@v2.1
id: action_black
- name: Create Pull Request
if: steps.action_black.outputs.is_formatted == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Format Python code with psf/black push"
commit-message: ":art: Format Python code with psf/black"
body: |
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
branch: actions/black
- uses: actions/checkout@v5
- uses: psf/black@stable

0 comments on commit 1076e4a

Please sign in to comment.