Skip to content

changesets/bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a443d06 · Jul 2, 2024

History

54 Commits
Mar 28, 2023
Sep 21, 2020
Jun 26, 2022
Oct 26, 2019
Jun 26, 2022
Oct 4, 2019
Jan 25, 2020
Oct 4, 2019
Jul 2, 2024
Jan 24, 2020
Mar 28, 2023
Jun 26, 2022
Jun 13, 2024
Jun 26, 2022
Jun 13, 2024

Repository files navigation

changeset-bot

A GitHub App built with Probot to detect changesets in PRs

This bot will comment on PRs saying that either a user might need to add a changeset(note that PRs changing things like documentation generally don't need a changeset)or say that the PR is good and already has a changeset.

screenshot of changeset bot message from https://github.com/mitchellhamilton/manypkg/pull/18 before a changeset was added

screenshot of the changeset bot message from https://github.com/mitchellhamilton/manypkg/pull/18 showing the changeset good to go message

Sometimes, a contributor won't add a changeset to a PR but you might want to merge in the PR without having to wait on them to add it. To address this, this bot adds a link with the filename pre-filled to add a changeset so all you have to do is write the changeset and click commit.

screenshot of the changeset bot message from https://github.com/mitchellhamilton/manypkg/pull/18 focused on the create a changeset link

screenshot of creating a changeset directly on GitHub

screenshot of the GitHub file creation page focusing on the commit button

screenshot of the changeset bot message from https://github.com/mitchellhamilton/manypkg/pull/18 showing the changeset good to go message

When writing the changeset, it should look something like this with the packages that are being released in the YAML front matter with associated semver bump types and the summary of the changes in markdown.

---
'@changesets/cli': major
'@changesets/read': minor
---

A very helpful description of the changes

The information below is for contributing to the bot.

Setup

yarn

Behaviour

The changeset bot will listen for pull requests being opened and pull requests that have been updated, upon which it will then scan through the files for a changeset that has been added. The bot will make a comment on the PR stating whether it found a changeset or not, as well as the message of the latest commit. If the PR is being updated then the bot will update the existing comment