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

Branch selection #1469

Closed
wants to merge 29 commits into from
Closed

Conversation

pk044
Copy link

@pk044 pk044 commented Jun 4, 2020

Closes #20

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #1469 into master will decrease coverage by 0.68%.
The diff coverage is 39.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1469      +/-   ##
==========================================
- Coverage   70.26%   69.58%   -0.69%     
==========================================
  Files         113      113              
  Lines        1786     1815      +29     
  Branches       51       49       -2     
==========================================
+ Hits         1255     1263       +8     
- Misses        531      552      +21     
Impacted Files Coverage Δ
...org/scalasteward/core/application/StewardAlg.scala 0.00% <0.00%> (ø)
...ala/org/scalasteward/core/nurture/NurtureAlg.scala 4.80% <0.00%> (-0.76%) ⬇️
...org/scalasteward/core/repocache/RepoCacheAlg.scala 0.00% <0.00%> (ø)
...ard/core/bitbucket/http4s/RepositoryResponse.scala 87.50% <33.33%> (-3.81%) ⬇️
...in/scala/org/scalasteward/core/vcs/data/Repo.scala 87.50% <85.71%> (+7.50%) ⬆️
.../core/bitbucket/http4s/Http4sBitbucketApiAlg.scala 96.55% <100.00%> (ø)
...main/scala/org/scalasteward/core/git/package.scala 100.00% <100.00%> (ø)
...in/scala/org/scalasteward/core/vcs/VCSApiAlg.scala 100.00% <100.00%> (ø)
...n/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala 81.81% <100.00%> (+4.04%) ⬆️
...calasteward/core/vcs/data/NewPullRequestData.scala 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3208ffc...84247d3. Read the comment docs.

Copy link
Member

@mzuehlke mzuehlke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only comments for the moment.
If you now get 2 PRs for the same dependency update in different branches. I t would make sense to mention the branch that gets updated if it is not the default branch.

  • Update scalafmt-core to 2.5.2
  • Update scalafmt-core to 2.5.2 (maintenance)

@pk044
Copy link
Author

pk044 commented Jun 18, 2020

seems like I adjusted the PR to all the suggestions (correct me if i'm wrong though :))

@pk044
Copy link
Author

pk044 commented Jun 18, 2020

@fthomas do you perhaps have some suggestions regarding this PR?

def branchFor(update: Update): Branch =
Branch(s"update/${update.name}-${update.nextVersion}")
def branchFor(update: Update, baseBranch: Branch): Branch =
Branch(s"update/${baseBranch.name}/${update.name}-${update.nextVersion}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branchFor is used in vcs.listingBranch to create the head parameter for VCSApiAlg#listPullRequests which is used to find already existing Scala Steward PRs. If we change this for PRs that target the default branch, Scala Steward will not find older PRs it already created and will create new ones. I guess this could result in thousands new but duplicated PRs by @scala-steward.

Can we make this optional and only pass it if baseBranch is not the default branch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! i'll push a fix soon:)


def commitMsgFor(update: Update, commitsConfig: CommitsConfig): String = {
def commitMsgFor(update: Update, commitsConfig: CommitsConfig, branch: Branch): String = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only stylistic, but can we mention the branch only if it is not the default?

@mwz
Copy link
Contributor

mwz commented Jul 15, 2020

Some of our teams here at @ovotech are interested in using this feature, thanks for implementing it @pk044 👍

commitMsgFor - mention the branch only if it is not default
…teward into branch-selection

� Conflicts:
�	modules/core/src/main/scala/org/scalasteward/core/nurture/NurtureAlg.scala
�	modules/core/src/test/scala/org/scalasteward/core/vcs/data/NewPullRequestDataTest.scala
@pk044
Copy link
Author

pk044 commented Aug 11, 2020

@fthomas I applied your suggestions - let me know if I missed something important 👍

@catostrophe
Copy link

What blocks this PR from being merged?

@mbard
Copy link

mbard commented Apr 22, 2021

This is a useful feature for us.
What is the time-line for it?

@smart-ass
Copy link

@fthomas @mzuehlke Any chances to merge this MR? That would be a very useful feature for our team. I could help with conflict resolution if you say yes.

@kryptt
Copy link

kryptt commented Jun 10, 2021

Also waiting on this PR :D

@exoego
Copy link
Contributor

exoego commented Oct 5, 2021

Thanks for opening and sorry for long delay !!
I am going to close this as resolved.
My understanding is #2183 implemented branch selection feature.

Feel free to reopen if #2183 does not meet expectation.

@exoego exoego closed this Oct 5, 2021
@fthomas fthomas added the enhancement New feature or request label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support branch selection
9 participants