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

Include repo in head param when searching for PRs #552

Merged
merged 1 commit into from
Jun 8, 2019

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jun 8, 2019

This fixes a bug when searching for already existing PRs in a repo
where scala-steward's repo has a different name because the parent
was moved or renamed after scala-steward forked it.

When the repo names differ, the name must be included into the head
parameter like this:

head=scala-steward/scalaz-zio:update/scalaz-core-7.3.0-M30

Prior to this change, the parameter looked like this:

head=scala-steward:update/scalaz-core-7.3.0-M30

But this only works when the names are equal. Including the repo name
is also okay if there is no difference.

One consequence of this bug are duplicated PRs like these:

This fixes a bug when searching for already existing PRs in a repo
where scala-steward's repo has a different name because the parent
was moved or renamed after scala-steward forked it.

When the repo names differ, the name must be included into the head
parameter like this:
```
head=scala-steward/scalaz-zio:update/scalaz-core-7.3.0-M30
```
Prior to this change, the parameter looked like this:
```
head=scala-steward:update/scalaz-core-7.3.0-M30
```
But this only works when the names are equal.

One consequence of this bug are duplicated PRs like these:
* zio/zio#991
* zio/zio#983
@fthomas fthomas added the bug Something isn't working label Jun 8, 2019
@fthomas fthomas added this to the 0.3.0 milestone Jun 8, 2019
@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #552 into master will decrease coverage by 0.05%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   55.95%   55.89%   -0.06%     
==========================================
  Files          64       64              
  Lines         815      814       -1     
  Branches       46       45       -1     
==========================================
- Hits          456      455       -1     
  Misses        359      359
Impacted Files Coverage Δ
...ala/org/scalasteward/core/nurture/NurtureAlg.scala 0% <0%> (ø) ⬆️
...calasteward/core/vcs/data/NewPullRequestData.scala 85.71% <100%> (ø) ⬆️
...main/scala/org/scalasteward/core/vcs/package.scala 100% <100%> (ø) ⬆️

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 a48842f...badd1b5. Read the comment docs.

@fthomas fthomas merged commit 1dec60e into master Jun 8, 2019
@fthomas fthomas deleted the topic/fix-head-for-search branch June 8, 2019 21:47
@fthomas fthomas mentioned this pull request Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant