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

x/build/cmd/gopherbot: gopherbot closes backport issues after first merge #29599

Open
katiehockman opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@katiehockman
Copy link
Contributor

katiehockman commented Jan 7, 2019

Gopherbot closes backport issues once it detects that an associated commit has been merged. This works well if the backport only requires one commit, but causes issues when there are multiple. Gopherbot should only close the issue if the "Fixes #" label exists in the commit message.

See #29565 for an example of Gopherbot in action.

One possible solution would be to add a new field to the GerritCL type that indicates whether or not this CL "fixes" the issue, or just updates/relates to it.

@golang/osp-team

@gopherbot gopherbot added this to the Unreleased milestone Jan 7, 2019

@gopherbot gopherbot added the Builders label Jan 7, 2019

@katiehockman

This comment has been minimized.

Copy link
Contributor

katiehockman commented Jan 7, 2019

This is something I may pick up myself, but didn't have time to grab last week.

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Jan 7, 2019

Gopherbot should only close the issue if the "Fixes #" label exists in the commit message.

That makes sense. Gopherbot shouldn't close the issue when the commit message says "Updates #nnn".

Currently, gopherbot looks for any kind of issue mention ("#nnn") simply because that's the only information that maintner exposes. In order to resolve this issue, maintner needs to be modified to expose additional information. There is an existing TODO comment in the maintner code that talks about what needs to be done to implement this:

https://github.com/golang/build/blob/6a02381872d7cdf7146a8560231970f0d3ef645b/maintner/github.go#L2502-L2506

One possible solution would be to add a new field to the GerritCL type that indicates whether or not this CL "fixes" the issue, or just updates/relates to it.

There is a maintner.GitHubIssueRef type, perhaps that information can go there. (Although doing that might require us to change the signature of the GerritCL.References method.)

@dmitshur dmitshur added NeedsFix and removed NeedsInvestigation labels Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment