-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from Plant-Food-Research-Open/dev
Candidate for 2.0.0
- Loading branch information
Showing
342 changed files
with
16,633 additions
and
2,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
fix-linting: | ||
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords | ||
if: > | ||
contains(github.event.comment.html_url, '/pull/') && | ||
|
@@ -13,36 +13,77 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
# Use the @nf-core-bot token to check out so we can push later | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | ||
with: | ||
token: ${{ secrets.nf_core_bot_auth_token }} | ||
|
||
# indication that the linting is being fixed | ||
- name: React on comment | ||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: eyes | ||
|
||
# Action runs on the issue comment, so we don't get the PR by default | ||
# Use the gh cli to check out the PR | ||
- name: Checkout Pull Request | ||
run: gh pr checkout ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
# Install and run pre-commit | ||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 | ||
with: | ||
python-version: 3.11 | ||
cache: "pip" | ||
python-version: "3.12" | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --all-files || echo "status=fail" >> $GITHUB_ENV | ||
id: pre-commit | ||
run: pre-commit run --all-files | ||
continue-on-error: true | ||
|
||
# indication that the linting has finished | ||
- name: react if linting finished succesfully | ||
if: steps.pre-commit.outcome == 'success' | ||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: "+1" | ||
|
||
- name: Commit & push changes | ||
if: env.status == 'fail' | ||
id: commit-and-push | ||
if: steps.pre-commit.outcome == 'failure' | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "nf-core-bot" | ||
git config push.default upstream | ||
git add . | ||
git status | ||
git commit -m "[automated] Fix linting with pre-commit" | ||
git commit -m "[automated] Fix code linting" | ||
git push | ||
- name: react if linting errors were fixed | ||
id: react-if-fixed | ||
if: steps.commit-and-push.outcome == 'success' | ||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: hooray | ||
|
||
- name: react if linting errors were not fixed | ||
if: steps.commit-and-push.outcome == 'failure' | ||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: confused | ||
|
||
- name: react if linting errors were not fixed | ||
if: steps.commit-and-push.outcome == 'failure' | ||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
@${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. | ||
See [CI log](https://github.com/plant-food-research-open/assemblyqc/actions/runs/${{ github.run_id }}) for more details. |
Oops, something went wrong.