Skip to content

Commit

Permalink
READY-COMMAND
Browse files Browse the repository at this point in the history
  • Loading branch information
kayman-mk committed Jan 6, 2025
1 parent 70a95a9 commit 6311158
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/default_welcome_message_callable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
})
42 changes: 0 additions & 42 deletions .github/workflows/this_spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})

0 comments on commit 6311158

Please sign in to comment.