diff --git a/.github/workflows/blackformatter.yml b/.github/workflows/blackformatter.yml index c4d91e7..3fddc95 100644 --- a/.github/workflows/blackformatter.yml +++ b/.github/workflows/blackformatter.yml @@ -1,7 +1,7 @@ name: Check Python Code Formatting on: - pull_request: + pull_request_target: branches: - main @@ -25,11 +25,14 @@ jobs: - name: Run Black run: black . - + - name: Push changes back to the pull request branch uses: gr2m/create-or-update-pull-request-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + title: "Formatting" + body: "Formatted python files with black" + branch: "main" author: "github-actions[bot] " commit-message: "Formatted with Black per repo requirements" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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",)