From a4e0d56560ea8220efdfdd6d392a9d164b7daddc Mon Sep 17 00:00:00 2001 From: jowi Date: Wed, 16 Oct 2024 00:11:53 -0400 Subject: [PATCH] ci(todo-to-issue): create workflow --- .github/workflows/TODO_TO_ISSUE.yml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/TODO_TO_ISSUE.yml diff --git a/.github/workflows/TODO_TO_ISSUE.yml b/.github/workflows/TODO_TO_ISSUE.yml new file mode 100644 index 000000000..61b87742e --- /dev/null +++ b/.github/workflows/TODO_TO_ISSUE.yml @@ -0,0 +1,38 @@ +name: TODO to Issue + +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 🛎️ Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # All history for branches and tags + + - name: 📝 Create TODOs + uses: alstr/todo-to-issue-action@v5 + with: + INSERT_ISSUE_URLS: 'true' + + - name: Set Git user + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Commit and Push Changes + run: | + git add -A + if [[ `git status --porcelain` ]]; then + git commit -m "docs(issues): add issue(s)" + echo hello + git push origin HEAD:refs/heads/${GITHUB_REF_NAME} + echo goodbye + else + echo "No new issues to create!" + fi