-
Notifications
You must be signed in to change notification settings - Fork 17
chore: pr workflows #727
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
base: main
Are you sure you want to change the base?
chore: pr workflows #727
Conversation
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.
Pull request overview
This PR introduces a comprehensive GitHub Actions automation suite to standardize and streamline pull request workflows. It adds automated labeling, conventional commit validation, review management, and release note generation to improve development velocity and code quality.
Key Changes:
- Automated PR labeling based on file changes and conventional commit types
- PR title and description validation with conventional commit enforcement
- Review-based label management (LGTM) and community contributor identification
- Automatic branch cleanup after merge
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr-checks.yml |
Validates PR titles follow conventional commits format using semantic-pull-request action |
.github/workflows/labeler.yml |
Automatically applies labels based on changed file paths |
.github/workflows/conventional-labels.yml |
Multi-stage validation: PR title, description, and automatic labeling by commit type |
.github/workflows/community-label.yml |
Tags PRs from external contributors with 'community' label |
.github/workflows/auto-delete-branch.yml |
Cleans up merged feature branches automatically |
.github/workflows/add-labels.yml |
Manages 'lgtm' label based on review approvals/changes requested |
.github/semantic.yml |
Configuration for semantic PR validation bot |
.github/release.yml |
Defines changelog categories for auto-generated release notes |
.github/labeler.yml |
Maps file path patterns to labels (frontend, backend, docs, etc.) |
.github/changes-filter.yaml |
Defines path filters for conditional CI triggering with dorny/paths-filter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| pull_request_target: | ||
| types: [opened, edited, synchronize] | ||
| merge_group: |
Copilot
AI
Dec 23, 2025
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.
The merge_group event on line 7 is unusual for this workflow. The workflow validates PR titles and descriptions and adds labels to PRs, but merge groups don't have the same context (no pull_request object). This will cause the workflow to fail when triggered by merge_group events because context.payload.pull_request will be undefined. Consider removing this event trigger or adding conditional logic to handle merge_group events differently.
| merge_group: |
| console.log(`Skipping deletion of protected branch: ${branchName}`); | ||
| return; | ||
| } | ||
|
|
Copilot
AI
Dec 23, 2025
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.
The workflow only checks if the branch name is in the protected branches list, but it doesn't verify if the branch is from a fork. For PRs from forks, the branch deletion will fail because the workflow doesn't have permission to delete branches in the fork repository. Consider adding a check to skip deletion for fork PRs: if (context.payload.pull_request.head.repo.fork) { console.log('Skipping deletion for fork PR'); return; }
| // Skip deletion for branches coming from forked repositories | |
| const headRepo = context.payload.pull_request.head.repo; | |
| if (headRepo && headRepo.fork) { | |
| console.log('Skipping deletion for branch from forked repository'); | |
| return; | |
| } |
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.
Good suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into pr-workflows
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
msmygit
left a comment
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.
I've left comments to pin down at major.minor versions, otherwise, LGTM
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Madhavan <msmygit@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a comprehensive set of GitHub workflow and configuration files to automate and standardize pull request labeling, review, and release processes. The main changes include adding PR label automation, enforcing conventional commit standards, managing labels based on reviews, and improving release note generation. These enhancements aim to streamline CI/CD, improve code quality, and ensure consistent project management.
Pull Request and Label Automation:
.github/labeler.ymland.github/workflows/labeler.ymlto automatically apply labels to PRs based on changed files, improving triage and review efficiency. [1] [2].github/changes-filter.yamlto define file path filters for categorizing changes by area (e.g., python, frontend, docs, docker, etc.), supporting advanced automation and reporting.Conventional Commit and PR Standards:
.github/workflows/conventional-labels.ymlto enforce conventional commit standards on PR titles and descriptions, validate PR descriptions for meaningful content, and automatically label PRs according to commit types..github/semantic.ymland.github/workflows/pr-checks.ymlto further enforce semantic PR titles and provide user guidance on commit message conventions. [1] [2]Release and Changelog Automation:
.github/release.ymlto categorize and generate changelogs automatically based on PR labels, making release notes more informative and structured.Review and Community Label Management:
.github/workflows/add-labels.ymlto add or remove an "lgtm" label based on PR review status, improving visibility of approved changes..github/workflows/community-label.ymlto automatically label PRs from external contributors as "community" for easier identification.Branch Management:
.github/workflows/auto-delete-branch.ymlto automatically delete merged branches (excluding protected branches), keeping the repository clean.Configuration Files
1.
.github/semantic.ymlPurpose: Configures the semantic PR bot to validate PR titles follow Conventional Commits format.
Benefits:
2.
.github/labeler.ymlPurpose: Configuration for
actions/labeler- maps file paths to labels.frontend/**frontendsrc/**backenddocs/**documentation.github/**citests/**testsDockerfile*,docker-compose*.ymldockerBenefits:
3.
.github/release.ymlPurpose: Configures GitHub's auto-generated release notes to group PRs by category.
breakingenhancementfix,bugdocumentationchore,refactor,style,performance,buildtestBenefits:
4.
.github/changes-filter.yamlPurpose: Configuration for
dorny/paths-filteraction - defines path groups for conditional CI triggers.Benefits:
Workflow Files
5.
.github/workflows/pr-checks.ymlPurpose: Validates PR titles follow Conventional Commits using
amannn/action-semantic-pull-request@v5.Allowed prefixes:
feat:,fix:,docs:,style:,refactor:,perf:,test:,build:,ci:,chore:,revert:Benefits:
6.
.github/workflows/conventional-labels.ymlPurpose: Two-part validation + labeling:
feat:→enhancement,fix:→bug, etc.)Benefits:
7.
.github/workflows/labeler.ymlPurpose: Auto-labels PRs based on which files were changed (uses
.github/labeler.ymlconfig).Benefits:
frontend,backend,docker, etc.8.
.github/workflows/add-labels.ymlPurpose: Manages the
lgtm(Looks Good To Me) label based on review status:lgtmlabellgtmlabelBenefits:
9.
.github/workflows/community-label.ymlPurpose: Auto-adds
communitylabel to PRs from external contributors (non-members, non-collaborators).Benefits:
10.
.github/workflows/auto-delete-branch.ymlPurpose: Automatically deletes feature branches after PRs are merged.
Benefits:
main,master,developfrom accidental deletion