{"id":15714337,"url":"https://github.com/rennf93/good-comms","last_synced_at":"2025-04-30T20:46:53.690Z","repository":{"id":249307504,"uuid":"831096499","full_name":"rennf93/good-comms","owner":"rennf93","description":"This GitHub Action sends notifications to a Slack channel. It can send a new message or reply to an existing thread based on the provided inputs.","archived":false,"fork":false,"pushed_at":"2025-03-17T11:14:03.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T20:56:42.231Z","etag":null,"topics":["github-actions","notification-service","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rennf93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-19T16:44:23.000Z","updated_at":"2025-04-06T02:03:26.000Z","dependencies_parsed_at":"2024-07-26T00:06:46.326Z","dependency_job_id":"8c77b4dc-1f17-4770-9752-1a83733f221c","html_url":"https://github.com/rennf93/good-comms","commit_stats":null,"previous_names":["rennf93/good-comms"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rennf93%2Fgood-comms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rennf93%2Fgood-comms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rennf93%2Fgood-comms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rennf93%2Fgood-comms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rennf93","download_url":"https://codeload.github.com/rennf93/good-comms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251780424,"owners_count":21642772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","notification-service","slack"],"created_at":"2024-10-03T21:36:13.888Z","updated_at":"2025-04-30T20:46:53.663Z","avatar_url":"https://github.com/rennf93.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Good Comms\n\nThis GitHub Action sends notifications to a Slack channel. It can send a new message or reply to an existing thread based on the provided inputs.\n\nInspired by [rtCamp/action-slack-notify](https://github.com/rtCamp/action-slack-notify).\n\n## Features\n\n- Send a new message to a Slack channel\n- Reply to an existing thread in a Slack channel\n- Automatically thread messages by matching author names\n- Customize the message with author details, title, and color\n\n## Setup\n\n1. Create a Slack App in your workspace\n2. Add these Bot Token Scopes:\n   - `chat:write`\n   - `chat:write.public`\n   - `channels:history`\n   - `groups:history`\n3. Install the app to your workspace\n4. Copy the Bot User OAuth Token\n5. Create a webhook for your channel\n6. Add both the token and webhook URL as GitHub secrets\n\n## Threading Behavior\n\nThe action automatically handles message threading by matching the `AUTHOR_NAME` parameter. When sending a message:\n- If no `SLACK_THREAD_TS` is provided, it will look for the most recent message from the same author\n- If a matching author is found, the new message will be threaded to that message\n- If no matching author is found, a new message thread will be started\n\nThis allows you to maintain separate threads for different types of notifications (e.g., \"Deployment\", \"Tests\", \"Build\") without manually managing thread timestamps.\n\n## Inputs\n\n| Input Name         | Description                                     | Required |\n| ------------------ | ----------------------------------------------- | -------- |\n| `SLACK_WEBHOOK`    | Slack webhook URL for sending messages          | true     |\n| `STATUS`           | Status of the notification (e.g., success, fail)| false    |\n| `AUTHOR_NAME`      | Name of the message author                      | false    |\n| `AUTHOR_LINK`      | Link for the message author                     | false    |\n| `AUTHOR_ICON`      | Icon URL for the message author                 | false    |\n| `TITLE`            | Title of the message                            | false    |\n| `TITLE_LINK`       | Link for the message title                      | false    |\n| `MESSAGE`          | The message content                             | true     |\n| `COLOR`            | Color of the message attachment                 | false    |\n| `SLACK_TOKEN`      | Slack token for sending replies                 | true     |\n| `CHANNEL_ID`       | Slack channel ID for sending replies            | true     |\n| `SLACK_THREAD_TS`  | Timestamp of the thread to reply to             | false    |\n\n## Outputs\n\nThis action sets the following outputs:\n\n| Output Name        | Description                                     |\n| ------------------ | ----------------------------------------------- |\n| `SLACK_THREAD_TS`  | Timestamp of the Slack thread                   |\n| `SLACK_CHANNEL`    | Slack channel ID                                |\n| `SLACK_MESSAGE_ID` | ID of the sent Slack message                    |\n\n## Usage\n\nTo use this action in your workflow, add the following step:\n\n```yaml\n- name: Send Slack Communication\n  uses: rennf93/good-comms@master\n  with:\n    SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}\n    STATUS: 'success'\n    AUTHOR_NAME: 'GitHub Action'\n    AUTHOR_LINK: 'https://github.com'\n    AUTHOR_ICON: 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'\n    TITLE: 'Build Notification'\n    TITLE_LINK: 'https://github.com'\n    MESSAGE: 'Your build has completed successfully!'\n    COLOR: 'warning'\n    SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}\n    CHANNEL_ID: 'C12345678'\n    SLACK_THREAD_TS: ${{ steps.previous-step.outputs.SLACK_THREAD_TS }}\n```\n\n## Usage\n\n### Basic Example\n\n```yaml\n- name: Send Initial Slack Message\n  id: send_initial_slack\n  uses: rennf93/good-comms@master\n  with:\n    SLACK_WEBHOOK: '${{ secrets.SLACK_WEBHOOK }}'\n    SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}\n    STATUS: 'Started'\n    CHANNEL_ID: '${{ secrets.SLACK_CHANNEL }}'\n    AUTHOR_NAME: 'GitHub Action'\n    AUTHOR_LINK: 'https://github.com/rennf93/good-comms'\n    AUTHOR_ICON: ':rocket:'\n    TITLE: 'Deployment Started'\n    TITLE_LINK: 'https://github.com/rennf93/good-comms/actions'\n    MESSAGE: 'Starting deployment...'\n    COLOR: warning\n```\n\n### Threaded Messages Example\n\n```yaml\n- name: Send Initial Slack Message\n  id: send_initial_slack\n  uses: rennf93/good-comms@master\n  with:\n    SLACK_WEBHOOK: '${{ secrets.SLACK_WEBHOOK }}'\n    SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}\n    STATUS: 'Started'\n    CHANNEL_ID: '${{ secrets.SLACK_CHANNEL }}'\n    AUTHOR_NAME: 'GitHub Action'\n    AUTHOR_LINK: 'https://github.com/rennf93/good-comms'\n    AUTHOR_ICON: ':rocket:'\n    TITLE: 'Deployment Started'\n    TITLE_LINK: 'https://github.com/rennf93/good-comms/actions'\n    MESSAGE: 'Starting deployment...'\n    COLOR: warning\n\n- name: Notify Success on Slack Channel\n      uses: rennf93/good-comms@master\n      with:\n        SLACK_WEBHOOK: '${{ secrets.SLACK_WEBHOOK }}'\n        SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}\n        STATUS: 'Success'\n        CHANNEL_ID: '${{ secrets.SLACK_CHANNEL }}'\n        AUTHOR_NAME: 'GitHub Action'\n        AUTHOR_LINK: 'https://github.com/rennf93/good-comms'\n        AUTHOR_ICON: ':gem:'\n        TITLE: 'Deployment Successful'\n        TITLE_LINK: 'https://github.com/rennf93/good-comms/actions'\n        MESSAGE: 'Deplyment Successful'\n        COLOR: good\n        SLACK_THREAD_TS: ${{ steps.send_initial_slack.outputs.SLACK_THREAD_TS }}\n```\n\n\n## Notes\n\n- The action requires both webhook URL and Bot token because:\n  - Webhooks are used for basic message posting\n  - Bot token is used for threading and message history\n- Thread matching is based on the `AUTHOR_NAME` parameter\n- The action looks for the most recent message (within last 10 messages) with matching author name\n- Manual `SLACK_THREAD_TS` still takes precedence if provided\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frennf93%2Fgood-comms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frennf93%2Fgood-comms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frennf93%2Fgood-comms/lists"}