mirror of
https://github.com/aroum/fm1-custom-fw.git
synced 2026-12-05 12:24:34 +01:00
chore(github): add pull request template and auto-labeler workflow
This commit is contained in:
1 parent
c335a022be
commit
b4ef642f65
2 files changed
+57
No files matched your search
@@ -0,0 +1,21 @@
|
||||
**Type:**
|
||||
<!-- Mark one with [x] -->
|
||||
- [ ] Add new entry (`add`)
|
||||
- [ ] Fix / update existing entry (`fix`)
|
||||
|
||||
**Target File / Section:**
|
||||
<!-- Mark all applicable with [x] -->
|
||||
- [ ] `README.md` (Custom Firmwares: 1.1.1 / 1.1.2 / 1.1.3 / 1.1.4 / 1.2 / 1.3)
|
||||
- [ ] `RESOURCES.md` (Tools, Emulators, Editors, Guides, Hubs)
|
||||
- [ ] `HARDWARE_MODS.md` (Hardware Mods & DIY)
|
||||
- [ ] `OFFICIAL_FIRMWARE.md` (Stock Firmware & Patchers)
|
||||
- [ ] `REVERSE_ENGINEERING.md` (Architecture & Protocol)
|
||||
|
||||
**Summary of Changes:**
|
||||
<!-- Briefly describe what was added or updated -->
|
||||
|
||||
|
||||
**Checklist:**
|
||||
- [ ] Sequential table numbering (`#`) verified with no gaps or duplicates
|
||||
- [ ] Strict 3-column table format preserved (`| # | Name, Author, License & Links | Description & Features |`)
|
||||
- [ ] Links, license, base/platform, and flash chip compatibility included (where applicable)
|
||||
@@ -0,0 +1,36 @@
|
||||
name: PR Auto-Labeler
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, edited, synchronize]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply short labels
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const body = context.payload.pull_request.body || '';
|
||||
const labels = new Set();
|
||||
|
||||
if (/- \[x\] Add new entry/i.test(body)) labels.add('add');
|
||||
if (/- \[x\] Fix \/ update/i.test(body)) labels.add('fix');
|
||||
if (/- \[x\] `README\.md`/i.test(body)) labels.add('fw');
|
||||
if (/- \[x\] `RESOURCES\.md`/i.test(body)) labels.add('tools');
|
||||
if (/- \[x\] `HARDWARE_MODS\.md`/i.test(body)) labels.add('hw');
|
||||
if (/- \[x\] `OFFICIAL_FIRMWARE\.md`/i.test(body)) labels.add('stock');
|
||||
if (/- \[x\] `REVERSE_ENGINEERING\.md`/i.test(body)) labels.add('re');
|
||||
|
||||
if (labels.size > 0) {
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: Array.from(labels)
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user