Skip to content

Commit 978bbb8

Browse files
authored
feat: integrate Probot middleware for GitHub webhooks (#468)
* feat: integrate Probot middleware for GitHub webhooks * feat: integrate Probot into Firebase functions and update dependencies - Added Probot as a dependency in Firebase functions. - Updated Firebase functions to use Probot middleware for GitHub app integration. - Defined additional GitHub app secrets in Firebase functions. - Updated TypeScript configuration to support ES modules and added skipLibCheck. - Refactored GitHub app implementation to export as a function. - Updated tests to reflect changes in the app structure and dependencies. - Cleaned up package-lock.json by removing unnecessary nested dependencies. - Updated dependencies in GitHub apps to latest versions for better compatibility. * feat: add step to install dependencies for GitHub apps in CI workflow * ci: add debugging steps to GitHub apps dependency installation * ci: remove unnecessary debug commands from GitHub apps dependency installation * refactor: remove test file and update GitHub App ID configuration * refactor: comment out probotApp export and restructure middleware initialization * fix: update Firebase service account secret reference in GitHub apps deployment workflow feat: add "FUNCS" to workspace extensions for improved development experience * refactor: comment out unused GitHub App secrets and middleware initialization * refactor: uncomment githubAppId definition and usage in Firebase function * refactor: restore GitHub App secrets and middleware initialization in Firebase function * refactor: add debugging commands to GitHub apps dependency installation step * refactor: add debugging step for GitHub apps dependency installation and remove unused variable in Firebase function * refactor: migrate GitHub app code to Firebase functions - Removed the existing GitHub app implementation from openci-runner/github-apps. - Added new implementation in openci-runner/firebase/functions/probot. - Updated test fixtures and test cases to reflect the new structure. - Deleted obsolete files related to the previous implementation. * refactor: reorder Test step in GitHub Actions workflow for clarity * refactor: uncomment and clean up probot middleware initialization in Firebase function * refactor: remove unused firebase service account and streamline GitHub webhook function
1 parent 9e17d96 commit 978bbb8

28 files changed

+2036
-4751
lines changed

.github/workflows/github-apps-cd.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ on:
77
branches: [main, develop]
88

99
jobs:
10-
github-apps-tests:
11-
uses: ./.github/workflows/reusable-github-apps-ci.yml
12-
13-
firebase-functions-tests:
14-
uses: ./.github/workflows/reusable-firebase-functions-ci.yml
15-
1610
deploy-firebase-functions-dev:
1711
if: github.event_name == 'pull_request'
18-
needs: [github-apps-tests, firebase-functions-tests]
1912
runs-on: ubuntu-latest
2013
defaults:
2114
run:
@@ -29,18 +22,25 @@ jobs:
2922

3023
- uses: google-github-actions/auth@v2
3124
with:
32-
credentials_json: ${{ secrets.FIREBASE_SA_KEY_FOR_PREVIEW_FUNCTIONS }}
25+
credentials_json: ${{ secrets.GHA_SERVICE_ACCOUNT_PREVIEW_FUNCS }}
3326

3427
- name: Install dependencies
3528
working-directory: openci-runner/firebase/functions
3629
run: npm ci
3730

31+
- name: tsc
32+
working-directory: openci-runner/firebase/functions
33+
run: npm run build
34+
35+
- name: Test
36+
working-directory: openci-runner/firebase/functions
37+
run: npm test
38+
3839
- name: Deploy Functions (dev)
3940
run: npx firebase-tools deploy --only functions --project ${{ secrets.FIREBASE_PROJECT_ID_FOR_PREVIEW_FUNCTIONS }}
4041

4142
deploy-firebase-functions-production:
4243
if: github.event_name == 'push'
43-
needs: [github-apps-tests, firebase-functions-tests]
4444
runs-on: ubuntu-latest
4545
defaults:
4646
run:
@@ -60,5 +60,13 @@ jobs:
6060
working-directory: openci-runner/firebase/functions
6161
run: npm ci
6262

63+
- name: tsc
64+
working-directory: openci-runner/firebase/functions
65+
run: npm run build
66+
67+
- name: Test
68+
working-directory: openci-runner/firebase/functions
69+
run: npm test
70+
6371
- name: Deploy Functions (Production)
6472
run: npx firebase-tools deploy --only functions --project ${{ secrets.FIREBASE_PROJECT_ID }}

.github/workflows/reusable-firebase-functions-ci.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/reusable-github-apps-ci.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

biome.jsonc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
"noUnusedImports": "error"
88
}
99
}
10-
},
11-
"organizeImports": {
12-
"enabled": true
1310
}
1411
}

0 commit comments

Comments
 (0)