A tool for managing GitHub projects (v2) that helps synchronize fields between project boards.
- Sync fields between GitHub project boards
- Support for both organization and user-scoped projects
- Automatic issue detection across projects
- Flexible field mapping configuration
go install github.com/naag/gh-project-toolkit/cmd/gh-project-toolkit@latest
Download the latest binary for your platform from the GitHub Releases page.
# Clone the repository
git clone https://github.com/naag/gh-project-toolkit.git
cd gh-project-toolkit
# Build the binary
make build
# Binary will be available in bin/gh-project-toolkit
The tool can automatically sync field values between two GitHub projects for all issues that exist in both projects:
gh-project-toolkit sync-fields \
--source "https://github.com/orgs/myorg/projects/123" \
--target "https://github.com/orgs/myorg/projects/456" \
--field-mapping "Start date=Start" \
--field-mapping "End date=End" \
--auto-detect-issues
This will:
- Find all issues that exist in both projects
- For each common issue, copy the field values from source to target project using the provided mappings
You can also specify individual issues manually if needed:
gh-project-toolkit sync-fields \
--source "https://github.com/orgs/myorg/projects/123" \
--target "https://github.com/orgs/myorg/projects/456" \
--field-mapping "Start date=Start" \
--field-mapping "End date=End" \
--issue "https://github.com/org/repo/issues/1" \
--issue "https://github.com/org/repo/issues/2"
The tool requires a GitHub personal access token with appropriate permissions:
- Set the
GITHUB_TOKEN
environment variable with your token - Token needs
project
scope for reading/writing project data - For organization projects, the token needs access to the organization
--source
: Source project URL (e.g., https://github.com/orgs/org/projects/123)--target
: Target project URL (e.g., https://github.com/users/user/projects/456)--field-mapping
: Field mapping in the format 'source=target' (can be specified multiple times)--auto-detect-issues
: Automatically detect and sync all issues present in both projects--issue
: GitHub issue URL (can be specified multiple times, not needed with --auto-detect-issues)-v, --verbose
: Enable verbose logging (use -vv for HTTP traffic)
- Go 1.21 or later
- Make
- golangci-lint (optional, for linting)
make build
: Build the binary (output to bin/gh-project-toolkit)make test
: Run testsmake lint
: Run lintersmake clean
: Clean build artifactsmake install-tools
: Install development tools (like golangci-lint)
Releases are automatically created when pushing a new tag:
# Create and push a new version tag
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
This will trigger the release workflow which:
- Runs tests and linting
- Creates a GitHub release
- Builds binaries for multiple platforms
- Attaches binaries to the release
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request