Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

🎊 Post summaries of your Github projects' activity to Slack using Github Actions ✨

License

Notifications You must be signed in to change notification settings

tophat/github-activity-slack-summary-action

Repository files navigation

Github activity summaries, but on Slack! ✨

All Contributors

⚠️ This project is now archived and will not receive any more updates.

Eager to keep your Slack workspace in-the-loop about what's going on in your Github projects? This action might come handy! With minimal setup, this action will post weekly summaries of what has been going on around your Github organization in a Slack channel or your choice. It's a top-notch way of coordinating around issues that need attention!

Setup

Create a repository and add an action to it:

on:
  schedule:
    # Run every Monday at 9AM
    - cron: '0 9 * * 1'


jobs:
  spread-the-news:
    runs-on: ubuntu-latest
    steps:
      - uses: tophat/github-activity-slack-summary-action@master
        with:
          # Org to build the summary about
          org: 'myCoolOrg'
          # Where to post the update
          slack-channel: 'engineering'
          # Token used to fetch Github API data
          github-token: ${{ secrets.GITHUB_TOKEN }}
          # Token with 'chat:write' privileges
          slack-token: ${{ secrets.SLACK_TOKEN }}

To know more about how to schedule actions, read here.

Local development

This action reads from Github's API and posts to Slack channels. As such, you will need to set up a Slack workspace where your instance of the bot can post, give it the permissions it needs (which should only be chat:write) and grab both your Slack app's bot token and a personal access token with minimal scope (it should only be able to read public repository metadata, unless you are reporting on private repositories) from Github.

Using tools such as act, you can then execute the action and provide the tokens you have generated earlier as secret values that Github would otherwise manage.

Finally, you will need to set up a dummy action in .github/workflows that triggers the action defined at the root of the repository. A dummy action like the one above, but with uses: ./ instead of uses: tophat/..., will allow you to run the locally-defined action flow.

With act, you can then run

act -s GITHUB_TOKEN=<token> -s SLACK_TOKEN=<token>

at the root of the repository. The action should now run locally!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Marc Cataford

💻 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

About

🎊 Post summaries of your Github projects' activity to Slack using Github Actions ✨

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •