Repository navigation
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the GitHub labeler to apply Sequence diagram for PR label refresh eventssequenceDiagram
participant Author
participant GitHub
participant LabelerWorkflow
participant ActionsLabeler
participant PR
Author->>GitHub: Open, synchronize, reopen, or edit PR
GitHub->>LabelerWorkflow: pull_request_target event
LabelerWorkflow->>ActionsLabeler: Run with GITHUB_TOKEN
ActionsLabeler->>PR: Evaluate changed files
ActionsLabeler->>PR: Add matching labels
ActionsLabeler->>PR: Remove stale configured labels
PR-->>Author: Refreshed labels
Flow diagram for frontend PR label assignmentflowchart TD
A[Changed files in PR] --> B{Path matches frontend/**}
B -->|yes| C[Add frontend label]
B -->|no| D[No frontend label]
C --> E{File extension matches}
E -->|.ts or .tsx| F[Add typescript label]
E -->|.js .jsx .mjs or .cjs| G[Add javascript label]
E -->|other| H[No language label]
D --> I[Other configured rules]
F --> J[Sync labels]
G --> J
H --> J
I --> J
J --> K[Remove stale configured labels]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the label patterns or sync behavior are wrong, the workflow can add or remove labels on pull requests and issues, including manually applied labels that reverting will not restore automatically. The damage is bounded and can be repaired by relabeling, while the added issues-write permission expands what the CI token can change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The labeler currently assigns
javascriptto every change underfrontend/, including TypeScript, CSS, and package files. Split that rule into three labels:frontendfor any file in the frontend directorytypescriptfor.tsand.tsxfilesjavascriptfor.js,.jsx,.mjs, and.cjsfilesThe workflow can create the two new labels and now removes configured labels that no longer match when a PR is updated. Editing a PR also refreshes its labels.
Type of change
Testing
git diff --check.javascriptalongsidetypescriptafter relabeling.Checklist
CONTRIBUTING.md.actions/labelerv7 rules and permissions.Additional notes
The labeler runs from the base branch on
pull_request_targetand does not check out PR code. After this PR merges, existing open PRs will use the new rules when they receive an edit, new commit, or reopen event. The new rules cannot relabel this PR while they are still only on its branch.Summary by Sourcery
Improve pull request labeling so frontend changes are classified by directory and file type.
Bug Fixes:
Enhancements:
CI: