-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(github): Add the possibility to link a Milestone #27343
Conversation
Does anyone have an idea for a better unit test? I feel the test I provided is not very "resilient" by expecting to get three api calls in the "correct" order. |
to expect the log.warn
At least GitLab, Gitea and Bitbucket seem to have the notions of milestones, too. Should I try to tackle them in this PR, too? (I feel it would be "cleaner" to have single issues and PRs for each provider that should support the "milestone" option.) |
Can be done in seperate PR's |
better options documentation Co-authored-by: Michael Kriese <[email protected]>
removed the unused param 'issueNo' removed the throw exception and logged a warning instead
moved the adding of the milestone to before automerging defined the milestone type using zod
…GH-18372 # Conflicts: # lib/config/options/index.ts
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.
What if we asked for the milestone number instead of title?
That would remove the need to load and cache all milestones. Should we, in that case, add an API call to check if the milestone exists and is open? If we had the number, we could also try to set the milestone on the PR (without checking first) and simply log, if that fails. |
I'd prefer the happy path to be try setting it and log a warning if it fails |
and merged addMilestone and tryAddMilestone
Co-authored-by: HonkingGoose <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
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.
One more thing, and then the docs are good to go.
Co-authored-by: HonkingGoose <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
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.
I'm happy with the docs now! 🥳
{ | ||
name: 'milestone', | ||
description: `The number of a milestone. If set, the milestone will be set when Renovate creates the PR.`, | ||
type: 'integer', |
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.
Why this was changed to integer
this would make it probably hard to implemet on other platforms which don't use int as primary key.
it's also much harder to remember the id instead of the title-
I'm not happy with the switch to number 😞 . I know we don't need an additional lookup, but configuration is much harder. |
🎉 This PR is included in version 37.204.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I agree, the configuration was much easier with the "title" of the milestone. However, having to load all the open milestones and find the one that matches the title didn't even feel good while typing it. I am, however, totally prepared to add an alternative configuration option with the title if that is desired. |
Changes
New configuration option:
milestone
.This option is only available for the
GitHub
platform.If set to the title of an existing milestone, the corresponding milestone is found and the PR is added to that milestone.
If a value is provided, but no corresponding milestone can be found, a warning is emitted to the log.
Context
#18372
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: