diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..65e92ea --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ +**Type:** + +- [ ] Add new entry (`add`) +- [ ] Fix / update existing entry (`fix`) + +**Target File / Section:** + +- [ ] `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:** + + + +**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) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000..f1bb846 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -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) + }); + }