From 8a803f64abf6cd99d00d9b4b738fff0f9299d9ed Mon Sep 17 00:00:00 2001 From: EDM115 Date: Mon, 22 Jan 2024 16:32:48 +0100 Subject: [PATCH] updated Black code style action due to branch protections rules --- .github/workflows/black-code-style.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/black-code-style.yml b/.github/workflows/black-code-style.yml index b84b7c29..6acce625 100644 --- a/.github/workflows/black-code-style.yml +++ b/.github/workflows/black-code-style.yml @@ -22,11 +22,18 @@ jobs: git config --local user.email ${{ secrets.MAIL }} git config --local user.name ${{ secrets.USERNAME }} git add -A - git commit -m "Code style changed to Black at ${d}" - - name: Push commit - uses: ad-m/github-push-action@v0.8.0 + git commit -m "Code style changed to Black at ${d}" || echo "No changes to commit" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 with: - force: true - directory: "." - branch: ${{ github.ref }} - github_token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Apply Black code style" + title: "Apply Black code style" + body: | + This pull request is auto-generated by the Black Code Formatter GitHub action. + Please review the changes before merging. + labels: style + branch: format-code-${{ github.run_number }} + assignees: EDM115 + reviewers: EDM115 + draft: true + token: ${{ secrets.GITHUB_TOKEN }}