todo-to-issue-action/.github/workflows/example-cross-repo.yml
Shakar Bakr 1b4753ffdd
Refactor action to use composite run steps and support cross-repository issue creation
- Changed action execution from Docker to composite with Python setup.
- Added `TARGET_REPO` input to allow issue creation in a specified repository.
- Updated `GitHubClient` to use `TARGET_REPO` for issue and milestone URLs.
- Enhanced README with instructions for cross-repository usage.
- Introduced example workflow for creating TODO issues in another repository.

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-05-15 15:49:54 +03:00

35 lines
1.1 KiB
YAML

name: Create TODO Issues in Another Repository
# NOTE: This is an example for when the TARGET_REPO feature is released.
# The current published version of the action does not yet have this feature.
on:
push:
branches: [main, master]
permissions:
contents: read
issues: write
jobs:
todo-to-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to get the diff between commits
- name: TODO to Issue
# Use the local version of the action (after you've made the changes)
uses: ./
with:
TARGET_REPO: "my-org/target-repo" # Replace with your target repository
TOKEN: ${{ secrets.CROSS_REPO_TOKEN }} # Token with access to the target repository
CLOSE_ISSUES: "true" # Optional: close issues when TODOs are removed
AUTO_ASSIGN: "true" # Optional: assign issues to the committer
# Other optional configurations:
# IDENTIFIERS: '{"TODO": "TODO:", "FIXME": "Fix needed:"}' # Custom identifiers for TODOs
# LABELS: 'todo,fixme' # Default labels to apply to all created issues