todo-to-issue-action/.github/workflows/example-cross-repo.yml

36 lines
1.2 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: "target-repo" # Replace with your target repository name (without org)
OWNER: "my-org" # Replace with your organization name
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