Skip to content

GitHub Action for enforcing PR Validation for Changelog Labels and Milestones#22038

Merged
mhkuu merged 1 commit intotrunkfrom
pr-validation
Feb 13, 2025
Merged

GitHub Action for enforcing PR Validation for Changelog Labels and Milestones#22038
mhkuu merged 1 commit intotrunkfrom
pr-validation

Conversation

@rohans456
Copy link
Copy Markdown
Contributor

@rohans456 rohans456 commented Feb 13, 2025

Context

To improve PR tracking and ensure proper release management, we want to prevent merging PRs unless they have:

  1. A changelog label that starts with changelog:
  2. A milestone assigned

This PR introduces a GitHub Action that enforces these rules, making sure PRs are properly labeled before merging.

Summary

This PR can be summarized in the following changelog entry:

  • Adds validation to a PR, checking if it has a proper changelog label and milestone attached.

Relevant technical choices:

  • The GitHub Action runs on all PR updates (opened, edited, labeled, unlabeled, etc.).
  • It checks for a changelog label and milestone, failing if either is missing.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  1. Open a new PR without a changelog label or milestone.
  • ❌ The check should fail.
  1. Add a changelog label (e.g., changelog: enhancement).
  • ❌ The check should still fail (since milestone is missing).
  1. Assign a milestone to the PR.
  • ✅ The check should now pass.

Additional Scenarios

  • Test with different changelog labels (e.g., changelog: bugfix).
  • Remove the milestone after adding it → PR should fail validation again.
  • Test on a PR with multiple labels, ensuring only one changelog: label is required.

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

This PR affects:

  • Pull request validation and merging process
  • GitHub Actions workflow

UI changes

No UI changes in the plugin itself.

Quality assurance

  • I have tested this code to the best of my abilities.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.

@rohans456 rohans456 added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Feb 13, 2025
@rohans456 rohans456 added this to the feature/lingo-fixes milestone Feb 13, 2025
@mhkuu mhkuu added changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog and removed changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog labels Feb 13, 2025
@mhkuu mhkuu modified the milestones: feature/lingo-fixes, 24.6 Feb 13, 2025
@mhkuu mhkuu merged commit a73434a into trunk Feb 13, 2025
@mhkuu mhkuu deleted the pr-validation branch February 13, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants