Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CI check for validating changedFilePatterns #69

Open
juliusmarminge opened this issue Jan 31, 2023 · 0 comments
Open

feat: CI check for validating changedFilePatterns #69

juliusmarminge opened this issue Jan 31, 2023 · 0 comments

Comments

@juliusmarminge
Copy link

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant