Skip to content

labels: fix labels not being added - #87

Merged
phillipj merged 1 commit into
nodejs:masterfrom
phillipj:fix-cached-labels
Oct 19, 2016
Merged

phillipj merged 1 commit into
nodejs:masterfrom
phillipj:fix-cached-labels

Conversation

@phillipj

Copy link
Copy Markdown
Member

After PR #80 got merged, no labels were added to new PRs.

That regression probably came from the fact that the existing repository labels was fetched and compared to the label names our labelling algorithm thought we should add. The problem is that we compared the whole label meta object (from api.github.com) against a label name (string).

Example of the two different types of objects:

// complete label object
{
  "url": "https://api.github.com/repos/nodejs/node/labels/buffer",
  "name": "buffer",
  "color": "f7c6c7"
}

// label name
"buffer"

Comparing two such objects will obviuosly never match.

These changes extracts the existing repo label names for comparison, and adds more logging for future debugging purposes.

Closes #86

/cc @mscdex

After PR nodejs#80 got merged,
no labels were added to new PRs.

That regression probably came from the fact that the existing repository
labels was fetched and compared to the label names our labelling algorithm
thought we should add. The problem is that we compared the whole
label meta object (from api.github.com) against a label name (string).

Example of the two different types of objects:

```
// complete label object
{
  "url": "https://api.github.com/repos/nodejs/node/labels/buffer",
  "name": "buffer",
  "color": "f7c6c7"
}

// label name
"buffer"

```

Comparing two such objects will obviuosly never match.

These changes extracts the existing repo label *names* for comparison,
and adds more logging for future debugging purposes.
phillipj

This comment was marked as off-topic.

phillipj

This comment was marked as off-topic.

@mscdex

mscdex commented Oct 19, 2016

Copy link
Copy Markdown
Contributor

LGTM if CI is ok with it.

@phillipj
phillipj merged commit 8fda0ca into nodejs:master Oct 19, 2016
@phillipj
phillipj deleted the fix-cached-labels branch October 19, 2016 18:36
@phillipj

Copy link
Copy Markdown
Member Author

This just got deployed.

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