wanderlust icon indicating copy to clipboard operation
wanderlust copied to clipboard

[FEATURE] Github Action to validate the PR

Open sanmarg opened this issue 9 months ago • 9 comments

Description

Task: As soon as the PR is raised, GitHub Bot should check the PR content and see and match it with regex basically our format and check the commits for the community guidelines and prompt saying you have not followed the code guidelines and then close the PR if it doesn't follow

Use Case

Helps to automate the task

Proposed Solution

You need to write a github action on PR raised trigger and may be run a script

Acceptance criteria

  1. PR should have title of "tag-#: title" or "tag:title" format
  2. The commit should have the very similar "tag-#: title" or "tag-: title" format, you might have to iterate through all the commits
  3. The commit regex to be run as soon as commit is pushed in the PR even, see if it requires another workflow bot!?
  4. It should have all of these four titles image
  5. And the Issue(s) address section shouldn't have the default description like this image

Attachments

No response

sanmarg avatar May 13 '24 18:05 sanmarg

image

How can you have please assign to me in the description???!!

krishnaacharyaa avatar May 14 '24 03:05 krishnaacharyaa

Hi @Mayur-666, I have updated the acceptance criteria, please look into it, make sure you actualy test it in your other project and confirm things and then raise PR. If it is too much feel free to split into diff PRs so you can get max points.

cc: @sanmarg

krishnaacharyaa avatar May 14 '24 03:05 krishnaacharyaa

Hi @Mayur-666 Let's take this .... And start with this as discussed... Let's not mix anything for this .. And it is not greeting message.. As mentioned in the closed PR comment section

krishnaacharyaa avatar May 14 '24 06:05 krishnaacharyaa

well it is working, some checks are still required, want to confirm -> is it what you were looking ??

Screenshot (542)

Screenshot (543)

The github bot auto closed pr cause pr title did not followed a specific pattern, it checks for body too.

Mayur-666 avatar May 14 '24 07:05 Mayur-666

@krishnaacharyaa

Mayur-666 avatar May 14 '24 07:05 Mayur-666

The github bot auto closed pr cause pr title did not followed a specific pattern, it checks for body too.

First can we have for the title only in the first try and let it not directly auto close tell them why it is closed, i don't see any error message in the first one. And the error message should be very very understandable.

Like Hey Thanks for your PR, But unfortunately it doesn't meet quality checks!! Wait!!! Have you gone through our contribution guidelines? I guess you didn't care xD

I'll not let you raise the PR until you follow the regex!! -> "-: Title of the PR" Didn't get it? I guess so take a look at this example. It should be something like "fix-#124: Added responsivenes to the Home page screen"

Give it a try, I may reopen it for you;)

Keep it mean, keep it funny and like the guy in the other github i shared you , it needs to reopen once he corrects it.... Can we just focus on only this PR title part? close with mean, funny error message and then auto open if it is correct!

@Mayur-666 I know I am crazy, But I guess you can relate tooo know ;)

krishnaacharyaa avatar May 14 '24 08:05 krishnaacharyaa

@Mayur-666 acknowledgement? Or very scary feature request?

krishnaacharyaa avatar May 14 '24 14:05 krishnaacharyaa

@krishnaacharyaa I'll try sir, but not able to work on it for next 2 days. Going off town with my brother for his CUET exam.

Mayur-666 avatar May 14 '24 17:05 Mayur-666

@Mayur-666 can you join the discord, people are working on it parallely

krishnaacharyaa avatar May 16 '24 07:05 krishnaacharyaa