From 6311158fb415fdd8b8e68b0cd631b165cafe42c5 Mon Sep 17 00:00:00 2001 From: Matthias Kay Date: Mon, 6 Jan 2025 14:18:55 +0100 Subject: [PATCH] READY-COMMAND --- .../default_welcome_message_callable.yml | 6 +-- .github/workflows/this_spelling.yml | 42 ------------------- 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/.github/workflows/default_welcome_message_callable.yml b/.github/workflows/default_welcome_message_callable.yml index e6b52e7..957c998 100644 --- a/.github/workflows/default_welcome_message_callable.yml +++ b/.github/workflows/default_welcome_message_callable.yml @@ -36,8 +36,8 @@ jobs: published under this [LICENSE](../blob/main/LICENSE). The following ChatOps commands are supported: - - `/help`: notifies a maintainer to help you out - - `/ready`: marks the PR as ready for review and removes the checklist + - \`/help\`: notifies a maintainer to help you out + - \`/ready\`: marks the PR as ready for review and removes the checklist Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. @@ -52,5 +52,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Hey @${{ github.event.pull_request.user.login }}! 👋\n\nThank you for your contribution to the project. Please refer to the [contribution rules](../blob/main/.github/CONTRIBUTING.md) for a quick overview of the process.\n\nMake sure that this PR clearly explains:\n\n- the problem being solved\n- the best way a reviewer and you can test your changes\n\nWith submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this [LICENSE](../blob/main/LICENSE).\n\nThe following ChatOps commands are supported:\n- `/help`: notifies a maintainer to help you out\n\nSimply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.\n\n_This message was generated automatically. You are welcome to [improve it](https://github.com/Hapag-Lloyd/Workflow-Templates/blob/main/.github/workflows/default_welcome_message_callable.yml)._' + body: message, }) diff --git a/.github/workflows/this_spelling.yml b/.github/workflows/this_spelling.yml index 6871934..10865e3 100644 --- a/.github/workflows/this_spelling.yml +++ b/.github/workflows/this_spelling.yml @@ -9,45 +9,3 @@ jobs: default: uses: Hapag-Lloyd/Workflow-Templates/.github/workflows/default_spelling_callable.yml@main secrets: inherit - - welcome-message: - if: ${{ ! endsWith(github.actor, '[bot]') }} - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - message = `Hey @${{ github.event.pull_request.user.login }}! 👋 - - Thank you for your contribution to the project. Please refer to the [contribution rules](../blob/main/.github/CONTRIBUTING.md) - for a quick overview of the process. - - Make sure that this PR clearly explains: - - - the problem being solved - - the best way a reviewer and you can test your changes - - With submitting this PR you confirm that you hold the rights of the code added and agree that it will - published under this [LICENSE](../blob/main/LICENSE). - - The following ChatOps commands are supported: - - \`/help\`: notifies a maintainer to help you out - - \`/ready\`: marks the PR as ready for review and removes the checklist - - Simply add a comment with the command in the first line. If you need to pass more information, separate it - with a blank line from the command. - - _This message was generated automatically. You are welcome to [improve it](https://github.com/Hapag-Lloyd/Workflow-Templates/blob/main/.github/workflows/default_welcome_message_callable.yml)._` - - // dedent the message - message = message.replace(/^ +/gm, '') - - // adds a comment to the PR (there is the issue API only which works work PRs too) - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: message, - })