View and manage GitHub pull requests directly from Google Sheets using octo-sts for secure workload identity authentication.
- Two-way sync: View PR data and push updates back to GitHub
- Editable fields: State (open/closed), Title, Labels, Assignees, Auto-merge
- Change tracking: Visual highlighting of pending changes
- Smart validation: Dropdowns for state and auto-merge fields
- Auto-refresh: Loads PRs automatically when you open the sheet
- Keyless auth: No personal access tokens needed
Install the octo-sts GitHub App on your repository.
- Open a Google Sheet
- Go to Extensions > Apps Script
- Copy the contents of
Code.jsinto the script editor - Copy the contents of
appsscript.jsoninto the manifest (enable "Show appsscript.json" in settings) - Save the project
- In your spreadsheet, open GitHub PRs > Configure...
- Enter your GitHub repository owner and name
- Optionally customize the identity name and sheet name
- Click Save Configuration
- Go to GitHub PRs > Show OIDC Token Info
- Copy the
sub(subject) andaud(audience) values
Create .github/chainguard/<identity-name>.sts.yaml in your repository:
# Trust policy for Apps Script workload identity
issuer: https://accounts.google.com
# Subject: Your email or Apps Script user ID
subject: "your-email@example.com"
# Audience: Apps Script client ID (from token info)
audience: "123456789-abcdefghijklmnop.apps.googleusercontent.com"
permissions:
pull_requests: write
issues: writeNote: The audience field is supported in octo-sts as of PR #508.
Go to GitHub PRs > Refresh Pull Requests
The sheet displays:
- PR Number (read-only)
- Title (editable)
- State (editable dropdown: open/closed)
- Created/Updated dates (read-only)
- Labels (editable, comma-separated)
- Assignees (editable, comma-separated)
- Auto-merge (editable dropdown: enabled/disabled)
- Edit any editable field
- Changed cells are highlighted in dark yellow (#ffc107)
- Rows with changes are highlighted in light yellow (#fff3cd)
- View all pending changes: GitHub PRs > Show Pending Changes
- Apply changes: GitHub PRs > Apply Changes to GitHub
- Changes are tracked against original values from last refresh
- If you change a value and then change it back to the original, the highlight is removed
- Multiple fields can be changed per row before pushing
- Original values are stored in a hidden sheet
# Install clasp
npm install -g @google/clasp
# Login
clasp login
# Clone your project
clasp clone <script-id>
# Push changes
clasp push- OIDC Token: Uses
ScriptApp.getIdentityToken()to generate a Google OIDC token - Token Exchange: Exchanges the OIDC token with octo-sts for a GitHub token
- GitHub API: Uses the GitHub token to read and update pull requests
- Trust Policy: octo-sts validates the token's issuer, subject, and audience against your trust policy
- Verify your trust policy's
subjectandaudiencematch the values from Show OIDC Token Info - Ensure octo-sts app is installed on your repository
- Check that the identity name matches your
.sts.yamlfilename
- Make sure you've granted
pull_requests: writepermission in the trust policy - Check that the PR is still open (can't edit closed PRs)
- Review Apps Script logs for detailed error messages
- Requires
pull_requests: writepermission - PR must meet all branch protection requirements
- Check if auto-merge is allowed in your repository settings