This repository uses an automatic labeling system to apply labels to pull requests based on the files changed, PR title, and PR body content. This helps organize and categorize PRs efficiently.
Defines rules for automatically applying labels based on:
- File paths: Labels are applied when specific files or patterns are changed
- PR title: Labels are applied based on conventional commit prefixes (e.g.,
feat:,fix:,docs:) - PR body: Labels are applied based on checkboxes in PR descriptions
- Change size: Automatic size labels based on number of files changed
A manual workflow that creates and updates all repository labels with:
- Consistent colors
- Clear descriptions
- Option to recreate all labels from scratch
To run this workflow:
- Go to Actions → Setup Repository Labels
- Click Run workflow
- Choose whether to recreate all labels (optional)
- Wait for completion
An automatic workflow that runs on every pull request to apply labels based on the configuration in labeler.yml.
Triggers:
- When a PR is opened
- When a PR is synchronized (new commits)
- When a PR is reopened
- When a PR is edited
feature- New feature or requestenhancement- Enhancement to existing functionality
bug- Something isn't working
ui- User interface improvementsdesign- Design and styling updates
i18n- Internationalization and localization (automatically applied when translation files are changed)
infrastructure- CI/CD and infrastructuredeployment- Deployment-related changesperformance- Performance improvementsconfig- Configuration changes
refactor- Code refactoringquality-checks- Quality checks and validation
security- Security improvementscompliance- Compliance and ISMS-relatedaccessibility- Accessibility improvements
documentation- Documentation updates
dependencies- Dependency updates
copilot- GitHub Copilot configurationagents- GitHub Copilot agentsskills- GitHub Copilot skills
content-pages- Main website pagescontent-blog- Blog contentcontent-projects- Project showcase pagescontent-isms- ISMS policy pagescontent-services- Services and industries
assets- Images, icons, and media files
seo- SEO and sitemap changes
area-homepage- Homepage changesarea-cia- Citizen Intelligence Agencyarea-blacktrigram- Black Trigram gamearea-compliance- Compliance Manager
size-xs- Extra small change (1-10 files)size-s- Small change (11-30 files)size-m- Medium change (31-100 files)size-l- Large change (101-500 files)size-xl- Extra large change (500+ files)
priority-high- High prioritypriority-medium- Medium prioritypriority-low- Low priority
good first issue- Good for newcomershelp wanted- Extra attention is neededwontfix- This will not be worked onduplicate- This issue or pull request already existsinvalid- This doesn't seem rightquestion- Further information is requested
Labels are automatically applied based on the files you change. For example:
- Changing
*.htmlfiles →content-pageslabel - Changing files with
_sv.html,_de.html, etc. →i18nlabel - Changing
.github/workflows/*→infrastructurelabel - Changing
SECURITY.md→securitylabel
Use conventional commit prefixes in your PR title:
feat:orfeature:→featurelabelfix:orbug:→buglabeldocs:ordoc:→documentationlabelperf:oroptimize:→performancelabelrefactor:→refactorlabelsecurity:→securitylabel
Add checkboxes to your PR description:
- [x] 🚀 New Feature/Enhancement→featurelabel- [x] 🐛 Bug Fix→buglabel- [x] 🎨 UI/UX Improvements→uilabel- [x] 🏗️ Infrastructure & DevOps→infrastructurelabel- [x] 🔒 Security & Compliance→securitylabel- [x] 📝 Documentation→documentationlabel- [x] 📦 Dependencies Update→dependencieslabel
- Run the Setup Repository Labels workflow to create all labels
- The Labeler workflow will automatically start working on new PRs
- Edit
.github/labeler.ymlto add or modify labeling rules - Commit and push changes
- New rules will apply to subsequent PRs
- Edit
.github/workflows/setup-labels.ymlto modify label colors or descriptions - Commit and push changes
- Run the Setup Repository Labels workflow to apply updates
Files changed:
services_sv.html
Labels automatically applied:
i18n(internationalization)content-services(services content)size-xs(1 file changed)
Files changed:
blog-new-post.htmlblog-new-post_sv.htmlblog-new-post_de.htmlblog-new-post_es.html- ... (13+ language variants)
Labels automatically applied:
content-blog(blog content)i18n(internationalization)size-sorsize-m(depending on file count)
Files changed:
.github/workflows/main.yml
PR title:
ci: Optimize deployment to S3
Labels automatically applied:
infrastructure(workflow file changed)deployment(main.yml changed)size-xs(1 file changed)
Files changed:
SECURITY.mdSECURITY_ARCHITECTURE.md.github/workflows/scorecards.yml
PR title:
security: Update security documentation and workflow
Labels automatically applied:
security(security files changed + title prefix)documentation(markdown files changed)infrastructure(workflow changed)size-xs(3 files changed)
- Check that the Setup Repository Labels workflow has been run at least once
- Verify that the
.github/labeler.ymlfile exists in the default branch - Check the Labeler workflow logs in the Actions tab
- Confirm the labeler workflow run completed successfully for the PR (including fork PRs); the workflow uses
pull_request_target, so it can label forks as long as it does not check out or execute untrusted PR code
- Add the label definition to
.github/workflows/setup-labels.yml - Add the labeling rule to
.github/labeler.yml - Run the Setup Repository Labels workflow
- New PRs will use the updated configuration
- Review the rules in
.github/labeler.yml - Adjust file patterns or conditions as needed
- Manually remove incorrect labels from the PR
- Update the configuration for future PRs
- Use conventional commit prefixes in PR titles for consistent labeling
- Include checkboxes in PR descriptions to trigger specific labels
- Run Setup Labels workflow after adding new label types
- Review automatically applied labels and adjust manually if needed
- Keep labeler.yml updated as the repository structure evolves
- Document new label categories when adding significant new labels
The labeler workflow uses pull_request_target trigger which:
- Runs in the context of the base repository (not the fork)
- Has write access to apply labels
- Is hardened with step-security/harden-runner for audit logging
- Uses minimal permissions: contents:read, pull-requests:write, issues:write
- Does not check out or execute untrusted PR code
This ensures safe operation even when processing PRs from untrusted forks, as long as the workflow does not check out or run code from the PR.
- Quarterly: Review label usage and consolidate unused labels
- When needed: Update
.github/labeler.ymlfor new file patterns - When needed: Update
.github/workflows/setup-labels.ymlfor new label types
- Check the Actions tab for workflow failures
- Review PRs to ensure labels are applied correctly
- Gather feedback from contributors about labeling accuracy
Last Updated: 2026-02-15
Maintained By: Hack23 DevOps Team