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

Extend labeler.yml to automatically assign nearly all labels #493

Merged
merged 19 commits into from
Mar 29, 2023

Conversation

nilsreichardt
Copy link
Member

@nilsreichardt nilsreichardt commented Mar 11, 2023

This PR adds all of our feature labels and a few more labels to our labeler.yml with the goal that 95% of the labeling is done automatically.

If we don't automate this process, our PR will have a bad quality of labels.

We try to use general and wide globs for assigning labels. For the "feature: homework" label, do not list all the paths to the homework directories. Instead, just use something like **/homework/**. This will automatically include the app files, test files, package files and asset files that contain a homework directory. Of course, this can lead to false positives in a few cases. However, we prefer the general glob to the small chance of a false positive because we think the chance of not assigning the label with too specific globs is much higher than having a false positive with a general glob. And when searching for a PR with labels, it is usually better to find a few false positives than not to find a PR about a change in the homework feature that does not have the homework label.

We are not going to include "w: " labels because they are too specific and it's too hard to maintain the paths for the files. Searching stuff with the "feature: " label should be enough.

@github-actions github-actions bot added the ci/cd label Mar 11, 2023
nilsreichardt added a commit that referenced this pull request Mar 12, 2023
According to the Dart Effective Guidelines, we should use snake_case for
Dart file. [DO name packages, directories, and source files using
lowercase_with_underscores.](https://dart.dev/guides/language/effective-dart/style#do-name-packages-and-file-system-entities-using-lowercase-with-underscores)


Used the following command to check if there are still files with
camelCase:

```sh
find . -name "*.dart" | grep -E '[[:upper:]]' | awk -F/ '{print $NF}'
```

Is helpful for #493 so that labels are assigned correctly.
.github/labeler.yml Show resolved Hide resolved
- lib/sharezone_widgets/**
- app/**/widgets/**
# Assets like images, icons, etc.
- "**/assets/**"
Copy link
Member Author

@nilsreichardt nilsreichardt Mar 12, 2023

Choose a reason for hiding this comment

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

TBD

- "**/**theme**"
- app/fonts/**
- lib/sharezone_widgets/**
- app/**/widgets/**
Copy link
Member Author

@nilsreichardt nilsreichardt Mar 12, 2023

Choose a reason for hiding this comment

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

TBD

@nilsreichardt nilsreichardt marked this pull request as ready for review March 13, 2023 15:03
Comment on lines +101 to +103
- "**/**_web/**"
- "**/web_**/**"
- "**/**_web_**/**"
Copy link
Member Author

Choose a reason for hiding this comment

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

Alternative would be to use **/**web**/** instead but now sure if this would lead to too many false positives

Suggested change
- "**/**_web/**"
- "**/web_**/**"
- "**/**_web_**/**"
- "**/**web**/**"

@nilsreichardt nilsreichardt added this pull request to the merge queue Mar 29, 2023
Merged via the queue into main with commit 39c92b1 Mar 29, 2023
@nilsreichardt nilsreichardt deleted the update-labeler-yml branch March 29, 2023 19:14
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.

2 participants