luminate-old/.forgejo/workflows/pr-labeler.yml
Brendan Szymanski 70731ec633 Initial CI/CD pipeline
## Description

Add Forgejo Actions CI pipeline with flatpak builds and tests.

Closes #<!-- issue number -->

## Type of change

- [ ] 🐛 Bug fix
- [ ]  New feature
- [ ] ♻️ Refactor / code cleanup
- [ ] 📖 Documentation
- [x] 🔧 Dependencies / build tooling

## How was this tested?

Verified CI pipeline runs successfully with flatpak builds and tests in Forgejo Actions.

## Checklist

- [ ] I have read the [contributing guide](CONTRIBUTING.md)
- [ ] My code follows the project's style guidelines
- [ ] I have added or updated tests as needed
- [ ] Documentation has been updated where applicable
- [ ] All existing tests pass

Pull request: (#3)

## Description

Add Forgejo Actions CI pipeline with flatpak builds and tests.

Closes #<!-- issue number -->

## Type of change

- [ ] 🐛 Bug fix
- [ ]  New feature
- [ ] ♻️ Refactor / code cleanup
- [ ] 📖 Documentation
- [x] 🔧 Dependencies / build tooling

## How was this tested?

Verified CI pipeline runs successfully with flatpak builds and tests in Forgejo Actions.

## Checklist

- [ ] I have read the [contributing guide](CONTRIBUTING.md)
- [ ] My code follows the project's style guidelines
- [ ] I have added or updated tests as needed
- [ ] Documentation has been updated where applicable
- [ ] All existing tests pass
Co-authored-by: Brendan Szymanski <hello@bscubed.dev>
Co-committed-by: Brendan Szymanski <hello@bscubed.dev>
2026-06-23 23:36:14 +00:00

34 lines
1.2 KiB
YAML

name: PR Labeler
on:
pull_request_target:
types: [opened]
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label by branch prefix
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
BRANCH="${{ forge.head_ref }}"
case "$BRANCH" in
feature/*) LABEL="enhancement/feature" ;;
fix/*) LABEL="bug" ;;
chore/*) LABEL="enhancement/chore" ;;
refactor/*) LABEL="enhancement/refactor" ;;
docs/*) LABEL="enhancement/docs" ;;
test/*) LABEL="enhancement/test" ;;
perf/*) LABEL="enhancement/perf" ;;
style/*) LABEL="enhancement/style" ;;
*) exit 0 ;;
esac
REPO="${{ forge.repository }}"
API_URL="${{ forge.api_url }}"
PR_NUMBER="${{ forge.event.number }}"
curl -s -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"labels\": [\"$LABEL\"]}" \
"$API_URL/repos/$REPO/issues/$PR_NUMBER/labels"