Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

LabelBot should take into account all comments on an issue. #138

Merged
merged 3 commits into from
May 4, 2020

Conversation

jlewi
Copy link
Contributor

@jlewi jlewi commented May 3, 2020

To support this:

  • get_issue should get all comments (not just the body)

  • We also need to get any labels that have been explicitly removed as well as
    any labels already on the issue.
    We need this because we want to take into account multiple comments
    and not just the first one when predicting labels.

    • Since we are going to add additional labels based on additional comments
      we want to be sure not to add back labels which were explicitly removed.
  • issue_label_predictor should filter out labels which have already
    been applied or any labels which have been explicitly removed.

    This is necessary to ensure we don't spam the issue when we allow
    the bot to comment not just in response to the first comment but
    additional comments.

  • Likewise, we only want to apply the comment about not being able to
    label an issue once. So we need to check if the label bot has
    already commented on the issue.

  • Update the readme to account for the new staging and prod environments
    for the front end as described in Setup new staging and prod environments machine-learning-apps/Issue-Label-Bot#57

* As described in kubeflow#133 as people comment on
  an issue; label bot should take these additional comments into
  account when predicting labels.

  * Hopefully these additional comments will lead to better predictions
    as they will contain valuable information.

To support this:

* get_issue should get all comments (not just the body)

* We also need to get any labels that have been explicitly removed as well as
  any labels already on the issue.
  We need this because we want to take into account multiple comments
  and not just the first one when predicting labels.

  * Since we are going to add additional labels based on additional comments
    we want to be sure not to add back labels which were explicitly removed.

* issue_label_predictor should filter out labels which have already
  been applied or any labels which have been explicitly removed.

  This is necessary to ensure we don't spam the issue when we allow
  the bot to comment not just in response to the first comment but
  additional comments.

* Likewise, we only want to apply the comment about not being able to
  label an issue once. So we need to check if the label bot has
  already commented on the issue.

* Update the readme to account for the new staging and prod environments
  for the front end as described in machine-learning-apps/Issue-Label-Bot#57
@kubeflow-bot
Copy link

This change is Reviewable

@hamelsmu
Copy link
Member

hamelsmu commented May 3, 2020

You might want to inject some kind of feature flag to allow ML to know some text is comments like a separate comments field where you concatenate all comments

but of course no harm as a start pushing into one giant text blob

@hamelsmu
Copy link
Member

hamelsmu commented May 3, 2020

/lgtm
/approve

@jlewi
Copy link
Contributor Author

jlewi commented May 4, 2020

This appears to be working insofar as we don't appear to be spamming issues.
See: kubeflow/kubeflow#4955
I verified in the logs that the label bot is being called for this issue but no additional comment is added.

bot.logs.json.txt

@k8s-ci-robot k8s-ci-robot removed the lgtm label May 4, 2020
@jlewi jlewi marked this pull request as ready for review May 4, 2020 15:00
@jlewi
Copy link
Contributor Author

jlewi commented May 4, 2020

Thanks @hamelsmu

@jlewi
Copy link
Contributor Author

jlewi commented May 4, 2020

@hamelsmu would you mind re-LGTM'ing I pushed some minor changes.

@hamelsmu
Copy link
Member

hamelsmu commented May 4, 2020

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hamelsmu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 17c8608 into kubeflow:master May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants