-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add needs release arg #261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a basic test.
@@ -256,6 +256,8 @@ This is equivalent to setting PULUMI_MISSING_DOCS_ERROR=${! VALUE}.`) | |||
cmd.PersistentFlags().StringVar(&context.PRTitlePrefix, "pr-title-prefix", "", | |||
`The prefix to insert in the generated pull request title.`) | |||
|
|||
cmd.PersistentFlags().BoolVar(&context.NeedsReleasePatch, "needs-release-patch", false, "setting this field to True will trigger a patch release after the PR is merged.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of --needs-release-patch=true
, can we have an enum flag --needs-release=patch
.
@@ -345,7 +345,11 @@ var InformGitHub = stepv2.Func70E("Inform Github", func( | |||
} | |||
// On non-upstream upgrades, we will create a patch release label | |||
// if the provider hasn't been released in 8 weeks. | |||
case c.MaintenancePatch && !c.UpgradeProviderVersion: | |||
case (c.MaintenancePatch && !c.UpgradeProviderVersion): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change.
case (c.MaintenancePatch && !c.UpgradeProviderVersion): | |
case c.MaintenancePatch && !c.UpgradeProviderVersion: |
addLabels = []string{"--label", "needs-release/patch"} | ||
|
||
// If we have the needs release flag, we make a patch release. | ||
case c.NeedsReleasePatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put c.NeedsReleasePatch
before the normal release switch statement. Otherwise we could get a scenario where the case c.UpgradeProviderVersion && len(target.GHIssues) > 0:
branch triggers but no label is added, even though c.NeedsReleasePatch
is true.
This can be used to trigger releases of all providers on a bridge release.