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

Add needs release arg #261

Closed
wants to merge 1 commit into from
Closed

Conversation

VenelinMartinov
Copy link
Contributor

This can be used to trigger releases of all providers on a bridge release.

Copy link
Member

@iwahbe iwahbe left a 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.")
Copy link
Member

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):
Copy link
Member

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.

Suggested 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:
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

2 participants