GitHub Issues Sync Action
This project is a GitHub Action that provides bidirectional synchronization between GitHub issues and local markdown files. It allows teams to manage GitHub issues locally using markdown files with YAML frontmatter, enabling version control of issues and integration with local development workflows.
GitHub Issues Sync Action
Overview
This project is a GitHub Action that provides bidirectional synchronization between GitHub issues and local markdown files. It allows teams to manage GitHub issues locally using markdown files with YAML frontmatter, enabling version control of issues and integration with local development workflows.
System Architecture
Core Architecture
- Node.js Application: Built on Node.js 20 runtime
- GitHub Actions Framework: Uses @actions/core and @actions/github for GitHub integration
- File-based Storage: Issues stored as markdown files with YAML frontmatter
- Bidirectional Sync: Supports pull (GitHub → Local), push (Local → GitHub), or both directions
Key Design Decisions
- Markdown + YAML Format: Chosen for human readability and version control compatibility
- Directory Organization: Issues organized into
open/andclosed/subdirectories for clarity - Conflict Resolution: Multiple strategies (fail, create-files, overwrite) to handle sync conflicts
- Comprehensive Metadata: Preserves all GitHub issue metadata including labels, assignees, milestones
Key Components
Entry Point (src/index.js)
- Main orchestrator that handles input validation and sync direction routing
- Manages error handling and output reporting
- Coordinates between pull and push sync operations
Sync Operations
- Pull Sync (
src/sync/pull.js): Downloads issues from GitHub to local markdown files - Push Sync (
src/sync/push.js): Uploads local markdown files to GitHub as issues - Conflict Resolver (
src/sync/conflict-resolver.js): Handles conflicts between local and remote versions
Parsers
- GitHub Parser (
src/parsers/github-parser.js): Converts GitHub API responses to markdown format - Markdown Parser (
src/parsers/markdown-parser.js): Converts markdown files to GitHub API format
Utilities
- File Utils (
src/utils/file-utils.js): File system operations and directory management - GitHub API (
src/utils/github-api.js): GitHub API client initialization - Logger (
src/utils/logger.js): Centralized logging with debug mode support - Validation (
src/utils/validation.js): Input validation and security checks
Data Flow
Pull Sync Flow
- Fetch all issues from GitHub repository using REST API
- Parse each issue into markdown format with YAML frontmatter
- Check for existing local files and detect conflicts
- Apply conflict resolution strategy (fail, create conflict files, or overwrite)
- Write issues to organized directory structure (
open/orclosed/)
Push Sync Flow
- Scan local directories for markdown issue files
- Parse markdown files to extract issue data and metadata
- Check if issue exists on GitHub (via github_id in frontmatter)
- Create new issues or update existing ones via GitHub API
- Update local files with GitHub-generated metadata
File Structure
.github/issues/
├── open/
│ ├── 1-issue-title.md
│ └── 2-another-issue.md
└── closed/
└── 3-resolved-issue.md
External Dependencies
GitHub APIs
- GitHub REST API: Primary interface for issue management
- GitHub Actions Framework: Runtime environment and utilities
- Octokit: GitHub API client with pagination support
Node.js Packages
- @actions/core: GitHub Actions toolkit for inputs/outputs
- @actions/github: GitHub context and API access
- front-matter: YAML frontmatter parsing
- fs-extra: Enhanced file system operations
- js-yaml: YAML serialization/deserialization
Authentication
- Uses GitHub token (typically
${{ secrets.GITHUB_TOKEN }}) for API access - Requires repository read/write permissions for issues
Deployment Strategy
GitHub Actions Deployment
- Distributed as a composite GitHub Action
- Uses Node.js 20 runtime environment
- Can be triggered via schedule, workflow dispatch, or repository events
- Runs in GitHub-hosted runners (ubuntu-latest recommended)
Configuration Options
- Sync Direction: pull, push, or both
- Issues Path: Configurable directory for issue storage
- Conflict Strategy: Multiple approaches for handling conflicts
- Debug Mode: Enhanced logging for troubleshooting
Security Considerations
- Path traversal protection in validation layer
- Token-based authentication with minimal required permissions
- Input sanitization for all user-provided values
Recent Changes
- June 26, 2025: Completed full GitHub Issues Sync Action implementation
- All core synchronization functionality working
- Bidirectional sync (pull from GitHub, push to GitHub)
- Comprehensive conflict resolution system
- Complete metadata preservation (labels, assignees, milestones, comments)
- Organized file structure with open/closed directories
- Full validation and error handling
- Debug logging support
- Created demo files and comprehensive documentation
Demo Files Created
.github/issues/open/1-fix-login-validation-bug.md- Sample new issue.github/issues/closed/42-update-api-documentation.md- Sample synced issue.github/workflows/sync-issues.yml- Example workflow configurationdemo-setup.js- Demonstration script showing functionality
Changelog
- June 26, 2025: Initial setup and complete implementation
- June 26, 2025: Added comprehensive documentation and demo
User Preferences
Preferred communication style: Simple, everyday language.
Related Documents
GOOBY - Closing Store Marketplace
A marketplace platform for discovering and purchasing inventory from closing retail stores, focused on the NY, NJ, CT, and PA areas.
Lua Code Obfuscator/Deobfuscator
This is a full-stack web application that provides Lua code obfuscation and deobfuscation services specifically designed for Roblox scripts. The application features a professional Monaco code editor with dual-pane interface, comprehensive obfuscation settings, and file upload/download functionality. Built with a modern React frontend and Node.js/Express backend.
GREEN NODE - Project Overview
Full-stack recycling platform connecting waste generators with verified collectors in Cochabamba, Bolivia.
ADN Systems DMR Peer Server
ADN Systems DMR Peer Server is a fork of FreeDMR, implementing a Digital Mobile Radio (DMR) network server. Launched in April 2024 by international amateur radio enthusiasts, it operates on an Open Bridge Protocol (OBP) fostering a decentralized network architecture. The system handles DMR voice and data communication, acting as a conference bridge/reflector that routes traffic between connected systems (repeaters, hotspots, peers) based on configurable bridge rules.