Skip to content

Update community pull requests spreadsheet #44

Update community pull requests spreadsheet

Update community pull requests spreadsheet #44

name: Update community pull requests spreadsheet
on:
schedule:
- cron: '30 2 * * *'
workflow_dispatch:
inputs:
days:
description: 'Include PRs updated in the last N days'
default: '2'
dry_run:
description: 'Log the rows instead of writing them'
type: boolean
default: false
permissions:
contents: read
jobs:
update-spreadsheet:
runs-on: ubuntu-latest
steps:
- name: Generate App Token
id: generate-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.LE_BOT_APP_ID }}
private-key: ${{ secrets.LE_BOT_PRIVATE_KEY }}
- name: Checkout .github repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run script
id: script
uses: actions/github-script@v9
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
const script = require('./scripts/update-pr-spreadsheet.js');
return await script({ github, context, core });
env:
CONTRIBUTIONS_SPREADSHEET_ID: ${{ secrets.CONTRIBUTIONS_SPREADSHEET_ID }}
CONTRIBUTIONS_SHEET_NAME: ${{ secrets.CONTRIBUTIONS_SHEET_NAME }}
GOOGLE_CREDENTIALS: ${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}
LOOKBACK_DAYS: ${{ inputs.days || '2' }}
DRY_RUN: ${{ inputs.dry_run || false }}