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

Conversation

@josephperrott
Copy link
Member

No description provided.

@ocombe
Copy link
Contributor

ocombe commented Jun 29, 2018

Thanks but I think that it should be more subtle than that. For example when another status is failed, it might as well be failed for this one as well.
I've discussed it with Jeremy and he would like to only check some labels when the merge label has been applied. I'll update your PR

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot
Copy link

☹️ Sorry, but only Googlers may change the label cla: yes.

@ocombe
Copy link
Contributor

ocombe commented Jun 29, 2018

What do you think of my changes?

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM aside from some minor coding nits

if(matchAny([newLabel], config.checks.requiredLabels) || matchAny([newLabel], config.checks.forbiddenLabels)) {
if(matchAny([newLabel], config.checks.requiredLabels)
|| matchAny([newLabel], config.checks.forbiddenLabels)
|| (getLabelsNames(labels).indexOf(config.mergeLabel) !== -1 && matchAny([newLabel], config.checks.requiredLabelsWhenMergeReady))
Copy link
Member

Choose a reason for hiding this comment

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

Use .includes() instead of indexOf()?

(here and below)


if(matchAny([removedLabel], config.checks.requiredLabels) || matchAny([removedLabel], config.checks.forbiddenLabels)) {
if(
matchAny([removedLabel], config.checks.requiredLabels)
Copy link
Member

Choose a reason for hiding this comment

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

Break this check into a function since it's used more than once?

});

if(missingLabels.length > 0) {
checksStatus.pending.push(`missing required label${missingLabels.length > 1 ? 's' : ''}: "${missingLabels.join('", "')}"`);
Copy link
Member

Choose a reason for hiding this comment

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

Could eliminate the ternary by phrasing this like

`Missing required labels: ${missingLabels.join(', ')}`

@ocombe ocombe removed the cla: no label Sep 20, 2018
@ocombe ocombe merged commit 56fd421 into angular:master Sep 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants