Skip to content

Update Installation Procedures for Release 2027.0.0 #1

Update Installation Procedures for Release 2027.0.0

Update Installation Procedures for Release 2027.0.0 #1

Workflow file for this run

name: Auto Label PRs and Issues
on:
pull_request:
types: [opened, edited, synchronize]
issues:
types: [opened, edited]
permissions:
contents: read
issues: write
pull-requests: write
jobs:
label-by-paths:
name: Label by Changed Paths
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: 🏷️ Apply path-based labels
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
sync-labels: true
label-by-size:
name: Label PR by Size
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 📏 Add size label
uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/XS'
xs_max_size: '10'
s_label: 'size/S'
s_max_size: '100'
m_label: 'size/M'
m_max_size: '500'
l_label: 'size/L'
l_max_size: '1000'
xl_label: 'size/XL'
fail_if_xl: 'false'
message_if_xl: '⚠️ This PR is very large (>1000 lines). Consider breaking it into smaller PRs for easier review.'
github_api_url: 'https://api.github.com'
label-by-type:
name: Label by Commit Type
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 🏷️ Label by conventional commit type
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const title = context.payload.pull_request.title.toLowerCase();
const labels = [];
// Map conventional commit prefixes to labels
if (title.startsWith('feat:') || title.startsWith('feature:')) {
labels.push('enhancement');
} else if (title.startsWith('fix:')) {
labels.push('bug');
} else if (title.startsWith('docs:')) {
labels.push('documentation');
} else if (title.startsWith('chore:')) {
labels.push('chore');
} else if (title.startsWith('refactor:')) {
labels.push('refactoring');
} else if (title.startsWith('test:')) {
labels.push('testing');
} else if (title.startsWith('ci:') || title.startsWith('build:')) {
labels.push('automation');
} else if (title.startsWith('perf:')) {
labels.push('performance');
} else if (title.startsWith('style:')) {
labels.push('style');
}
// Add breaking change label if present
if (title.includes('!:') || title.includes('breaking')) {
labels.push('breaking-change');
}
// Apply labels if any were found
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: labels
});
console.log(`Applied labels: ${labels.join(', ')}`);
}
label-issues-by-template:
name: Label Issues by Template
runs-on: ubuntu-latest
if: github.event_name == 'issues' && github.event.action == 'opened'
steps:
- name: 🏷️ Label by issue template
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = context.payload.issue.body || '';
const labels = [];
// Detect template type from issue body
if (body.includes('### Bug Description') || body.includes('## Bug Report')) {
labels.push('bug');
} else if (body.includes('### Feature Description') || body.includes('## Feature Request')) {
labels.push('enhancement');
} else if (body.includes('### Documentation') || body.includes('## Documentation')) {
labels.push('documentation');
} else if (body.includes('### Task Description') || body.includes('## Task')) {
labels.push('task');
} else if (body.includes('### Alert Details') || body.includes('## Monitoring Alert')) {
labels.push('monitoring', 'infrastructure');
}
// Apply labels if any were found
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: labels
});
console.log(`Applied labels: ${labels.join(', ')}`);
}