Update GitHub issue project statuses for single or multiple issues using the GitHub Projects V2 API...
This skill automates updating GitHub issue statuses in GitHub Projects V2. It handles single issues or batch updates for multiple issues simultaneously, managing issue assignment and project status transitions through the GitHub GraphQL API.
Use this skill when:
This skill uses two separate tokens with different scopes:
Environment Variables Required:
export GITHUB_PROJECT_PAT="ghp_xxxx" # Classic PAT with project scope (required)
export GITHUB_PAT="github_pat_xxxx" # Fine-grained PAT with repo scope (optional)
Token Scopes:
GITHUB_PROJECT_PAT (classic PAT) - Requires project scope for project operationsGITHUB_PAT (fine-grained PAT) - Requires repo scope for issue assignment (optional)Why Two Tokens? GitHub doesn't provide a single token type that supports both project and repository operations:
project scope but can't be fine-grained to a single reporepo scope but don't support project scopeThe script uses GITHUB_PROJECT_PAT for all project operations and GITHUB_PAT for issue assignment.
Setup Location:
Configure in .devcontainer/.env (gitignored):
GITHUB_PROJECT_PAT=your_classic_token_here
GITHUB_PAT=your_fine_grained_token_here
# Update single issue to in_progress
./scripts/update-issue-status.sh 17 in_progress codekiln
# Update single issue to done
./scripts/update-issue-status.sh 17 done
# Batch update multiple issues
./scripts/update-issue-status.sh 15,16,17 done
# Set issue back to todo
./scripts/update-issue-status.sh 17 todo
When user requests updating a single issue:
Verify environment setup:
# Check if required token is set
if [ -z "$GITHUB_PROJECT_PAT" ] && [ -z "$GH_PROJECT_PAT" ]; then
echo "Need to set GITHUB_PROJECT_PAT or GH_PROJECT_PAT"
fi
# Check if optional token is set (for assignment)
if [ -z "$GITHUB_PAT" ]; then
echo "Note: GITHUB_PAT not set - issue assignment will be skipped"
fi
Execute the script:
cd /workspace/.claude/skills/update-github-issue-project-status
./scripts/update-issue-status.sh <issue_number> <status> [assignee]
Status values:
todo - Move to Todo columnin_progress - Move to In Progress column (optionally assign)done - Move to Done columnExample scenarios:
User: "Mark issue 17 as in progress and assign to me"
./scripts/update-issue-status.sh 17 in_progress codekiln
User: "Set issue 17 status to done"
./scripts/update-issue-status.sh 17 done
When user requests updating multiple issues at once:
Format issue numbers as comma-separated list:
./scripts/update-issue-status.sh 15,16,17 done
The script will:
Example output:
Updating issue #15...
✓ Successfully updated issue #15
Updating issue #16...
✓ Successfully updated issue #16
Updating issue #17...
✓ Successfully updated issue #17
================================
Summary:
✓ Successful: 3
================================
When the script fails with permission errors:
Check token availability:
echo "GITHUB_PROJECT_PAT: ${GITHUB_PROJECT_PAT:0:10}..."
echo "GITHUB_PAT: ${GITHUB_PAT:0:10}..."
Verify token scopes:
GITHUB_PROJECT_PAT (required):
projectGITHUB_PAT (optional, for issue assignment):
repo (or public_repo for public repos only)Common errors and solutions:
"Error: No project token found" → Set GITHUB_PROJECT_PAT or GH_PROJECT_PAT"Resource not accessible by personal access token" → Token lacks required scope"Skipping assignment (GITHUB_PAT not set)" → Set GITHUB_PAT if you want issue assignmentAfter updating issue statuses, verify the changes:
# Check issue status
gh issue view <issue_number> --json projectItems,assignees
# View project board (web UI)
# Navigate to: https://github.com/users/<owner>/projects/<project_number>
/workspace/.claude/skills/update-github-issue-project-status/scripts/update-issue-status.sh
| Argument | Required | Description | Example |
|---|---|---|---|
| issue_number(s) | Yes | Single issue or comma-separated list | 17 or 15,16,17 |
| status | Yes | Target status | todo, in_progress, or done |
| assignee | No | GitHub username (for in_progress) | codekiln |
The script uses two separate tokens for different operations:
For Project Operations (required):
GITHUB_PROJECT_PAT (recommended) - Classic PAT with project scopeGH_PROJECT_PAT (alternative name)For Issue Assignment (optional):
GITHUB_PAT - Fine-grained PAT with repo scopeRepository:
codekiln/langstar in the scriptGITHUB_PAT (if status is in_progress, assignee provided, and token available)GITHUB_PROJECT_PATGITHUB_PROJECT_PATGITHUB_PROJECT_PATThe script contains hardcoded IDs for the langstar project:
PROJECT_ID="PVT_kwHOAAImgs4BGe4B"
STATUS_FIELD_ID="PVTSSF_lAHOAAImgs4BGe4Bzg3g-NQ"
STATUS_TODO="f75ad846"
STATUS_IN_PROGRESS="47fc9ee4"
STATUS_DONE="98236657"
To use this skill with a different GitHub Project:
references/project-configuration.md for GraphQL queriesscripts/update-issue-status.shFor detailed instructions on finding these IDs, load references/project-configuration.md into context.
This skill complements the automated GitHub Actions workflow:
@claude is mentioned or issue closesThe script uses the same logic as the GitHub Actions automation but provides manual control and batch capabilities.
User says: "I'm starting work on issue 17"
Execute:
./scripts/update-issue-status.sh 17 in_progress $USER
User says: "Mark issues 15, 16, and 17 as done"
Execute:
./scripts/update-issue-status.sh 15,16,17 done
User says: "Move issue 17 back to todo"
Execute:
./scripts/update-issue-status.sh 17 todo
User says: "All issues in the 20-25 range are done"
Execute:
./scripts/update-issue-status.sh 20,21,22,23,24,25 done
gh issue view to confirm changesThis skill includes reference documentation:
references/project-configuration.md - Detailed project configuration, API usage, and how to find/update project IDsLoad reference files into context when needing detailed configuration information or troubleshooting guidance.