From 6c4a1662f0621edd8aa69ad52f473410d0584e46 Mon Sep 17 00:00:00 2001 From: Himanth Reddy Date: Fri, 31 Jul 2026 11:36:23 +0530 Subject: [PATCH 1/3] ci: add Renovate, Release Please, Labeler, Danger, and Actionlint automation --- .github/labeler.yml | 39 ++++++++++++++++++++++++++++ .github/release-please-config.json | 11 ++++++++ .github/release-please-manifest.json | 3 +++ .github/renovate.json | 26 +++++++++++++++++++ .github/workflows/actionlint.yml | 22 ++++++++++++++++ .github/workflows/danger.yml | 27 +++++++++++++++++++ .github/workflows/labeler.yml | 20 ++++++++++++++ .github/workflows/release-please.yml | 21 +++++++++++++++ .github/workflows/renovate.yml | 21 +++++++++++++++ .gitignore | 3 --- Dangerfile.js | 34 ++++++++++++++++++++++++ 11 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 .github/release-please-config.json create mode 100644 .github/release-please-manifest.json create mode 100644 .github/renovate.json create mode 100644 .github/workflows/actionlint.yml create mode 100644 .github/workflows/danger.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .github/workflows/renovate.yml create mode 100644 Dangerfile.js diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..d5d8c3c9c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,39 @@ +# Config for actions/labeler v5 +"area: android": + - changed-files: + - any-glob-to-any-file: + - 'app/**' + - 'benchmark/**' + - 'gradle/**' + - 'build.gradle.kts' + - 'settings.gradle.kts' + +"area: ios": + - changed-files: + - any-glob-to-any-file: + - 'iosApp/**' + +"area: web": + - changed-files: + - any-glob-to-any-file: + - 'web/**' + - 'netlify-arvio-tv-site/**' + - 'netlify-auth-site/**' + +"area: backend": + - changed-files: + - any-glob-to-any-file: + - 'supabase/**' + - 'resolver-worker/**' + +"area: ci": + - changed-files: + - any-glob-to-any-file: + - '.github/**' + - '.gitlab-ci.yml' + +"documentation": + - changed-files: + - any-glob-to-any-file: + - 'docs/**' + - '*.md' diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 000000000..7910baec3 --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "simple", + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true + } + } +} diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json new file mode 100644 index 000000000..99ac46235 --- /dev/null +++ b/.github/release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.9.983" +} diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 000000000..048cc57c2 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + ":group(allNonMajor)", + ":rebaseStalePrs", + ":semanticCommits" + ], + "labels": ["dependencies"], + "assignees": [], + "packageRules": [ + { + "matchPackagePatterns": ["*"], + "matchPaths": ["web/**"], + "groupName": "web dependencies" + }, + { + "matchManagers": ["gradle", "gradle-wrapper"], + "groupName": "gradle dependencies" + }, + { + "matchManagers": ["github-actions"], + "groupName": "github actions" + } + ] +} diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 000000000..d78338f9b --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,22 @@ +name: Actionlint + +on: + push: + paths: + - '.github/workflows/*.yml' + - '.github/workflows/*.yaml' + pull_request: + paths: + - '.github/workflows/*.yml' + - '.github/workflows/*.yaml' + +jobs: + actionlint: + name: Lint GitHub Workflows + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Run actionlint + uses: raven-actions/actionlint@v2 diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 000000000..3f72c65ed --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,27 @@ +name: Danger JS + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + danger: + name: Run Danger JS + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Run Danger JS + run: npx danger ci + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..4a8b64be0 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,20 @@ +name: Pull Request Labeler + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + name: Auto Label PR + runs-on: ubuntu-latest + steps: + - name: Apply labels based on changed paths + uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-repo-labels: true diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..a0dc7f4ae --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,21 @@ +name: Release Please + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + name: Create Release PR or Tag + runs-on: ubuntu-latest + steps: + - name: Release Please Action + uses: googleapis/release-please-action@v4 + with: + config-file: .github/release-please-config.json + manifest-file: .github/release-please-manifest.json diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 000000000..fd6636168 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,21 @@ +name: Renovate + +on: + schedule: + # Run at 03:00 every Saturday + - cron: '0 3 * * 6' + workflow_dispatch: + +jobs: + renovate: + name: Run Renovate + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Self-hosted Renovate + uses: renovatebot/github-action@v40.3.6 + with: + configurationFile: .github/renovate.json + token: ${{ secrets.RENOVATE_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 43de61234..0c374ff36 100644 --- a/.gitignore +++ b/.gitignore @@ -16,9 +16,6 @@ gen/ out/ release/ -# Repository-local automation not used by this distribution -.github/workflows/ - # Gradle files .gradle/ build/ diff --git a/Dangerfile.js b/Dangerfile.js new file mode 100644 index 000000000..32a245cef --- /dev/null +++ b/Dangerfile.js @@ -0,0 +1,34 @@ +import { danger, warn, message, markdown } from 'danger'; + +// 1. Check for PR description +const pr = danger.github.pr; +if (!pr.body || pr.body.length < 20) { + warn('Please add a detailed description to your PR to explain your changes.'); +} + +// 2. Warn if PR is Work In Progress (WIP) +const isWip = pr.title.includes('[WIP]') || pr.title.includes('wip:') || pr.draft; +if (isWip) { + warn('This PR is marked as Work in Progress (WIP) and is not ready for merge.'); +} + +// 3. Check for lockfile updates when package.json changes +const webPackageChanged = danger.git.modified_files.includes('web/package.json'); +const webLockChanged = danger.git.modified_files.includes('web/package-lock.json'); + +if (webPackageChanged && !webLockChanged) { + warn('`web/package.json` was modified, but `web/package-lock.json` was not updated.'); +} + +// 4. Large PR warning +const totalChanges = danger.github.pr.additions + danger.github.pr.deletions; +if (totalChanges > 500) { + warn(`This PR is large (+${danger.github.pr.additions} -${danger.github.pr.deletions} lines). Consider splitting it into smaller, manageable PRs.`); +} + +// 5. Summary message +const modifiedCount = danger.git.modified_files.length; +const createdCount = danger.git.created_files.length; +const deletedCount = danger.git.deleted_files.length; + +message(`PR Changes Summary: 📝 ${modifiedCount} modified, ➕ ${createdCount} created, ❌ ${deletedCount} deleted.`); From 1350e50c5229e1f5261aa441c4122f381c5f8dc6 Mon Sep 17 00:00:00 2001 From: Himanth Reddy Date: Fri, 31 Jul 2026 11:39:36 +0530 Subject: [PATCH 2/3] fix(ci): fix actionlint labeler input and ShellCheck SC2129 warning --- .github/workflows/build-check.yml | 12 +++++++----- .github/workflows/labeler.yml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index feaafa0d4..7560da117 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -41,11 +41,13 @@ jobs: TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }} TRAKT_CLIENT_SECRET: ${{ secrets.TRAKT_CLIENT_SECRET }} run: | - echo "SUPABASE_URL=${SUPABASE_URL:-https://your-project.supabase.co}" > secrets.properties - echo "SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY:-your-supabase-anon-key}" >> secrets.properties - echo "TMDB_API_KEY=${TMDB_API_KEY:-your-tmdb-api-key}" >> secrets.properties - echo "TRAKT_CLIENT_ID=${TRAKT_CLIENT_ID:-your-trakt-client-id}" >> secrets.properties - echo "TRAKT_CLIENT_SECRET=${TRAKT_CLIENT_SECRET:-your-trakt-client-secret}" >> secrets.properties + { + echo "SUPABASE_URL=${SUPABASE_URL:-https://your-project.supabase.co}" + echo "SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY:-your-supabase-anon-key}" + echo "TMDB_API_KEY=${TMDB_API_KEY:-your-tmdb-api-key}" + echo "TRAKT_CLIENT_ID=${TRAKT_CLIENT_ID:-your-trakt-client-id}" + echo "TRAKT_CLIENT_SECRET=${TRAKT_CLIENT_SECRET:-your-trakt-client-secret}" + } > secrets.properties - name: Create CI keystore run: | diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 4a8b64be0..2955114d2 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -17,4 +17,4 @@ jobs: uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-repo-labels: true + sync-labels: true From b3982e6cb67b29ba5a40eb867fcd1c2de25bf038 Mon Sep 17 00:00:00 2001 From: Himanth Reddy Date: Tue, 4 Aug 2026 15:23:42 +0530 Subject: [PATCH 3/3] chore(ci): remove Renovate, Release Please, and Danger as requested in PR review --- .github/release-please-config.json | 11 --------- .github/release-please-manifest.json | 3 --- .github/renovate.json | 26 --------------------- .github/workflows/danger.yml | 27 ---------------------- .github/workflows/release-please.yml | 21 ----------------- .github/workflows/renovate.yml | 21 ----------------- Dangerfile.js | 34 ---------------------------- 7 files changed, 143 deletions(-) delete mode 100644 .github/release-please-config.json delete mode 100644 .github/release-please-manifest.json delete mode 100644 .github/renovate.json delete mode 100644 .github/workflows/danger.yml delete mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/renovate.yml delete mode 100644 Dangerfile.js diff --git a/.github/release-please-config.json b/.github/release-please-config.json deleted file mode 100644 index 7910baec3..000000000 --- a/.github/release-please-config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "packages": { - ".": { - "release-type": "simple", - "changelog-path": "CHANGELOG.md", - "bump-minor-pre-major": true, - "bump-patch-for-minor-pre-major": true - } - } -} diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json deleted file mode 100644 index 99ac46235..000000000 --- a/.github/release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "1.9.983" -} diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 048cc57c2..000000000 --- a/.github/renovate.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended", - ":group(allNonMajor)", - ":rebaseStalePrs", - ":semanticCommits" - ], - "labels": ["dependencies"], - "assignees": [], - "packageRules": [ - { - "matchPackagePatterns": ["*"], - "matchPaths": ["web/**"], - "groupName": "web dependencies" - }, - { - "matchManagers": ["gradle", "gradle-wrapper"], - "groupName": "gradle dependencies" - }, - { - "matchManagers": ["github-actions"], - "groupName": "github actions" - } - ] -} diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml deleted file mode 100644 index 3f72c65ed..000000000 --- a/.github/workflows/danger.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Danger JS - -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read - pull-requests: write - -jobs: - danger: - name: Run Danger JS - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Run Danger JS - run: npx danger ci - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index a0dc7f4ae..000000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release Please - -on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - -jobs: - release-please: - name: Create Release PR or Tag - runs-on: ubuntu-latest - steps: - - name: Release Please Action - uses: googleapis/release-please-action@v4 - with: - config-file: .github/release-please-config.json - manifest-file: .github/release-please-manifest.json diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml deleted file mode 100644 index fd6636168..000000000 --- a/.github/workflows/renovate.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Renovate - -on: - schedule: - # Run at 03:00 every Saturday - - cron: '0 3 * * 6' - workflow_dispatch: - -jobs: - renovate: - name: Run Renovate - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Self-hosted Renovate - uses: renovatebot/github-action@v40.3.6 - with: - configurationFile: .github/renovate.json - token: ${{ secrets.RENOVATE_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/Dangerfile.js b/Dangerfile.js deleted file mode 100644 index 32a245cef..000000000 --- a/Dangerfile.js +++ /dev/null @@ -1,34 +0,0 @@ -import { danger, warn, message, markdown } from 'danger'; - -// 1. Check for PR description -const pr = danger.github.pr; -if (!pr.body || pr.body.length < 20) { - warn('Please add a detailed description to your PR to explain your changes.'); -} - -// 2. Warn if PR is Work In Progress (WIP) -const isWip = pr.title.includes('[WIP]') || pr.title.includes('wip:') || pr.draft; -if (isWip) { - warn('This PR is marked as Work in Progress (WIP) and is not ready for merge.'); -} - -// 3. Check for lockfile updates when package.json changes -const webPackageChanged = danger.git.modified_files.includes('web/package.json'); -const webLockChanged = danger.git.modified_files.includes('web/package-lock.json'); - -if (webPackageChanged && !webLockChanged) { - warn('`web/package.json` was modified, but `web/package-lock.json` was not updated.'); -} - -// 4. Large PR warning -const totalChanges = danger.github.pr.additions + danger.github.pr.deletions; -if (totalChanges > 500) { - warn(`This PR is large (+${danger.github.pr.additions} -${danger.github.pr.deletions} lines). Consider splitting it into smaller, manageable PRs.`); -} - -// 5. Summary message -const modifiedCount = danger.git.modified_files.length; -const createdCount = danger.git.created_files.length; -const deletedCount = danger.git.deleted_files.length; - -message(`PR Changes Summary: 📝 ${modifiedCount} modified, ➕ ${createdCount} created, ❌ ${deletedCount} deleted.`);