Git Product home page Git Product logo

bot's Issues

Remove ignored/private packages on "add a changeset if you're a maintainer" link

Related Issues:

#39: Same root cause, but different use case.
changesets/changesets#436: same issue in CLI.

Problem:

Hi, I've been really enjoying the DX of "add a changeset if you're a maintainer". But whenever a PR modifies both public and ignored/private packages, changeset/bot lists all of them in the yaml header. If we don't remove those ignored/private packages manually, this will throw

Mixed changesets that contain both ignored and not ignored packages are not allowed

Example PR: aws-amplify/amplify-ui#628. This repository has private docs and e2e packages that are ignored, but they still show up in the "add a changeset" link.

Expected Behavior

Remove ignored and/or private packages from changed packages list. This will especially help external contributors that aren't too familiar with the repo.

Include changeset(s) verbatim in bot message?

This is a feature request (or maybe me trying to find out if this is even feasible to do; if it is, I might have a stab at making a PR): when the bot finds changesets in a PR, it will post a comment to the PR saying so. It would be great if this comment would also include the contents of the changesets. This would be a nice, frictionless way of surfacing the changes in the PR.

Changeset bot is including changesets not in the PR branch

The changeset bot lists packages that aren't in a pull request's branch, but they're in the base branch. It's as if it's based on changeset status instead of changeset status --since <baseBranch>. It gives a false impression that packages in the PR have new changesets when they don't.

Wrong version bump

I believe the bot is detecting the wrong version here. Both changesets are minor, but the bot is predicting major for one pacakge. Am I missing something?

Make 'Changeset detected' look more different from 'No Changeset found'

Problem

