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

Change Request: release-please should create release only for certain tags #18455

Closed
1 task done
mdjermanovic opened this issue May 15, 2024 · 5 comments
Closed
1 task done
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion enhancement This change enhances an existing feature of ESLint infrastructure Relates to the tools used in the ESLint development process

Comments

@mdjermanovic
Copy link
Member

ESLint version

N/A

What problem do you want to solve?

Currently, in all repositories where we use release-please, it's configured to generate/update the release PR on any commit we push to the main branch, regardless of the commit tag.

The commit tags we're using are:

  • build
  • chore
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • test

The problem is that not all kinds of commits warrant releasing a new version of the package. For example, if the only change we made since the last release was adding more tests, releasing a new version of the package does not benefit anyone. When deciding which packages to publish, we always need to review the commit list for each. It would be much easier for us if release-please would be generating release PRs only when there's a change we'd like to release.

What do you think is the correct solution?

Configure release-please to generate/update release PRs only for certain commit tags and review our policies for choosing tags for particular changes.


The tags that I believe we would certainly like to release a new version of the package for are:

  • docs - to update README on npm
  • feat
  • fix
  • perf

Then, there are changes that shouldn't be observable to end users but are affecting (or may affect) production code so we might want to release a new version to see if there are any issues as early as possible:

  • build
  • refactor

The tags that I believe we would not like to release a new version of the package for are:

  • ci
  • test

So above are 6 tags that I think release-please should generate/update the release PR for, and 2 tags that I don't think it should.


The remaining one is chore.

Per our policies, chore should be used "for changes that aren’t user-facing". Like, for example, fixing a typo in a test file. So, by the definition, these changes shouldn't warrant a new release.

But so far we have used this tag for changes that are user-facing, notably:

  • Small changes in production code - I think we should be more strict here and always mark these changes as refactor.
  • Updating dependencies - new versions of production dependencies may cause changes in the way our package works, so I think we should discuss whether we want to keep using chore for these changes or maybe introduce a new tag.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint core Relates to ESLint's core APIs and features labels May 15, 2024
@mdjermanovic mdjermanovic changed the title Change Request: (fill in) Change Request: release-please should create release only for certain tags May 15, 2024
@nzakas
Copy link
Member

nzakas commented May 15, 2024

The tags that I believe we would certainly like to release a new version of the package for are:

  • docs - to update README on npm

  • feat

  • fix

  • perf

I don't think we need docs. The case of needing to update the README on npm is an edge case, and when needed, I think it's fine to use fix to indicate that it's important to get fixed and published to users.

I also don't think build or refactor should trigger a release. I'd like us to get into the habit of just thinking of feat and fix as releasable artifacts because it indicates we are either adding something new or fixing something (perf being a special case).

@mdjermanovic
Copy link
Member Author

Okay, so to summarize, only these three tags would trigger a release:

  • feat
  • fix
  • perf

We'd continue using tags as before, with an exception: If we think that a change should trigger a release, but the tag we usually use for that kind of change is not one of the three above, we'd tag it as fix. An example is the mentioned README. Another example would be a dependency upgrade that we know fixes a bug that affects our package, in which case we'd tag it as fix instead of chore.

Does this sound good?

@nzakas
Copy link
Member

nzakas commented May 16, 2024

Sound good to me. @fasttime what do you think?

@fasttime
Copy link
Member

Okay, so to summarize, only these three tags would trigger a release:
* feat
* fix
* perf

Sounds good! Just to state the obvious, the tags will be the same for breaking changes as well (I think I've only seen feat! and fix! being used in practice).

@aladdin-add
Copy link
Member

seems all the linked PRs have been merged. so, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion enhancement This change enhances an existing feature of ESLint infrastructure Relates to the tools used in the ESLint development process
Projects
Status: Complete
Development

No branches or pull requests

4 participants