Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(slack-notifications): add documentation for slack notifications [CLK-459223] #239

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/slack-notifications/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Slack notifications

For compliance purposes we need alerts in slack for all CDK repo changes. By default, all `clickup-projen` repos will post alerts for all commits to the `main` branch of your CDK repo to the [`#eng-cdk-release-alerts` slack channel](https://clickup.enterprise.slack.com/archives/C04KH6EKMJ5).

## Customising the slack webhook channel

If you would like to customise the slack channel your repos alerts get posted to, then you can do the following:
1. Create your alert channel in slack
2. Setup a [new Slack webhook](https://api.slack.com/apps/AB50VMKMF/incoming-webhooks?) for your channel. If you don't have access to this slack app, you can ask the eng-prod or IT team to create the webhook for you and share it via 1password.
3. Add your new webhook URL to your repos action secrets with the secret name `PROJEN_RELEASE_SLACK_WEBHOOK` (it should override the organisation level secret)

## Customising the slack webhook title and body

If you would like to override the [default message title and / or body](https://github.com/time-loop/clickup-projen/blob/03ffb318426fc10d31a4267aa4143bf9000263ec/src/slack-alert.ts#L77-L82) posted in the slack alert, you can set the following configuration in your repos `.projenrc.ts`:
```
// .projenrc.ts
const project = new clickupCdk.ClickUpCdkTypeScriptApp({
...rest of props,
sendSlackWebhookOnReleaseOpts: {
messageTitle: 'My custom message title',
messageBody: 'My custom message body',
}
});
```

Then run `npx projen` and commit the changes.
Loading