This project contains GitHub Actions workflows designed to automate project management tasks for the podaac organization. These workflows can be deployed across all repositories in the organization to ensure consistent handling of issues and pull requests.
This workflow automatically adds new issues and pull requests to the podaac organization project with a default status of "needs:triage".
- The workflow file must exist in each repository where you want it to run
- A workflow in the
.githubrepository will NOT trigger for issues/PRs in other repositories - You must deploy this workflow to all repositories where you want automatic project assignment
This repository provides automation scripts to help deploy the workflow across all your organization's repositories.
-
Find your project number:
- Go to your project URL:
https://github.com/orgs/podaac/projects/X - The number
Xin the URL is your project number - Update line 20 in
.github/workflows/add-to-project.ymlwith this number
- Go to your project URL:
-
Create a Personal Access Token (PAT):
- Go to https://github.com/settings/tokens/new
- Select "Generate new token (classic)" or use fine-grained tokens
- Required scopes:
repo(Full control of private repositories)project(Full control of projects)org:read(Read org and team membership, read org projects)
- Generate and copy the token
-
Add the token as a secret:
-
For organization-wide use:
- Go to
https://github.com/organizations/podaac/settings/secrets/actions - Click "New organization secret"
- Name:
PROJECTS_PAT - Value: Paste your token
- Repository access: Set to "All repositories" or select specific repos
- Go to
-
For a single repository:
- Go to repository Settings > Secrets and variables > Actions
- Click "New repository secret"
- Name:
PROJECTS_PAT - Value: Paste your token
-
-
Verify the status field name:
- Open your project in GitHub
- Check that you have a "Status" field with a "needs:triage" option
- If the field or option has a different name, update the script accordingly
-
Deploy the workflow:
Option A: Automated deployment (Recommended)
Use the provided scripts to deploy to all repositories:
# Deploy via Pull Requests (safer, allows review) ./deploy-workflow.sh # OR deploy directly to main branch (faster, but no review) ./deploy-workflow-direct.sh
Prerequisites:
- GitHub CLI (
gh) must be installed and authenticated - You need write access to all repositories in the organization
Option B: Manual deployment
Copy the workflow file to each repository:
cd /path/to/your/repo mkdir -p .github/workflows cp /path/to/this/repo/.github/workflows/add-to-project.yml .github/workflows/ git add .github/workflows/add-to-project.yml git commit -m "Add automatic project assignment workflow" git push
- GitHub CLI (
- Triggers: When a new issue or pull request is opened
- Actions:
- Adds the item to the specified project using the
actions/add-to-projectaction - Sets the status field to "needs:triage" using the GitHub GraphQL API
- Adds the item to the specified project using the
- If items aren't being added, check that the PAT has sufficient permissions
- If the status isn't being set, verify the field name and option name in your project
- Check the Actions tab in your repository for error logs
- Ensure the project number is correct in the workflow file
To change the default status, modify line 35 in the workflow:
const triageOption = statusField?.options.find(option => option.name === 'needs:triage');Replace 'needs:triage' with your desired status option name.
All the new tickets are now automatically added to the podaac github project with a default status of "needs:triage". This allows the team to easily find and triage new issues and pull requests in one central location.
The action triage-report-to-slack sends a message to the #podaac-management channel in Slack whenever a new issue or pull request is created with the "needs:triage" status. This ensures that the team is immediately notified of new items that require attention and that no issue falls into cracks.