Skip to content

Commit

Permalink
Merge pull request #35 from BrainLesion/adjust-autoformat-flow
Browse files Browse the repository at this point in the history
Adjust autoformat flow
  • Loading branch information
MarcelRosier authored Dec 19, 2023
2 parents 97fb89e + ce8c00c commit 71b305d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/autoformat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}

- uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch

- uses: actions/checkout@v3
if: success()
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.

- name: Lint with black
uses: psf/black@stable
Expand All @@ -30,13 +38,6 @@ jobs:
src: "."
jupyter: true

- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

jobs:
lint:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion ereg/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def registration_function(
float: The structural similarity index.
"""
if isinstance(config_file, str):
assert os.path.isfile(config_file), 'Config file does not exist.'
assert os.path.isfile(config_file), "Config file does not exist."
elif isinstance(config_file, dict):
pass
else:
Expand Down

0 comments on commit 71b305d

Please sign in to comment.