Skip to content

test #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/blackformatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,11 +27,19 @@ jobs:

- name: Run Black
run: black .


- name: Commit changes if formatting is needed
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --cached --exit-code || git commit -m "Auto-format code with 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] <github-actions[bot]@users.noreply.github.com>"
commit-message: "Formatted with Black per repo requirements"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
base: ${{ github.head_ref }}
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
title: Formatting Code
body: Formatting code with black
16 changes: 16 additions & 0 deletions teleband/assignments/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ class AssignmentInline(admin.TabularInline):

@admin.register(AssignmentGroup)
class AssignmentGroupAdmin(VersionAdmin):
















list_display = (
"id",
"type",
Expand Down
25 changes: 25 additions & 0 deletions teleband/submissions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",)

Expand Down