From a48d8b118d2be30d468eb59c0d91f62608dc68ee Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 20 Aug 2024 11:38:45 -0400 Subject: [PATCH] ENH: Re-factor commit-message.yml workflow to reuse Slicer workflow --- .github/workflows/commit-message.yml | 23 +------------------ .../.github/workflows/commit-message.yml | 23 +------------------ 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/.github/workflows/commit-message.yml b/.github/workflows/commit-message.yml index f8f75bc..ad9e259 100644 --- a/.github/workflows/commit-message.yml +++ b/.github/workflows/commit-message.yml @@ -15,25 +15,4 @@ permissions: jobs: check-commit-message: - name: Check Commit Message - runs-on: ubuntu-latest - steps: - - name: Check Commit Prefix - uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 - with: - pattern: "^(ENH|PERF|BUG|STYLE|DOC|COMP): ([A-Z])+" - flags: "gm" - excludeDescription: "true" # optional: this excludes the description body of a pull request - excludeTitle: "true" # optional: this excludes the title of a pull request - error: 'The first line has to start with a commit prefix, followed by a colon and space, and then followed by a message with a capital letter (e.g "ENH: Add support for awesome feature"). For more details on other requirements, see https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits' - checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request - accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true - - name: Check Line Length - uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 - with: - pattern: "^[^#].{1,78}$" - error: "The maximum line length of 78 characters is exceeded. For more details, see https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits" - excludeDescription: "true" # optional: this excludes the description body of a pull request - excludeTitle: "true" # optional: this excludes the title of a pull request - checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request - accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true + uses: Slicer/Slicer/.github/workflows/commit-message.yml@80a7735c1a419a31ec3131815efe77ad9e0a89f0 # main diff --git a/{{cookiecutter.project_name}}/.github/workflows/commit-message.yml b/{{cookiecutter.project_name}}/.github/workflows/commit-message.yml index 7892fe2..ad9e259 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/commit-message.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/commit-message.yml @@ -15,25 +15,4 @@ permissions: jobs: check-commit-message: - name: Check Commit Message - runs-on: ubuntu-latest - steps: - - name: Check Commit Prefix - uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 - with: - pattern: "^(ENH|PERF|BUG|STYLE|DOC|COMP): ([A-Z])+" - flags: "gm" - excludeDescription: "true" # optional: this excludes the description body of a pull request - excludeTitle: "true" # optional: this excludes the title of a pull request - error: 'The first line has to start with a commit prefix, followed by a colon and space, and then followed by a message with a capital letter (e.g "ENH: Add support for awesome feature"). For more details on other requirements, see https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits' - checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request - accessToken: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} # github access token is only required if checkAllCommitMessages is true - - name: Check Line Length - uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 - with: - pattern: "^[^#].{1,78}$" - error: "The maximum line length of 78 characters is exceeded. For more details, see https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits" - excludeDescription: "true" # optional: this excludes the description body of a pull request - excludeTitle: "true" # optional: this excludes the title of a pull request - checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request - accessToken: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} # github access token is only required if checkAllCommitMessages is true + uses: Slicer/Slicer/.github/workflows/commit-message.yml@80a7735c1a419a31ec3131815efe77ad9e0a89f0 # main