The automatic github message is very helpful, but many times I've missed that the message says 'No changeset found' after a quick scan.
The problem I think is that the yellow warning symbol is the only scannable difference, and the user icon for the changeset-bot is the same as the 'Changeset detected' icon โ€” so sometimes visually scanning, I'll see the pretty butterfly which belongs to the github bot and think there's a changeset already added (The tick as suggested in #27 would help with this).

Proposed solution

  • Make the success message significantly more brief than the 'No changeset found' message
    Both the 'detected' and 'not detected' versions of the message are pretty much the same length and have the same elements. In the success message, the 'Not sure what this means?' message could be easily omitted, or added as an inline link instead. The long 'Click here if you're a maintainer ...' message could also be much shortened to 'Add another changeset' as this is very much now a less critical call to action

Do not comment on some PRs, based on private packages or changed path?

Hello! We're using changeset for Astro and are loving it so far. However, we have some workspace "packages" that aren't really packages. The docs site, the www homepage, and some example directories are all included in our workspace (with "private": true).

Is it possible to configure the bot to not comment on those PRs? It is distracting for our users who think they need a changeset added, when in reality we do not usually bump these packages.

Alternatively, is there any condition where the bot doesn't trigger on a new PR that we could leverage? Happy if there is some workaround that we could use.

Example PR: withastro/astro#1042

Support custom commit message generators

Custom commit message generators have been a documented feature for about three months now, but changeset-bot is not aware of them:

Some errors occurred when validating the changesets config:
The `commit` option is set as [
  ...
] when the only valid values are undefined or a boolean.

improvements to bot success message

Right now the success message looks like:

image

But I think it could be cleaned up and improved to look like:

image

With the addition that the table could be smartly collapsed only when the number of packages is greater than 10 (or whatever the right number is), so that in the simpler cases it can just always show.

Markdown for the example.

โœ… Changeset detected. 2af1f4ff1932fe6b1c30984721b2e57ad647121e

The changes in this PR will be included in the next version bump.

Package Type
slate major ๐Ÿ”ด
slate-history patch ๐ŸŸข
slate-hyperscript minor ๐ŸŸก
slate-react patch ๐ŸŸข
slate-test-utils โ€” โšช๏ธ

Ignore certain branches

Is it possible to configure the app behavior per repo via .changeset/config.json (or some other way)? If so, it would be nice to filter branches that the bot acts on, i.e. there's no need to leave a comment on renovate/* branches.

Bot reporting "No Changeset found", but there is. How to debug?

I've been exploring changesets recently and am in a mostly good place.

I have it working in three repos as expected.

One repo confused the bot in ways I can't understand. I keep getting:

๐Ÿฆ‹ No Changeset found

no matter what I try.

My current status:

  • new branch in repo
  • deleted all the files
  • ran the usual:
    • yarn init
    • yarn add @changesets/cli && yarn changeset init
    • modify "commit" to true in config
    • git add .changeset/ package.json yarn.lock
    • git commit
    • git oush -u

Then I create and view the PR.

๐Ÿฆ‹ No Changeset found

This is a summary of the branch:

โฏ /bin/ls -a
.                       .markdownlint.jsonc     node_modules
..                      .markdownlintignore     package.json
.changeset              .pre-commit-config.yaml terraform
.git                    .pytest_cache           yarn.lock
.infracost              .venv
โฏ tree .changeset/
.changeset/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ config.json
โ””โ”€โ”€ weak-beans-share.md

1 directory, 3 files

and

โฏ cat .changeset/weak-beans-share.md
---
'botc-custom-script-json2pdf': patch
---

add changeset tool

I'm stumped, and don't know where to look for issues, not what to try to get the bot working as expected in this repo.

Any and all suggestions welcome.

run prettier on bot changeset suggestion

I think Changesets normally runs Prettier when adding new changeset files. But the little link to click from the bot's comment to create a new changeset file doesn't. So if the file doesn't conform to the project's Prettier config then it will fail (eg. if needing single quotes) and render the PR invalid.

feat: CI check for validating `changedFilePatterns`

In the latest version of changeset, @Andarist added the changedFilePatterns option which let's you configure when a changeset should be needed and not.

It would be nice for the bot to validate that this config is adhered to. For example, given the following config:

{
  "...": "",
  "ignore": ["www"],
  "changedFilePatterns": ["src/**"]
}

The bot would trigger a CI step to check the changed file for the PR and validate it accordingly:

  • If a PR makes changes to src/**, and there is a changeset - CI should pass.
    • Note that we need to check the ignore field here, i.e. changes to www/src/** should not require changeset.
  • If a PR makes changes to src/**, and there isn't a changeset - CI should fail.
  • If a PR doesn't make changes to src/**, yet there is a changeset - CI should fail.

@Andarist suggested you could do this manually using changeset status but would be nice to have this supported by the bot out of the box - perhaps there's some other nice integration with the current comment the bot leaves that could be made here too in regard to this config option / CI step ๐Ÿค”

Running changesets bot on all previously opened PRs

Iโ€˜ve added changesets bot to a GitHub Repo with a bunch of pre-existing open Pull Requests. On new pull requests the bot does a great job of commenting. Is it possible to get the bot to comment on all those requests that where opened before the changesets bot was added?

Consider moving the bot back to Github Actions

Hi,

I noticed that this bot used to be an action, but it didn't work for forks, so it was moved to a bot.

Have you considered moving it back to a github action now that you can use pull_request_target?

Moving it to an action would let users customize things. For example, I'd like to disable the bot when PRs only modify certain folders.

improvements to bot warning message

Similarly to #27, right now the changeset warning message looks like:

image

But I think it could be simplified and more clear as:

image

Markdown for the example.

โš ๏ธ No changeset detected. 5461a06f94cddce0b573f41948ba79b6117c4c96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

If you add a changeset this comment will update to reflect it.

Reset changeset detection when PR base branch is changed

In my repo, if I create a mybranch branch off of my dev branch, then make a PR with mybranch but accidentally keep the base as main, then the changeset bot correctly detects changesets that are in dev, but not yet in main.

However, when I then correct my mistake and change the base of the PR to dev, the changeset bot does not try to revalidate, so keeps saying there are changesets in my PR when in fact there aren't any.

If the changeset bot could react to a PR changing its base and redetect changesets, this issue would be fixed.

Feature request: option to turn off Changeset detected message

It would be nice if there was an option to turn off the "Changeset detected" success message. After a while you get used to what changeset does so the information in there is not really required.
However, having the "No Changeset found" is very useful, but if people is use to seeing the "Changeset detected" message they will tend to automatically dismiss it, which means they could also end up dismissing the useful "No Changeset found" message.

[๐Ÿ’ก Feature request]: Previewing the changesets in Pull Requesst comment

Why?

I don't want only to be notified in the comment that certain Pull Request includes changesets.
To see what's the content of it, I have to see the code changes. Hence, I don't know if they will display correctly or not. And if they're described well enough.

So, what am I proposing?

Add a configurable option, e.g., previewInPRComment, which can be disabled by default to preview the content of changesets which has been added to a certain Pull Request.

It could potentially make it simpler for us to focus on writing a meaningful changeset inside the PR dedicated to specific change.
Instead of constantly making changes to the generated Pull Request with release/versioning changes. We can get easily forgetful to remember what exactly changed there.

Feature Request: warn user on a per package basis

I was discussing changesets with a friend and we are a little worried that when making cross-package changes in our monorepo, we may forget / fail to add a changeset for all the packages that should be released. The changeset bot is pretty handy for a warning in general that there's no changeset for the PR, but we would like to get an overview actually for which packages our PR made changes for, and for which packages a changeset is made.

So we would get something like:


Changeset Bot
Hey, I see you're making changes to some packages that are not scheduled to release via a changeset:
โœ”๏ธ package-a
โŒ package-b
โœ”๏ธ package-c
This might be intended, but I'm adding this message here to make sure :)


I wonder if this would interest you guys

Change changeset path

Is there a way to change the default path where the bot creates the changeset as I currently have changeset folder in a different directory and then 2 different changeset folders in the project

Feature request: Generate tags on PRs based on changesets

For my project we have a convention of listing the packages being touched in a PR in the title, so the pull request page will look something like:

  • package-A: Add new feature
  • package-B,package-C: Fix some bugs
  • pkg-D: Do some work

This is an error prone, inconsistent, non-filterable system. It occurs to me that we could be using tags rather than coding this info in the PR title. If we're going to do that, then we could take advantage of the changeset-bot to do this automatically for us. It will be able to give us more consistent data and will also make it obvious at a glance what kinds of changes are in the PR pipeline.

The tags would probably be something like package-name - major for e.g.

This tagging solution might not be appropriate for all users of the changeset bot, so it would probably make sense for it to be an option feature which can be switched on/off.

Question: bot not running?

Hi all,

Seems to me that the bot is not running in every repo I know, both new and old (already configured)

Any ideas?

Thanks :)

Error when validating changeset config with root level package

The error the GH bot posts is:

Some errors occurred when validating the changesets config:
The package or glob expression "my-package-name" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

The repo structure looks like

  • root ("my-package-name") with a package.json set to private
    • packages/javascript ("my-other-package") with a package.json set to public

PNPM workspaces is used in the repo where this issue occurs (https://github.com/livekit/protocol)
When running changesets CLI commands locally (e.g. changeset add) it accurately detects both packages in the repo. However the changeset bot seems to choke with this setup.

config:

{
  "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
  "changelog": [
    "@livekit/changesets-changelog-github",
    { "repo": "livekit/protocol" }
  ],
  "commit": false,
  "fixed": [["my-package-name", "my-other-package"]],
  "linked": [],
  "access": "public",
  "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "ignore": [],
  "privatePackages": { "version": true, "tag": true }
}

Support subdirectories

I have a library which lives in a monorepo, so my changeset directory lives in <repo>/library/.changeset instead of <repo>/.changeset.

changesets/action supports that, but the bot doesn't. Is there any way to add a configuration to the bot itself? Or perhaps a setting in a new root config file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.