From 2e7f2d098cf04f308252f0d016e8822409d7390c Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 4 May 2026 09:16:43 -0400 Subject: [PATCH 1/2] chore(ci): add auto-labeler for PRs Adds a GitHub Actions workflow that automatically labels PRs: - Area labels based on changed file paths via actions/labeler - Type labels parsed from conventional commit PR title prefixes Signed-off-by: Brandon McAnsh --- .github/labeler.yml | 94 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 56 +++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..b73ce9975 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,94 @@ +"area: payments": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/shared/payments/**" + - "apps/flipcash/features/cash/**" + - "apps/flipcash/features/transactions/**" + - "apps/flipcash/features/withdrawal/**" + - "apps/flipcash/shared/transfers/**" + - "apps/flipcash/shared/bills/**" + - "apps/flipcash/shared/google-play-billing/**" + - "definitions/**/micropayment/**" + +"area: crypto": + - changed-files: + - any-glob-to-any-file: + - "libs/crypto/**" + - "libs/encryption/**" + - "services/opencode/**/solana/**" + +"area: intents": + - changed-files: + - any-glob-to-any-file: + - "services/code/**/intents/**" + - "services/flipchat/**/intents/**" + - "services/opencode/**/intents/**" + +"area: auth": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/features/login/**" + - "apps/flipcash/shared/authentication/**" + - "apps/flipcash/shared/accesskey/**" + - "apps/flipcash/shared/session/**" + - "apps/flipcash/features/contact-verification/**" + - "apps/flipcash/shared/phone/**" + +"area: tokens": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/features/tokens/**" + - "apps/flipcash/shared/tokens/**" + - "apps/flipcash/core/**/tokens/**" + +"area: ui": + - changed-files: + - any-glob-to-any-file: + - "ui/**" + - "apps/flipcash/shared/theme/**" + - "apps/flipcash/features/bill-customization/**" + +"area: network": + - changed-files: + - any-glob-to-any-file: + - "libs/network/**" + - "services/code/**" + - "services/flipcash/**" + - "services/flipcash-compose/**" + - "services/opencode/**" + - "services/opencode-compose/**" + - "definitions/**" + +"area: onramp": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/features/onramp/**" + - "apps/flipcash/features/deposit/**" + - "apps/flipcash/features/purchase/**" + - "apps/flipcash/shared/onramp/**" + +"area: scanner": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/features/scanner/**" + - "ui/scanner/**" + - "vendor/**/scanner/**" + - "libs/code-detection/**" + - "libs/quickresponse/**" + +"area: notifications": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/shared/notifications/**" + - "apps/flipcash/shared/push/**" + - "libs/messaging/**" + +"area: build-system": + - changed-files: + - any-glob-to-any-file: + - "build-logic/**" + - "build.gradle.kts" + - "settings.gradle.kts" + - "gradle/**" + - "gradle.properties" + - "*.versions.toml" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..a8f4bf5f2 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,56 @@ +name: Label PRs + +on: + pull_request: + types: [opened, synchronize] + +permissions: + contents: read + pull-requests: write + +jobs: + area-labels: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + sync-labels: false + + type-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const title = context.payload.pull_request.title; + const prefixMap = { + 'feat': 'type: feature', + 'fix': 'type: fix', + 'refactor': 'type: refactor', + 'chore': 'type: chore', + 'build': 'type: build', + 'test': 'type: test', + 'docs': 'type: docs', + }; + + const match = title.match(/^(\w+)(\(.+\))?[!]?:/); + if (!match) return; + + const prefix = match[1]; + const label = prefixMap[prefix]; + if (!label) return; + + const { data: labels } = await github.rest.issues.listLabelsOnIssue({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + if (labels.some(l => l.name === label)) return; + + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: [label], + }); From 80184823ba7970cce69dce433f2e9bc14095f7bb Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 4 May 2026 10:58:48 -0400 Subject: [PATCH 2/2] chore(ci): add area: deeplinks label mapping Signed-off-by: Brandon McAnsh --- .github/labeler.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index b73ce9975..327c66ca3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -83,6 +83,12 @@ - "apps/flipcash/shared/push/**" - "libs/messaging/**" +"area: deeplinks": + - changed-files: + - any-glob-to-any-file: + - "apps/flipcash/shared/router/**" + - "apps/flipcash/shared/onramp/deeplinks/**" + "area: build-system": - changed-files: - any-glob-to-any-file: