AI-powered changelog updates on Slack, every Monday, with GitHub Actions
Tags: github, opensource, githubhack23, githubbrasil
Published: 2023-05-09 23:51:28

## What I built 

### Category Submission
DIY Deployments

### App / Source code link
https://github.com/maxprilutskiy/change-report

### Permissive License
MIT License

### Description

[Change Report](https://github.com/maxprilutskiy/change-report) is an open-source GitHub Action that uses OpenAI's NLP capabilities to generate human-readable summaries of code changes and post them directly to Slack or Discord.

### Screenshots
So, let's say you have a repository with the following commit history:

```
feat: Develop initial launch plan for SpaceX Internet satellites
chore: Setup project repository for SpaceX Internet satellite launch
refactor: Update satellite design to improve stability and reduce weight
docs: Add user manual for SpaceX Internet service
fix: Correct satellite positioning for optimal Internet coverage
test: Run system tests for satellite deployment and connectivity
build: Prepare launch vehicle for SpaceX Internet satellite deployment
feat: Implement automated satellite monitoring system for real-time status updates
refactor: Optimize satellite power consumption to prolong battery life

... etc
``` 

Then, the generated report might look like this:


![Screenshot from Discord](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tuw7dlc3m8p9b9koladx.png)

## Background

Hi folks,

I wanted to share a GitHub Action I initially built for myself, but it's so cool that I'm now thinking it's time to let other devs benefit from it as well. 😎

![alt text](https://media.giphy.com/media/VcC5c7bZ90k5YBFpkh/giphy.gif)

Every Monday morning, this action helps our team to keep the momentum and also reminds everyone about all that cool stuff we deployed the week before.

Just an easy-to-read summary delivered straight to a Slack channel, allowing us to get back on track quickly after weekends. Discord is now supported too, btw, kudos to [@fire](https://github.com/maxprilutskiy/change-report/issues/4) for the proposal!

Change Report can also be customized to run on other days of the week and at different times of the day, etc, etc, however you define it in your GitHub Actions workflow file.

### How I built it
To build Change Report, I use GitHub Actions and OpenAI's NLP capabilities. The action is triggered on a weekly basis using a cron schedule, and it fetches the commit history for the specified number of days using the GitHub API.

Once the commit history is retrieved, the action uses OpenAI's GPT-3 API to generate a human-readable summary of the changes. The summary is then posted to a designated Slack channel using the Slack API.

During the process, I learned a quite a few things about GitHub Actions development - something I haven't done before. I thought it'd be much harder to be frank; but the [typescript-action](https://github.com/actions/typescript-action) starter was very helpful I gotta say, it makes the implementation process a breeze.

### Additional Resources/Info
Feel free to give it a try and let me know what you think! If you find it helpful or have any suggestions on how I can improve it further, please share your experiences in the comments below. 👇

Happy coding, and don't forget to star [the repo](https://github.com/maxprilutskiy/change-report)! 😜

---

P.S.: If you liked this - you might like some other things I've done recently:

[How I Sliced Deployment Times to a Fraction and Achieved Lightning-Fast Deployments to Production with GitHub Actions](https://dev.to/maxprilutskiy/how-i-sliced-deployment-times-to-a-fraction-and-achieved-lightning-fast-deployments-to-production-with-github-actions-4ifi)

[You'll never have to deal with outdated TODO comments again](https://dev.to/maxprilutskiy/youll-never-have-to-deal-with-outdated-todo-comments-again-288o)

Follow me on Twitter: [@MaxPrilutskiy](https://twitter.com/maxprilutskiy)