-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve major/minor upgrade logic #1
Comments
More on current implementation:
In theory this could already result in two branches from the script both existing if a minor upgrade branch already existed first, however the minor one will be orphaned and updated versions ignored as soon as a major release is available. e.g. if a package continued to make bugfixes to 1.x even after 2.x is released, we would miss that. |
I think it would be useful to support both major and minor releases concurrently. For example above, not many could transition to |
As discussed in #2, it seems best to support one branch/PR for every major version that exists for a dependency. But we also may want to have an advanced feature - how can a user "ignore" a major upgrade indefinitely? e.g. let's suppose I know I don't want to upgrade to angular 2.x for a long time. Can I close the PR that was created with me, and yet somehow:
First question: how can the script know to not create a PR for a major update I want to ignore? There needs to be some state kept in GitHub. You could keep a branch around with a closed PR (something the script could detect), but having orphan/unwanted branches is nearly as bad as having the PRs. So let's say the user wants to close the PR and delete the branch. In that case the only state we have left is a closed PR. According to our conventions, the closed PR would have been named something like "Upgrade angular to version 2.1.0" and pointed to a branch named Assuming that's possible, we could have the logic "If it's a major upgrade, and a PR already existed for that major upgrade, then don't create a new branch/PR". Later on, if the user manually creates their own branch/PR to upgrade angular to 2.x, then the script should catch the next minor upgrade of 2.x because the logic would return false for "If it's a major upgrade". So this seems like a feasible way to let users ignore major upgrades indefinitely but have the script wake up again to help with minor upgrades later. |
I think this issue can be broken into at least 2 parts:
|
Currently we just look at the "latest" tag from npm. This should be improved/replaced by instead looking for both the latest minor or patch upgrade as well as major upgrade for each package, by checking the dependency's versions list.
The text was updated successfully, but these errors were encountered: