Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Github Action: Add Auto Labeler for community PR and Issues #5224

Conversation

MustafaJafar
Copy link
Contributor

@MustafaJafar MustafaJafar commented Jun 30, 2023

Changelog Description

A github action that automatically add community contribution label for PR and Issues

It works (kind of, it keeps labeling this PR as community support 🙂) .

@ynbot ynbot added type: feature Larger, user affecting changes and completely new things size/XS Denotes a PR changes 0-99 lines, ignoring general files labels Jun 30, 2023
@MustafaJafar MustafaJafar requested a review from mkolar June 30, 2023 16:49
@MustafaJafar MustafaJafar marked this pull request as draft June 30, 2023 19:30
@BigRoy
Copy link
Collaborator

BigRoy commented Jun 30, 2023

I noticed an invalid label existing currently - is that due to testing this PR or some human error elsewhere? :)

image

There's now a label community_contribution_ with an underscore at the end.

@MustafaJafar
Copy link
Contributor Author

There's now a label community_contribution_ with an underscore at the end.

It was a typo error

Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

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

LGTM!

@MustafaJafar
Copy link
Contributor Author

MustafaJafar commented Sep 22, 2023

Thanks, I believe this condition may need some tweaks because it labels me as community although github recognizes me as a member of Ynput
image

${{ github.event_name == 'pull_request' && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' }}

@jakubjezek001
Copy link
Member

try it with

${{ github.event_name == 'pull_request' && github.event.pull_request.author_association != 'MEMBER' || github.event.pull_request.author_association != 'OWNER' }}

@BigRoy
Copy link
Collaborator

BigRoy commented Oct 30, 2023

try it with

${{ github.event_name == 'pull_request' && github.event.pull_request.author_association != 'MEMBER' || github.event.pull_request.author_association != 'OWNER' }}

Wouldn't that technically just make it occur even more often and thus won't fix the issue since @MustafaJafar wants himself to be not marked as community contribution?

@MustafaJafar
Copy link
Contributor Author

MustafaJafar commented Nov 24, 2023

I added some debugging code, thanks to this post
the added GH action labels this PR as community contribution because my authorization level is set to contributor.
so, I shall say this PR works properly :D but not for me :'D .

image

@MustafaJafar MustafaJafar removed their assignment Nov 24, 2023
@MustafaJafar
Copy link
Contributor Author

MustafaJafar commented Jan 3, 2024

Closing this PR because I can't figure out how to deal with this.
#5224 (comment)

Maybe, This PR will be revisited later.

@ynbot ynbot added this to the next-patch milestone Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community contribution size/XS Denotes a PR changes 0-99 lines, ignoring general files type: feature Larger, user affecting changes and completely new things
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants