A GitHub Action that syncs all issues and pull requests from a repository to markdown files.
- Repository: vig-os/sync-issues-action
- Organization: vigOS
- Sync issues and pull requests to markdown files
- Includes all comments and conversations
- Groups PR review threads with diff snippets (when available)
- Preserves original bodies (no extra description header added)
- Includes metadata (labels, dates, authors, state, etc.)
Recommended: Use a version tag (most stable)
- name: Sync Issues and PRs
uses: vig-os/sync-issues-action@v0.1.1Alternative: Use a branch (for latest changes)
- name: Sync Issues and PRs
uses: vig-os/sync-issues-action@mainMost secure: Use a commit SHA (pinned version)
- name: Sync Issues and PRs
uses: vig-os/sync-issues-action@abc123def456Note: ${{ github.token }} is provided automatically by GitHub Actions and is used by default. You can override it by passing your own token input if needed or using GitHub App authentication.
| Input | Description | Required | Default |
|---|---|---|---|
token |
GitHub token with repo access. | No | ${{ github.token }} |
app-id |
GitHub App ID. If provided with app-private-key, will use app authentication. |
No | - |
app-private-key |
GitHub App private key. If provided with app-id, will use app authentication. |
No | - |
output-dir |
Directory to store markdown files | No | synced-issues |
sync-issues |
Whether to sync issues | No | true |
sync-prs |
Whether to sync pull requests | No | true |
include-closed |
Include closed issues/PRs | No | false |
updated-since |
Only sync items updated after this ISO8601 timestamp | No | - |
state-file |
Optional path to store last sync timestamp (use with cache) | No | - |
The action provides the following outputs:
| Output | Description |
|---|---|
issues-count |
Number of issues synced in this run |
prs-count |
Number of pull requests synced in this run |
last-synced-at |
ISO8601 timestamp when the sync completed |
modified-files |
Comma-separated list of file paths that were created or modified |
app-token |
GitHub App installation token (if app credentials provided). Use for checkout/push operations to bypass rulesets. |
github-token |
Original GitHub token. Use for commit signing. |
- name: Sync Issues and PRs
id: sync
uses: vig-os/sync-issues-action@v0.1.1
- name: Display sync results
run: |
echo "Synced ${{ steps.sync.outputs.issues-count }} issues"
echo "Synced ${{ steps.sync.outputs.prs-count }} pull requests"
echo "Last synced at ${{ steps.sync.outputs.last-synced-at }}"See example-workflow.yml for a complete workflow example using manual, issue (opened/edited/reopened/closed), and pull request (opened/closed) triggers (no scheduled run).
synced-issues/
├── issues/
│ ├── issue-1.md
│ ├── issue-2.md
│ └── ...
└── pull-requests/
├── pr-1.md
├── pr-2.md
└── ...
Each file includes:
- Metadata (state, dates, author, labels, comment count)
- Title with state indicator
- Full description/body (as written in GitHub)
- All comments/conversation (with author, timestamp, and links)
- PR review threads grouped with replies and diff hunks when provided by GitHub
- Link to GitHub
- Last synced timestamp
You can run tests on the action from its root directory:
npm run test:allYou can also run the following specific tests:
- Run fast, isolated tests with mocks for GitHub APIs and filesystem.
- Commands:
npm testornpm run test:unitnpm run test:watchfor watch modenpm run test:coveragefor coverage
- Exercise the built action against a real GitHub token and repo context.
- Commands:
npm run test:integration(callssrc/__tests__/integration/test-action.sh)- Requires
GITHUB_TOKEN(orgh auth token) and repo context variables.
- Run the action locally with
@github/local-actionfor end-to-end behavior. - Commands:
npm run test:integration:local(callssrc/__tests__/integration/test-local.sh)- Uses
GITHUB_TOKENand a temp.envto pass inputs.
- Make changes to
src/index.ts - Build:
npm run build && npm run package - Run tests:
npm test - Test locally with
local-action
See LICENSE.