-
Notifications
You must be signed in to change notification settings - Fork 173
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
[#1104] add GitHub workflow to label PRs automatically #1142
Conversation
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.
Thanks lot for initiative @Harry262530 🙏🏼
Don't worry about the configuration file, I can take care of that part, but I'm not sure when I'll find the time, so it might take a while.
.github/prlabeller.yml
Outdated
@@ -0,0 +1,21 @@ | |||
# Add repo label to any change in any file |
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 just the example config from the GitHub action, right?
That does not suit for us, but that's not a problem.
I will take care of adapting the config accordingly.
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.
yah,
basically i was trying to give at least one label to any issue as 'repo'
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.
I see, but we don't use such a label
You can find an overview of all our labels here
Feel free to improve the config, if you want to
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.
sure,
i will try my level best
.github/workflows/prlabelling.yaml
Outdated
run-name: ${{ github.actor }} created Pull Request Labeler | ||
|
||
on: | ||
- pull_request_target |
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.
If I am not mistaken, this event is only produced when a PR from a forked repository is created.
This is not what we desire here. I think the more general pull_request
event is better suited for us and we should filter on opening events. Read more about that here: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
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.
thanks for the advice
should I change it and then send another pr?
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.
You can just leave this PR open and push new commits to your existing branch, then this PR is updated automatically
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.
sure,
i'll do that
config_merge.yml
Outdated
@@ -0,0 +1,18 @@ | |||
name: 'PRLabeler' |
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.
What's the purpose of this file?
From my understanding, we only need the other two files.
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.
actually for the past 1 day i studied about pull request and labels so I saw this file on one repo, so I included it
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.
Can you provide me with a link to an example?
.github/workflows/prlabelling.yaml
Outdated
on: | ||
- pull_request_target | ||
|
||
jobs: |
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.
It would be great if you could filter for PRs created by @dependabot
To do so you can follow this example here
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.
should i assign permissions ,contents and pull request or just leave it for default
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.
I think this looks fine for now
.github/pr-labeler-config.yml
Outdated
@@ -0,0 +1,46 @@ | |||
backend: | |||
# TODO |
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.
@tenthe @dominikriemer what do you think we should provide here?
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.
Not sure if it's possible but we could filter for all modules starting with streampipes-* except streampipes-extensions and non-java modules
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.
Had the same idea, I'll have a look if the config's syntax allows for that
@tenthe @dominikriemer I came with an initial version of the label config |
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.
Looks good to me!
.github/pr-labeler-config.yml
Outdated
@@ -0,0 +1,46 @@ | |||
backend: | |||
# TODO |
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.
Not sure if it's possible but we could filter for all modules starting with streampipes-* except streampipes-extensions and non-java modules
.github/pr-labeler-config.yml
Outdated
|
||
'pipeline elements': | ||
- streampipes-exensions/streampipes-extensions-*/**/* | ||
- streampipes-extensions/streampipes-pipeline-*/**/* |
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.
Do we have such a module in streampipes-extensions currently?
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.
Purpose
Implement a GitHub workflow that automatically assigns labels to PRs.
Fur this purpose consider to use the following GitHub action: https://github.com/actions/labeler
ToDos:
Remarks
PR introduces (a) breaking change(s): no
PR introduces (a) deprecation(s): no