-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaction.yml
More file actions
33 lines (30 loc) · 1.03 KB
/
action.yml
File metadata and controls
33 lines (30 loc) · 1.03 KB
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
name: 'Pattern Checker'
description: 'Check PR diffs for red-flag patterns and post warnings'
inputs:
github_token:
description: 'GitHub token for API access'
required: true
config_file:
description: 'Path to custom pattern configuration file'
required: false
default: ''
file_extensions:
description: 'Comma-separated list of file extensions to check (e.g., .py,.c,.h)'
required: false
default: ''
only_warn:
description: 'Only warn, do not fail the workflow'
required: false
default: 'true'
runs:
using: 'composite'
steps:
- run: pip3 install requests pyyaml --quiet
shell: bash
- run: python3 "$GITHUB_ACTION_PATH/pr_scanner.py"
env:
PATTERN_CHECK_TOKEN: ${{ inputs.github_token }}
PATTERN_CHECK_CONFIG: ${{ inputs.config_file }}
PATTERN_CHECK_EXTENSIONS: ${{ inputs.file_extensions }}
PATTERN_CHECK_ONLY_WARN: ${{ inputs.only_warn }}
shell: bash