Skip to content
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

Switch PR labeling to use GitHub Actions. #7630

Merged
merged 1 commit into from Jan 8, 2020

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Dec 26, 2019

Summary

This updates the PR labeling functionality to use GitHub Actions instead of being a recurring job in Travis.

Aside from the obvious change of needing to check somewhere other than Travis to verify this is working, this results in the following changes to how automatic labeling works for PRs:

  • The automatic labeling now gets run whenever a PR is opened, reopened, updated, or marked ready for review instead of running whenver a commit is pushed to master or the nightlies get run. This should improve responsiveness for users.
  • Labels will not be automatically removed anymore. This is a limitation of the action being used, but is one I feel is actually a good thing. Specific sub-sections of existing files may be relevant to areas other than those that the file itself is part of, and the auto-removal of labels with the current solution makes it hard to express this properly.
  • A couple of labels listed in the existing labeler script have been updated to more correctly reflect the current state of affairs (especially the packaging and tests labels).
  • The selection of labels which may be automatically applied has been expanded to include every area/* label that has a corresponding set of files in the repo.
Component Name

area/ci

Additional Information

Fixes: #7627
Partially mitigates the issue solved by: #7543

Minimally tested with equivalent code in a throwaway repository.

This decouples the PR labeling process from the main CI process, allowing
them to run completely independenly of each other.

The new labeling configuration is based on copying, extending, and
correcting the existing labeling rules in the `labeler.sh` script which
the commit is removing.

Labeling is configured through `.github/labeler.yml` file. Check there
for info on the exact format.

The exact configuration being used will update labels on PR's whenever
one is opened, updated, reopened, or marked ready for review. It will
not remove existing labels from the PR, only add new ones.
@squash-labs
Copy link

squash-labs bot commented Dec 26, 2019

Manage this branch in Squash

Test this branch here: https://ferroinpr-labels-gha-ae50z.squash.io

@Ferroin Ferroin changed the title [WIP] Switch PR labeling to use GitHub Actions. Switch PR labeling to use GitHub Actions. Dec 27, 2019
@Ferroin Ferroin requested a review from a team December 27, 2019 12:46
@Ferroin
Copy link
Member Author

Ferroin commented Dec 27, 2019

I've added the core team for review on this as I'd like their input to make sure the label mappings in .github/labeler.yml are correct.

Please don't merge until this gets a review from them.

@Ferroin Ferroin requested a review from cakrit January 6, 2020 17:08
@Ferroin
Copy link
Member Author

Ferroin commented Jan 6, 2020

@cosmix @cakrit Could one of you two double check that the label mappings in .travis/labeler.yml are correct in this PR? The format is YAML, with keys corresponding to labels and values being a list of regexes for paths to apply those labels for.

Copy link
Contributor

@prologic prologic left a comment

Choose a reason for hiding this comment

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

I have tested that this works as expected;

@github-actions github-actions bot added the area/packaging label 29 seconds ago

In prologic/netdata#1

@ilyam8
Copy link
Member

ilyam8 commented Jan 7, 2020

PR name

Switch PR labeling to use GitHub Actions

Comment from deleted file

This is a simple script which should apply labels to unlabelled issues from last 3 days.

should apply labels to unlabelled issues

I guess the title is wrong @Ferroin ? This PRs switches both PR and issues labeling?

@Ferroin
Copy link
Member Author

Ferroin commented Jan 7, 2020

PR name

Switch PR labeling to use GitHub Actions

Comment from deleted file

This is a simple script which should apply labels to unlabelled issues from last 3 days.

should apply labels to unlabelled issues

I guess the title is wrong @Ferroin ? This PRs switches both PR and issues labeling?

The comments are wrong, the script being removed hasn't done labeling of issues since we started using Issue Templates, the comments never got updated for some reason.

@Ferroin
Copy link
Member Author

Ferroin commented Jan 8, 2020

Merging this. If the labels are wrong, we can just fix it later.

@Ferroin Ferroin merged commit 7597c80 into netdata:master Jan 8, 2020
@Ferroin Ferroin deleted the pr-labels-gha branch January 8, 2020 11:22
Saruspete pushed a commit to Saruspete/netdata that referenced this pull request May 21, 2020
This decouples the PR labeling process from the main CI process, allowing
them to run completely independenly of each other.

The new labeling configuration is based on copying, extending, and
correcting the existing labeling rules in the `labeler.sh` script which
the commit is removing.

Labeling is configured through `.github/labeler.yml` file. Check there
for info on the exact format.

The exact configuration being used will update labels on PR's whenever
one is opened, updated, reopened, or marked ready for review. It will
not remove existing labels from the PR, only add new ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update issue and PR labeling to use GitHub Actions
5 participants