-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add auto labeler workflow #205
Conversation
Signed-off-by: Tyler Ohlsen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #205 +/- ##
=======================================
Coverage 45.90% 45.90%
=======================================
Files 150 150
Lines 4956 4956
Branches 955 968 +13
=======================================
Hits 2275 2275
Misses 2463 2463
Partials 218 218 Continue to review full report at Codecov.
|
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really helpful!
Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit f028924)
Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit f028924)
Signed-off-by: Tyler Ohlsen [email protected]
Description
This PR adds a labeling github action which is triggered on PRs opening to
main
. There are 2 added files:.github/labeler.yml
: configures the labels to add to the PR, if the PR's changed files match any of the glob patterns specified. For example, this adds adependencies
label whenever a PR is opened that changesyarn.lock
..github/workflows/labeler.yml
: the actual github action which uses the specified config. Uses permissions from the OpenSearch GitHub app to be able to write to the PR, since that is not possible using the defaultGITHUB_TOKEN
. For more details see here, hereExample PR of this working in my forked repo (using a personal bot in order to get permissions to write to PRs in this repo): ohltyler#7 (auto-label workflow run: link)
Notes:
backport 1.x
- this is because this plugin is not tracking the next major version (2.0.0), and so all changes merged tomain
currently are being backported to1.x
branch already (note this will need to change when moving to2.0.0
compatibility / having2.x
branch). Also notebackport 1.x
is the branch name used by the auto-backport bot to open a backport PR to1.x
branch when a PR is merged, so this closes the gap and allows for a fully automated way to open a PR -> merge PR -> backport to release branch.yarn.lock
was originally changed and then reverted within the PR, the labeler would add and remove thedependencies
label as well.github/**/*
pattern had to be added separately inbackport 1.x
label due to the labeler not picking up directories starting with.
by defaultTODO: understand the github bot permissions and if it can be used for this github action. Until then, this PR is blocked when trying to use the default repo token. Ref: actions/first-interaction#10, use of an app to solve: mentioned hereCheck List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.