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
[RFC] Simplify label configuration #476
Comments
I like the first option. it is a super simple and clean, I'm having trouble picking apart the difference between |
this method gets rid of most of the shorthands but i think we could still support a few? for instance the following would override the default {
labels: [
{
name: 'Breaking change',
releaseType: 'major'
}
]
} or just editing the title {
labels: [
{
releaseType: 'major',
changelogTitle: 'Super Big Changes'
}
]
} |
So under your suggestion, the labels have default fallbacks based on what |
yeah |
I think it's a great one. There's nothing more better than saying "it's none because it has none impact on the release process, eg. chore/dependencies/whatever".
Yeap, totally. The proposal is awesome. |
I have a PR up for this now. It does not address the following
|
I don't get it. How "A skip label is only valid when paired with a semver label and is otherwise a no-op." make sense? If i have Currently I have "skipReleaseLabels": [
"documentation",
"skip-release",
"devDeps",
"infra"
],
"labels": {
"deps": {
"name": "deps",
"title": "🔩 Dependency Updates"
},
"devDeps": {
"name": "devDeps",
"title": "🔩 Dependency Updates"
},
"documentation": {
"name": "documentation",
"title": "🗒️ Documentation"
},
"core": {
"name": "core",
"title": "📦 Core"
}
}, and I want to skip on docs, skip-release, devDeps and infra, but don't want to skip on I also have And one more thing, is |
@tunnckoCore I think you setup would look like this in the new way: {
"labels": [
{
"name": "deps",
"title": "🔩 Dependency Updates",
// when deps are merged create a patch release
"releaseType": "patch"
},
{
"name": "devDeps",
"title": "🔩 Dependency Updates",
"releaseType": "none"
},
{
"name": "documentation",
"title": "🗒️ Documentation",
"releaseType": "none"
},
{
"name": "core",
"title": "📦 Core",
"releaseType": "patch"
}
]
} The none effectively acts as a
I have not done this either. It is still just title. I will add this to my PR for the refactor (still not on next. I'll get it out after changelogTitle ) |
Right. Okay, great :)
Is it now? I'm guessing that edit: And does missing |
@tunnckoCore there's defaults on the changelog titles based on what version you're releasing. |
I'm asking about the other "custom labels" that we add from the config and that are not about the semver. If I have |
🚀 Issue was released in v8.0.0 🚀 |
@adierkens, it looks like this issue was the major impetus behind the v8 major rev, so I'm asking this question here... Is there anything special I need to do to upgrade to v8 from v7.x? |
If you have any extra https://intuit.github.io/auto/pages/autorc.html#label-customization |
Wooohooo! 🎉 I'll try it in the weekend. |
First of all, Cool changes for v8! Regarding
From local testing, it seems that the current behavior is:
Below are a few examples: (1): minor and none labels
labels on PR:
changelog label section:
(2): multiple patch labels
labels on PR:
changelog label section:
(3): none label and default none label
labels on PR:
changelog label section:
@hipstersmoothie, Is the above behavior / precedence order intended? If so, it would be good to add to documentation so it is clear how the changelog label sections are generated and how sections take precedence (I could help out with this if needed) If not, can we work to define a precedence order, either as part of this issue or another? |
I don't see it as something special or wrong. It seems intuitive enough. The only important thing is |
Is your feature request related to a problem? Please describe.
Throughout the process of working on autobot I've struggled with handling/parsing/groking auto's label configuration setup.
Even when I started using auto, mapping the behavior of what I wanted to the available configuration was a little tricky.
Below I'll outline some of the behavior I think makes it more complex than it needs to be:
labels
andskipReleaseLabels
. A label inlabels
that's also inskipReleaseLabels
will skip a release. So if you want a documentation label that doesn't do a release, it needs to be added in two places. Also, what happens when you addmajor
,minor
, orpatch
to theskipReleaseLabels
section? And then there's theskip-release
label which is different from theskipReleaseLabels
.minor
anddocumentation
labels both exist, which changelog title takes precedent?Describe the solution you'd like
I'd like to propose that we vastly simplify the label definition and clearly document any corner cases. This is just one suggestion.
Logic
name
andreleaseType
are requiredreleaseType
is defined asmajor | minor | patch | skip | none
. This can be further reduced to three categories:semver | skip | none
.semver
label can be present at any one given time.semver
label must be present, unless anone
is otherwise present.skip
label is only valid when paired with asemver
label and is otherwise a no-op.none
type generates no release by itself, but can be included with asemver
label to include an extra changelog entry.none
release does not cause a release to be skipped if asemver
label is present.none
labels can be included to add the PR under different sections of the changelogDescribe alternatives you've considered
This is admittedly still complicated and certainly more verbose. An alternative (and a slight compromise to what we have today) would be to treat the
semver
labels differently.In this version,
major
,minor
, andpatch
keep a similar api to what they have today. They're essentially treated as special cases though. All other labels go into thisother
bucket (which could have a better name).In this scenario:
semver
can be present at a timeskipRelease: true
can be included onother
labels to make them a skip.changelogTitle
can be included onother
labels to add a changelog entry. (Again, this would be duplicative of other entries).skipRelease
orchangelogTitle
would make the label a no-op arbitrary label (which preserves the arbitrary label support we have today).Ultimately I'm open to other ideas. I just think our current approach is pretty rife with undocumented corner cases and gotchas. I'd like to make this as easy to understand (and to code for) as possible.
The text was updated successfully, but these errors were encountered: