Skip to content

Commit

Permalink
Try checkout PR head instead of SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamtaranto committed Dec 26, 2024
1 parent 75530e8 commit ec9adac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/Black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Black Formatting
on: [pull_request]
jobs:
black:
if: ${{ github.actor != 'dependabot[bot]' }} # Do not run on commits created by dependabot
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files.
contents: write # Allows reading and writing repository contents (e.g., commits)
pull-requests: write # Allows reading and writing pull requests
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }} # Use a PAT with repo scope

- name: Black Code Formatter
uses: psf/black@stable
Expand Down

0 comments on commit ec9adac

Please sign in to comment.