p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Add Auto-Labeling for Issues using GitHub Actions

Open Vineet1101 opened this issue 9 months ago • 1 comments

This pr is to add automation in adding labels to issue in the p4c repo. I have used github actions to implement this Here's a demo video

https://github.com/user-attachments/assets/b5807199-1eed-465d-ab72-09914c6f599f

Vineet1101 avatar Feb 20 '25 05:02 Vineet1101

@fruffy @jafingerhut please review this pr

Vineet1101 avatar Feb 20 '25 05:02 Vineet1101

@fruffy any suggestions you would like to give

I will give this a thorough look later. run-xyz you do not need to map.

Vineet1101 avatar Feb 28 '25 09:02 Vineet1101

@fruffy any suggestions you would like to give

I will give this a thorough look later. run-xyz you do not need to map.

You do not have to worry about labels such as run-ubuntu18 or run-sanitizer. These are for pull request to run specific workflows.

fruffy avatar Mar 02 '25 12:03 fruffy

@fruffy I have made the changes

Vineet1101 avatar Mar 02 '25 13:03 Vineet1101

@fruffy ya sure I will update the video but I thing i would like to suggest is that we should mention somewhere that one can use [bug] like this thing title to automatically add labels

Vineet1101 avatar Mar 03 '25 19:03 Vineet1101

@fruffy ya sure I will update the video but I thing i would like to suggest is that we should mention somewhere that one can use [bug] like this thing title to automatically add labels

The best way to do this is probably as a hint in an issue template. We do not have these templates yet.

fruffy avatar Mar 03 '25 19:03 fruffy

@fruffy one more thing for now this file only self tags issue do you want this on pull request also??

Vineet1101 avatar Mar 03 '25 19:03 Vineet1101

Hey @fruffy can you please tell if you want this auto labelling feature on pr also so that I can modify the code a little bit

Vineet1101 avatar Mar 07 '25 19:03 Vineet1101

Hey @fruffy can you please tell if you want this auto labelling feature on pr also so that I can modify the code a little bit

Yeah for PRs these tags also make sense. Except bug, question, enhancement or similar.

fruffy avatar Mar 07 '25 22:03 fruffy

@fruffy I modified to the code to auto label pr as well you can review it whenever you have time. I have also updated the pr description

Vineet1101 avatar Mar 08 '25 00:03 Vineet1101

hey @fruffy can you review these changes

Vineet1101 avatar Mar 13 '25 15:03 Vineet1101

Let's try it and see how it will work out!

sure

Vineet1101 avatar Mar 14 '25 00:03 Vineet1101

@Vineet1101 The DCO check is failing. If you look at the PR web page here https://github.com/p4lang/p4c/pull/5136 and scroll down to the list of tests, click on the test name "DCO" to see instructions on enabling that check to pass. Or if you find it easier you can create a separate PR with the same changes, ensuring that you use only 'git commit -s .' (with the '-s' command line option) to sign your commits.

jafingerhut avatar Mar 15 '25 02:03 jafingerhut

@jafingerhut I have added sign off message to that commit

Vineet1101 avatar Mar 15 '25 10:03 Vineet1101

@Vineet1101 The DCO check is failing. If you look at the PR web page here #5136 and scroll down to the list of tests, click on the test name "DCO" to see instructions on enabling that check to pass. Or if you find it easier you can create a separate PR with the same changes, ensuring that you use only 'git commit -s .' (with the '-s' command line option) to sign your commits.

This is a bug in the DCO check that happens when multiple people work on a PR. I think we can ignore that one.

fruffy avatar Mar 15 '25 12:03 fruffy