Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kayman-mk committed Jan 6, 2025
1 parent 3294ba7 commit 0446f63
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
});
// remove the checklist paragraph from "# Checklist" to the end of the PR text
const prTextWithoutChecklist = prText.split('\n').slice(0, prText.split('\n').findIndex(line => line.startsWith('# Checklist'))).join('\n');
const prTextWithoutChecklist = prText.split('\n').slice(0, prText.split('\n').
findIndex(line => line.startsWith('# Checklist'))).join('\n');
github.rest.issues.update({
owner: context.repo.owner,
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/default_welcome_message_callable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
# yamllint disable rule:line-length
script: |
message = `Hey @${{ github.event.pull_request.user.login }}! 👋
Expand Down Expand Up @@ -55,4 +54,3 @@ jobs:
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)._'
})
# yamllint enable rule:line-length
42 changes: 42 additions & 0 deletions .github/workflows/this_spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,45 @@ 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 0446f63

Please sign in to comment.