Skip to content

Conversation

@wilzbach
Copy link
Contributor

The idea is to label all bug fixes, s.t. reviewers can filter for them easier. This is often done atm manually.
One good use case is to search for bug fixes prior to the end of the merge window / new releases.

pr.updateGithubComment(comment, action, refs, descs);

if (refs.length > 0 && comment.body_.length == 0)
pr.addLabels(["Bug fix"]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory there are two other things we might want to consider

  • try to read the label to existing PRs (e.g. if the Bot failed to do the first time & for currently open PRs)
  • remove the Bugfix label if all issue references has been removed from a PR.

It would be easy to add these two cases as well, but imho they aren't that important and we could save the "additional API requests impact" of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It also seems that "Bug Fix" is only used at Phobos at the moment

Copy link
Member

Choose a reason for hiding this comment

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

You should check that the referenced tickets are actually fixed, refs.any!(r => r.fixed) should work.
https://github.com/dlang-bots/dlang-bot/blob/47e16c0a921e69e2f65abd1fb03015ea78975666/source/dlangbot/bugzilla.d#L37

import std.path : buildPath;

logInfo("Starting test in %s:%d with payload: %s", file, line, payload);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a bit noisy, but helps a lot to identify which test failed.

@wilzbach
Copy link
Contributor Author

wilzbach commented Feb 9, 2017

Ping @MartinNowak - anything blocking this? On #38 you already agreed with this in general.
How do you want to name the label? "Bug fix" (Phobos) or "regression" (DMD).
In my opinion "Bug fix" is probably the better term.

Copy link
Member

@MartinNowak MartinNowak left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

pr.updateGithubComment(comment, action, refs, descs);

if (refs.length > 0 && comment.body_.length == 0)
pr.addLabels(["Bug fix"]);
Copy link
Member

Choose a reason for hiding this comment

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

You should check that the referenced tickets are actually fixed, refs.any!(r => r.fixed) should work.
https://github.com/dlang-bots/dlang-bot/blob/47e16c0a921e69e2f65abd1fb03015ea78975666/source/dlangbot/bugzilla.d#L37

@MartinNowak
Copy link
Member

@MartinNowak MartinNowak merged commit 31257a0 into dlang:master Feb 12, 2017
@wilzbach wilzbach deleted the add-bugfix-label branch May 28, 2017 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants