diff --git a/.github/workflows/blackformatter.yml b/.github/workflows/blackformatter.yml index c4d91e7..72e7415 100644 --- a/.github/workflows/blackformatter.yml +++ b/.github/workflows/blackformatter.yml @@ -9,11 +9,13 @@ jobs: format-check: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: - name: Checkout code uses: actions/checkout@v4 - with: - persist-credentials: false - name: Set up Python uses: actions/setup-python@v5 @@ -25,11 +27,12 @@ jobs: - name: Run Black run: black . - + - name: Push changes back to the pull request branch - uses: gr2m/create-or-update-pull-request-action@v1 + uses: peter-evans/create-pull-request@v7 with: - author: "github-actions[bot] " - commit-message: "Formatted with Black per repo requirements" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> + branch: main + title: Formatting Code + body: Formatting code with black diff --git a/teleband/submissions/admin.py b/teleband/submissions/admin.py index 228c2b9..61d415a 100644 --- a/teleband/submissions/admin.py +++ b/teleband/submissions/admin.py @@ -18,6 +18,31 @@ class SubmissionAdmin(VersionAdmin): @admin.register(SubmissionAttachment) class SubmissionAttachmentAdmin(VersionAdmin): list_display = ("id", "submission", "file") + + + + + + + + + + + + + + + + + + + + + + + + + raw_id_fields = ("submission",) # list_filter = ("submission",)