From 081e9c051f02fd95590fb22ce775e09a91c88249 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Nov 2023 03:20:28 +0000 Subject: [PATCH 1/3] chore(release): 1.1.3 [skip ci] ## [1.1.3](https://github.com/lpm0073/automatic-grader/compare/v1.1.2...v1.1.3) (2023-11-28) ### Bug Fixes * add shell ([3604be4](https://github.com/lpm0073/automatic-grader/commit/3604be4f70eb709993fe4f91d8edda87642ad005)) * git pull before push ([fad074a](https://github.com/lpm0073/automatic-grader/commit/fad074a9b799efdf3869e98baceb724c54ce83c0)) * run prettier with npx ([a46356e](https://github.com/lpm0073/automatic-grader/commit/a46356ef9bd3378114a1036dcc8c6eff8e016597)) --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47df972..f49bedc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.1.3](https://github.com/lpm0073/automatic-grader/compare/v1.1.2...v1.1.3) (2023-11-28) + + +### Bug Fixes + +* add shell ([3604be4](https://github.com/lpm0073/automatic-grader/commit/3604be4f70eb709993fe4f91d8edda87642ad005)) +* git pull before push ([fad074a](https://github.com/lpm0073/automatic-grader/commit/fad074a9b799efdf3869e98baceb724c54ce83c0)) +* run prettier with npx ([a46356e](https://github.com/lpm0073/automatic-grader/commit/a46356ef9bd3378114a1036dcc8c6eff8e016597)) + ## [1.1.2](https://github.com/lpm0073/automatic-grader/compare/v1.1.1...v1.1.2) (2023-11-28) From 45721fe098bc59d85ba21c68474ae8bad2c2b1b1 Mon Sep 17 00:00:00 2001 From: lpm0073 Date: Mon, 27 Nov 2023 21:28:11 -0600 Subject: [PATCH 2/3] refactor: don't run pr controller on main --- .github/actions/tests/pre-commit/action.yml | 13 ------------- .github/workflows/pullRequestController.yml | 8 ++++++++ .github/workflows/runTests.yml | 7 +++++++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/actions/tests/pre-commit/action.yml b/.github/actions/tests/pre-commit/action.yml index e938cfa..d218fcf 100644 --- a/.github/actions/tests/pre-commit/action.yml +++ b/.github/actions/tests/pre-commit/action.yml @@ -101,19 +101,6 @@ runs: run: | npx prettier --write --log-level silent . - - name: Lint commit and push - id: lint-commit-and-push - shell: bash - run: | - git pull - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add . - git commit -m "chore: [gh] lint w black / prettier [skip ci]" - git push https://${{ env.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }} - env: - GITHUB_TOKEN: ${{ inputs.github-token }} - # see: https://pre-commit.ci/lite.html - name: pre-commit id: pre-commit diff --git a/.github/workflows/pullRequestController.yml b/.github/workflows/pullRequestController.yml index 4bc54b9..e87308b 100644 --- a/.github/workflows/pullRequestController.yml +++ b/.github/workflows/pullRequestController.yml @@ -21,6 +21,12 @@ name: Pull Request Controller on: workflow_dispatch: + push: + branches-ignore: + - main + pull_request: + branches-ignore: + - main # GitHub Copilot: The `pull_request` and `pull_request_target` are two different # event types in GitHub Actions that trigger workflows when activity related @@ -43,6 +49,8 @@ on: # In general, use `pull_request` for workflows that need to access the code in the pull request, # and `pull_request_target` for workflows that need to be safe for pull requests from forks. pull_request_target: + branches-ignore: + - main types: [ opened, diff --git a/.github/workflows/runTests.yml b/.github/workflows/runTests.yml index 71a8d61..5cc0db8 100644 --- a/.github/workflows/runTests.yml +++ b/.github/workflows/runTests.yml @@ -6,6 +6,13 @@ name: Run all tests on: workflow_dispatch: + push: + branches-ignore: + - main + pull_request: + branches-ignore: + - main + env: python-version: "3.11" From 8521a2e23887715e55f04b23c3ab3cb825196dfa Mon Sep 17 00:00:00 2001 From: lpm0073 Date: Mon, 27 Nov 2023 21:49:43 -0600 Subject: [PATCH 3/3] refactor: flow of control tweaks --- .github/actions/tests/pre-commit/action.yml | 4 ---- .github/workflows/pullRequestController.yml | 21 +------------------ .github/workflows/runTests.yml | 7 ------- .../workflows/semanticVersionBumpMerge.yml | 1 + CHANGELOG.md | 3 +-- __version__.py | 3 ++- grader/__version__.py | 3 ++- 7 files changed, 7 insertions(+), 35 deletions(-) diff --git a/.github/actions/tests/pre-commit/action.yml b/.github/actions/tests/pre-commit/action.yml index d218fcf..7e92a41 100644 --- a/.github/actions/tests/pre-commit/action.yml +++ b/.github/actions/tests/pre-commit/action.yml @@ -11,10 +11,6 @@ inputs: description: "The version of Python to use, such as 3.11.0" required: true type: string - github-token: - description: "The GitHub token to use for pushing changes to the repository" - required: true - type: string runs: using: "composite" diff --git a/.github/workflows/pullRequestController.yml b/.github/workflows/pullRequestController.yml index e87308b..9255aa8 100644 --- a/.github/workflows/pullRequestController.yml +++ b/.github/workflows/pullRequestController.yml @@ -21,13 +21,6 @@ name: Pull Request Controller on: workflow_dispatch: - push: - branches-ignore: - - main - pull_request: - branches-ignore: - - main - # GitHub Copilot: The `pull_request` and `pull_request_target` are two different # event types in GitHub Actions that trigger workflows when activity related # to pull requests occurs. @@ -49,18 +42,7 @@ on: # In general, use `pull_request` for workflows that need to access the code in the pull request, # and `pull_request_target` for workflows that need to be safe for pull requests from forks. pull_request_target: - branches-ignore: - - main - types: - [ - opened, - closed, - synchronize, - edited, - ready_for_review, - review_requested, - assigned, - ] + types: [opened, closed, synchronize, edited] paths: - "**.py" - "**.requirements.txt" @@ -144,4 +126,3 @@ jobs: uses: ./.github/actions/tests/pre-commit with: python-version: "${{ env.python-version}}" - github-token: ${{ secrets.PAT }} diff --git a/.github/workflows/runTests.yml b/.github/workflows/runTests.yml index 5cc0db8..1971f5a 100644 --- a/.github/workflows/runTests.yml +++ b/.github/workflows/runTests.yml @@ -6,12 +6,6 @@ name: Run all tests on: workflow_dispatch: - push: - branches-ignore: - - main - pull_request: - branches-ignore: - - main env: python-version: "3.11" @@ -37,4 +31,3 @@ jobs: uses: ./.github/actions/tests/pre-commit with: python-version: "${{ env.python-version}}" - github-token: ${{ secrets.PAT }} diff --git a/.github/workflows/semanticVersionBumpMerge.yml b/.github/workflows/semanticVersionBumpMerge.yml index dd6374a..5baabfd 100644 --- a/.github/workflows/semanticVersionBumpMerge.yml +++ b/.github/workflows/semanticVersionBumpMerge.yml @@ -77,6 +77,7 @@ jobs: if: env.VERSION_CHANGED == 'true' id: update_version run: | + echo "# -*- coding: utf-8 -*-" > __version__.py echo "__version__ = '${{ env.NEXT_VERSION }}'" > __version__.py git config --local user.email "action@github.com" git config --local user.name "GitHub Action" diff --git a/CHANGELOG.md b/CHANGELOG.md index 47df972..09fdf8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,8 @@ ## [1.1.2](https://github.com/lpm0073/automatic-grader/compare/v1.1.1...v1.1.2) (2023-11-28) - ### Bug Fixes -* add shell ([0f03b26](https://github.com/lpm0073/automatic-grader/commit/0f03b2655cbf4ffd32d65cf1ac45773bd05d2cb1)) +- add shell ([0f03b26](https://github.com/lpm0073/automatic-grader/commit/0f03b2655cbf4ffd32d65cf1ac45773bd05d2cb1)) ## [1.1.1](https://github.com/lpm0073/automatic-grader/compare/v1.1.0...v1.1.1) (2023-11-28) diff --git a/__version__.py b/__version__.py index 7bb021e..2343618 100644 --- a/__version__.py +++ b/__version__.py @@ -1 +1,2 @@ -__version__ = '1.1.3' +# -*- coding: utf-8 -*- +__version__ = "1.1.3" diff --git a/grader/__version__.py b/grader/__version__.py index 7bb021e..2343618 100644 --- a/grader/__version__.py +++ b/grader/__version__.py @@ -1 +1,2 @@ -__version__ = '1.1.3' +# -*- coding: utf-8 -*- +__version__ = "1.1.3"