51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Create issues from TODOs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
importAll:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing.
|
|
push:
|
|
branches: # do not set multiple branches, todos might be added and then get referenced by themselves in case of a merge
|
|
- main
|
|
- master
|
|
|
|
permissions:
|
|
issues: write
|
|
repository-projects: read
|
|
contents: read
|
|
|
|
jobs:
|
|
todos:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set derived environment variables
|
|
# Use shell commands to write to the GITHUB_ENV file.
|
|
run: |
|
|
echo "baseUrl=${{ env.GITHUB_API_URL }}" >> $GITHUB_ENV
|
|
echo "GHE_HOST=${{ env.GITHUB_API_URL }}" >> $GITHUB_ENV
|
|
|
|
- name: Use the new variables in subsequent steps
|
|
run: |
|
|
echo "The API URL is ${{ env.GITHUB_API_URL}}"
|
|
echo "The baseUrl is: $baseUrl"
|
|
echo "The GHE_HOST is: $GHE_HOST"
|
|
|
|
- name: Print environment
|
|
run: |
|
|
echo "=== ENVIRONMENT ==="
|
|
printenv
|
|
|
|
- name: Run Issue Bot
|
|
uses: juulsn/todo-issue@main
|
|
with:
|
|
excludePattern: '^(node_modules/)'
|
|
env:
|
|
ACTIONS_STEP_DEBUG: true
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |