-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
45 lines (39 loc) · 1.32 KB
/
action.yml
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
name: "New TODOs"
description: "Parse a git diff for added or modified TODOs (or other keywords)."
author: "Felix Kloss (@luator)"
inputs:
label:
description: "The 'TODO' label that is searched for."
required: true
default: "TODO"
base_ref:
description: "The base branch for the diff."
required: true
default: "origin/master"
head_ref:
description: "The head branch for the diff."
required: true
default: "HEAD"
runs:
using: 'composite'
steps:
- name: Fetch all branches (needed for diff)
shell: bash
run: git fetch origin
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
shell: bash
run: pip install -r "${{ github.action_path }}/requirements.txt"
- name: Add Matcher
shell: bash
run: |
echo "::add-matcher::${{ github.action_path }}/git-diff-todos-problem-matcher.json"
- name: Run git-diff-todos
shell: bash
run: |
echo "::notice::Parse diff ${{ inputs.base_ref }}..${{ inputs.head_ref }} for ${{ inputs.label }}."
python3 "${{ github.action_path }}/git-diff-todos.py" --parsable-output \
-o ${{ inputs.base_ref }} -n ${{ inputs.head_ref }} -l "${{ inputs.label }}"