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

Create auto labeler workflow for PRs [skip ci] #11312

Closed
wants to merge 1 commit into from

Conversation

mshima
Copy link
Member

@mshima mshima commented Feb 14, 2020

Following #11283

This PR creates a workflow for auto labeling PRs based on the files changes.

It uses scheduled runs and tags PRs that aren't tagged yet.
Why don't use on pull_request? actions/labeler#12
Once this bug is resolved, we should switch to on pull_request.

.github/labeler.yml Outdated Show resolved Hide resolved
.github/labeler.yml Outdated Show resolved Hide resolved
.github/workflows/labeler.yml Outdated Show resolved Hide resolved
triage:
runs-on: ubuntu-latest
steps:
- uses: mshima/labeler@v2
Copy link
Member

Choose a reason for hiding this comment

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

why is it your own action ? did you fork the project ? in this case, we can host it under jhipster organization

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure.
The changes I’ve made is actions/labeler#49.
I don’t have permission to create new repositories.
Can you clone my?
If you clone upstream, then you have to copy the dependencies too.

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/5 * * * *'
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid of this, as it will be launched all the time and we won't find in Actions list the other builds

Copy link
Member Author

Choose a reason for hiding this comment

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

We can reduce this to one an hour.
I’ve set to 5 min to test.

@SudharakaP
Copy link
Member

SudharakaP commented Feb 21, 2020

I am a bit doubtful on this change. Maybe we need to think of a different approach 🤔

  1. I think this action only adds labels and it doesn't remove them. Say I make a commit changing package.json and then in a later commit removes those changes. Then the label theme: dependencies might be staying; there's an issue for this in the parent repository; Remove labels for reverted changes actions/labeler#14

  2. Since the action is forked from https://github.com/actions/labeler and there's some customizations and we'll have to maintain it and probably merge upstream enhancements (such as the useful Remove labels for reverted changes actions/labeler#14) when they are available.

Just my two cents 😄

@mshima
Copy link
Member Author

mshima commented Feb 21, 2020

I am a bit doubtful on this change. Maybe we need to think of a different approach 🤔

  1. I think this action only adds labels and it doesn't remove them. Say I make a commit changing package.json and then in a later commit removes those changes. Then the label theme: dependencies might be staying; there's an issue for this in the parent repository; actions/labeler#14
  2. Since the action is forked from https://github.com/actions/labeler and there's some customizations and we'll have to maintain it and probably merge upstream enhancements (such as the useful actions/labeler#14) when they are available.

Just my two cents 😄

I think labeling removing is minor.
Another problem is that it don’t revisit a modified PR to add new labels.
But it a start. We have a lot of unlabeled PRs.

Another approach is to create jhipster teams and use code owner.
It will ask the team to review the PR based on code owner.

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2020

CLA assistant check
All committers have signed the CLA.

@mshima mshima closed this Apr 20, 2020
@pascalgrimaud pascalgrimaud added this to the 6.9.0 milestone May 4, 2020
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.

5 participants