-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
feat: workflow to add labels based on title and comment #1296
feat: workflow to add labels based on title and comment #1296
Conversation
that will analyse different section and add labels 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.
Thank you, Anmol-Baranwal, for creating this pull request and contributing to LinksHub! 💗
The maintainers will review this Pull Request and provide feedback as soon as possible! 😇
We appreciate your patience and contribution, Keep up the great work! 😀
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@k-deepak04 Did you cross-check all the things properly. |
yes, the code seems okay to me. so merged that i didn't test it though. can we test it without merging? |
Yeah, we cannot test it without merging. But we can see if there are repositories that use this to understand the working. |
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 ok to me. Let's see what the others think.
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 nice to me, but i wanted to know, if the contributor adds wrong title and then correct that later, will also modify the labels?
No, it will only check when the PR/Issue is opened or re-opened. Suppose a contributor changes the title, then the workflow would need to check the comment to see if the title has been changed. However, checking every comment on every issue or PR would not be appropriate, especially if there are 100+ issues. This could lead to a warning from GitHub Actions. @rupali-codes issues:
types:
- opened
- edited Please confirm whether we should include this for issues or not. |
@Anmol-Baranwal alright, i guess we should keep it to PRs only, as we already adding labels to issues via templates, |
Done. |
Hey @rupali-codes. Are we going to merge this PR or?? |
@CBID2 lets merge it |
@rupali-codes
Reference: https://github.com/hoho4190/issue-pr-labeler
Fixes Issue
Closes #1056
About Regex Expression
You can test it here: https://regex101.com/
I am taking two examples, which you must read so that you can properly review the PR.
/\bfeat\b/
: This regular expression matches the exact word "feat" with word boundaries (\b
). It will match strings that contain the word "feat" as a whole word, but not if it's part of another word (e.g., "defeat" or "feature")./feature/i
: This regular expression matches the word "feature" (case-insensitive) anywhere within a string. It will match strings that contain "feature" in any combination of uppercase and lowercase letters (e.g., "Feature", "FEATURE", "feature").What you need to
goal: build
that I have used since there was none. So, you can create them, or it will automatically be created during the analysis, but it will not be permanently stored in the labels of the repository.Double check the issue forms, and the labels in the repository, because it will be a huge mess if the label is wrong.
I don't really know how
comment
would work. I have written a workflow that can read comments on a PR, but is this the description of the issue or PR? I am not sure, so please check at your end.Changes proposed
Reference
There are two workflows that I found to implement this:
Note to reviewers