Skip to content
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

Implement PR Issue Checker Workflow #719

Closed
smog-root opened this issue Oct 19, 2024 · 2 comments
Closed

Implement PR Issue Checker Workflow #719

smog-root opened this issue Oct 19, 2024 · 2 comments
Assignees
Labels
Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. enhancement New feature or request gssoc-ext hacktoberfest level2 Status: Assigned Indicates an issue has been assigned to a contributor.

Comments

@smog-root
Copy link
Contributor

Description: We need to create a GitHub Actions workflow that automates the validation of pull requests (PRs). This workflow will ensure that all PRs meet the following criteria before being merged:

PR Description Check: Every PR must have a description. If the description is missing, the PR should fail the check.

Issue Reference Check: The PR description must include an issue reference in the format Fixes #. If the PR is not addressing an existing issue, it should mention Fixes #NEW as a placeholder.

Acceptance Criteria:

  • A GitHub Action workflow is triggered on PR events (opened, edited).

The workflow checks the PR body for:

  • A non-empty description.
  • The presence of Fixes # or Fixes #NEW.

If the criteria are not met:

  • The workflow should fail and return clear error messages.

If the checks pass:

  • A confirmation message is outputted.

Expected Output:

  • Error message if the PR description is missing.
  • Error message if the issue reference is missing or incorrectly formatted.
  • Success message when all checks are satisfied.

Additional Notes:

  • This issue may serve as a foundation for more advanced PR validation (e.g., commit message format, label enforcement).
  • We can later extend this to check for specific branch naming conventions or enforce the addition of specific labels.

Note: i'm expecting a gssoc-ext with level3 (or) level2 and a hacktoberfest-accepted label!

@UTSAVS26

Copy link

🙌 Thank you for bringing this issue to our attention! We appreciate your input and will investigate it as soon as possible.

Feel free to join our community on Discord to discuss more!

@UTSAVS26 UTSAVS26 added enhancement New feature or request Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. Status: Assigned Indicates an issue has been assigned to a contributor. level2 gssoc-ext hacktoberfest labels Oct 20, 2024
UTSAVS26 added a commit that referenced this issue Oct 22, 2024
**FIX** #719 

**Usage:**

1. When a pull request is created or edited, the workflow automatically
triggers.

2. The workflow checks for:
- A non-empty PR description.
- A valid issue reference format (`FIX #<issue-number>` or `FEAT, or DOC
#NEW`).
3. If either check fails, the PR will be marked as failing, and the
author will receive clear error messages in the PR comments.
4. If all checks pass, a confirmation message will indicate that the PR
is valid.

**_Note_**: Kindly add all the labels added to the issue, to this PR!

@UTSAVS26
Copy link

✅ This issue has been closed. Thank you for your contribution! If you have any further questions or issues, feel free to join our community on Discord to discuss more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. enhancement New feature or request gssoc-ext hacktoberfest level2 Status: Assigned Indicates an issue has been assigned to a contributor.
Projects
None yet
Development

No branches or pull requests

2 participants