-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.44 KB
/
todo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# https://github.com/alstr/todo-to-issue-action/?tab=readme-ov-file#url-insertion
name: File issues for todo comments
on:
push:
workflow_dispatch:
inputs:
MANUAL_COMMIT_REF:
description: The SHA of the commit to get the diff for
required: true
MANUAL_BASE_REF:
description: >
By default, the commit entered above is compared
to the one directly before it; to go back further,
enter an earlier SHA here
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: File issues
uses: alstr/todo-to-issue-action@v5.1.5
env:
MANUAL_COMMIT_REF: ${{ inputs.MANUAL_COMMIT_REF }}
MANUAL_BASE_REF: ${{ inputs.MANUAL_BASE_REF }}
with:
INSERT_ISSUE_URLS: true
AUTO_ASSIGN: true
CLOSE_ISSUES: true
# write comments in MD
ESCAPE: false
- 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 "Automatically added GitHub issue links to TODOs"
git push origin main
else
echo "No changes to commit"
fi