Confirmation of Owner Details Required - Environment: analytical-platform-management #570
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send Message on Onboarding Issue Close | |
on: | |
workflow_dispatch: | |
issues: | |
types: | |
- closed | |
permissions: | |
contents: read | |
jobs: | |
send-message: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20 | |
- name: Send message to user on onboarding issue close | |
env: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
if: contains(github.event.issue.labels.*.name, 'onboarding') && github.event.issue.state == 'closed' | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
// app.js | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Hello @${{ github.event.issue.user.login }} 👋 Welcome to the Modernisation Platform! Your new accounts have now been created. \ | |
Please see our [user guidance](https://user-guide.modernisation-platform.service.justice.gov.uk/#getting-started) for details on how to build and access infrastructure in the Modernisation Platform. \ | |
If you require help or assistance please contact us via the [#ask-modernisation-platform]((https://moj.enterprise.slack.com/archives/C01A7QK5VM1)) Slack channel. ' | |
}); |