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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 219 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,250 @@
#
# SPDX-License-Identifier: EUPL-1.2

# This file is used by the GitHub Action "labeler" to automatically add labels
# to pull requests based on the files that have been changed in the pull
# request.
#
# The action uses minimatch patterns to match files. For more information, see
# https://github.com/isaacs/minimatch
#
# Here quick crash course about the glob pattern:
# When we have "**/homework/**" returns this always true, if in the path of file
# a directory "homework" contains:
# "app/lib/homework/add.dart" -> true
# "app/lib/timetable/add.dart" -> false
#
# When we have "**/**homework**" returns this always true, if a file contains
# the word "homework":
# "app/lib/homework_add.dart" -> true
# "app/lib/fab_homework_button.dart" -> true
# "app/lib/homeworks_page.dart" -> true
# "app/lib/homewor_page.dart" -> false
#
# Try this the following link to play around with the glob pattern:
# https://globster.xyz/?q=**%2F**homework**&f=app%2Flib%2Fhomework_page.dart%2Capp%2Flib%2Ftimetable_page.dart%2Capp%2Flib%2Fhomework%2Fadd.dart&embed=1
#
# Another recommendation is to keep the global general and wide. 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.

"ci/cd":
- .github/workflows/**
- .github/labeler.yml
- .github/dependabot.yml
- codemagic.yaml
- "**/firebase.json"
- "**/.firebaserc"
- "bin/check_license_headers.sh"
- "bin/add_license_headers.sh"
- "bin/source_of_truth/**"

"documentation":
- "**/*.md"
- "**/*.mdx"
- "docs/**"
- "docs.yaml"

"dependencies":
- "**/pubspec.yaml"
- "**/pubspec.lock"
- ".fvm/**"

"testing":
- "**/*_test.dart"
- "**/test_driver/**"
- "**/test/**"
- "**/integration_test/**"
- "**/dart_test.yaml"

"platform: android":
- "app/android/**"
- "**/**android**"
- "**/**_android/**"
- "**/android_**/**"
- "**/**_android_**/**"

"platform: ios":
- "app/ios/**"
- "**ios**"
- "**/**_ios**/**"
- "**/ios_**/**"
- "**/**_ios_**/**"

"platform: macos":
- "app/macos/**"
- "**/**macos**"
- "**/**_macos/**"
- "**/macos_**/**"
- "**/**_macos_**/**"

"platform: web":
- "app/web/**"
- "**/**web**"
- "**/**_web/**"
- "**/web_**/**"
- "**/**_web_**/**"
Comment on lines +101 to +103
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**/**"


"code quality":
- "**/analysis_options.yaml"
- "lib/sharezone_lints/**"

"legal":
- "LICENSE"
- "**/**privacy_policy**"
- "**/**imprint**"

"sharezone: cli":
- "tools/sz_repo_cli/**"
- "bin/sz"
- "bin/sharezone"

"ui / ux":
- "**/theme/**"
- "**/**theme**"
- app/fonts/**
- lib/sharezone_widgets/**
Jonas-Sander marked this conversation as resolved.
Show resolved Hide resolved
- 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

# 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


"ui: dark-mode":
- "**/**dark_theme**"

"ui: light-mode":
- "**/**light_theme**"

"feature: analytics":
- "**/analytics/**"
- "**/**analytics**"
- "lib/analytics/**"

"feature: attachments":
- "**/attachments/**"
- "**/**attachment**"

"feature: authentication":
- "**/authentication/**"
- "**/auth/**"
- "**/**sign_in**"
- "**/**sign_out**"
- "**/**sign_up**"
- "**/**registration**"
- "**/**login**"

"feature: comments":
- "**/comments/**"
- "**/**comment**"

"feature: donation":
- "**/donate/**"
- "**/donate**"

"feature: feedback":
- "**/feedback/**"
- "**/**feedback**"

"feature: file-sharing":
- "**/filesharing/**"
- "**/file_sharing/**"

"feature: group permissions":
- "**/group_permissions/**"
- "**/**permission**"

"feature: groups:classes":
- "**/school_class/**"
- "**/school_class**"

"feature: groups:courses":
- "**/course/**"
- "**/**course**"

"feature: groups":
- "**/groups/**"
- "**/**group**"
- "lib/group_domain_implementation/**"
- "lib/group_domain_models/**"
# We still have some old code that uses the term "gruppe" instead of "group"
- "**/**gruppe**"

"feature: holidays":
- "**/holidays/**"
- "**/**holiday**"

# We don't have any files for the homework reminder feature yet (only
# notification.dart), so we can't list any paths here.
#
# "feature: homework reminder":

"feature: homework":
- "**/homework/**"
- "**/**homework**"
- "lib/hausaufgabenheft_logik/**"

"feature: homework-submissions":
# We still have some old code that uses the term "abgabe" instead of
# "submission"
- "**/abgabe/**"
- "**/**abgabe**"
- "**/**submission**/**"
- "**/**submission**"

"feature: information sheet":
- "**/blackboard/**"
- "**/**blackboard**"

"feature: navigation":
- "**/**navigation**/**"
- "**/navigation**"
- "**/drawer/**"
- "**/**drawer**"

"feature: notifications":
- "**/notifications/**"
- "**/**notification**"
- "app/**/firebase_auth_token_retreiver_impl.dart"

"feature: onboarding":
- "**/onboarding/**"
- "**/**onboarding**"

"feature: report":
- "**/report/**"

"feature: timetable / calendar":
- "**/timetable/**"
- "**/**timetable**"
- "**/**lesson**"
- "**/**lesson**/**"
- "**/calendrical_events/**"

"feature: universal file features":
- "**/filesharing/**"
- "**/**file**"

"user: parent":
- "**/parent/**"
- "**/**parent**"

"user: pupil / student":
- "**/student/**"
- "**/**student**"

"user: teacher":
- "**/teacher/**"
- "**/**teacher**"
# We still have some old code that uses the term "lehrer" instead of "teacher"
- "**/lehrer/**"