Skip to content

Generate Sensemaker report #21

Generate Sensemaker report

Generate Sensemaker report #21

name: Generate Sensemaker report
on: workflow_dispatch
jobs:
generate-summary:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: "Jigsaw-Code/sensemaking-tools"
path: sensemaking-tools
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache-dependency-path: sensemaking-tools/package-lock.json
node-version: "18"
cache: "npm"
- name: Install dependencies
run: npm install
working-directory: sensemaking-tools
- name: Get CSV
uses: valitydev/action-download-file@v1
with:
url: https://preprod.pol.is/api/v3/reportExport/r7kfpvrhdpyykbhnirtcd/comment-groups.csv
target-path: sensemaking-tools/data/
- name: Modify CSV headers
run: |
ls -l
file="data/comment-groups.csv" \
new_header="comment-id,comment_text,total-votes,total-agrees,total-disagrees,total-passes,group-a-votes,group-0-agree-count,group-0-disagree-count,group-0-pass-count,group-b-votes,group-1-agree-count,group-1-disagree-count,group-1-pass-count" \
sed -i "1s/.*/$new_header/" "$file"
working-directory: sensemaking-tools
- name: List Files
run: ls -l sensemaking-tools/
- name: Generate Summary Output
run: |
npx ts-node runner-cli/runner.ts --outputFile "summary" \
--vertexProject "jigsaw-vertex-integration" \
--inputFile "data/comment-groups.csv"
working-directory: sensemaking-tools