Skip to content

Commit a752db7

Browse files
committed
new action
Signed-off-by: Anas Nashif <[email protected]>
1 parent 9df8836 commit a752db7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/coding_guidelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Coding Guidelines
22

3-
on: pull_request
3+
on: pull_request_target
44

55
jobs:
66
compliance_job:
@@ -45,7 +45,8 @@ jobs:
4545
./scripts/ci/guideline_check.py --output output.txt -c origin/${BASE_REF}..
4646
4747
- name: Annotate
48-
uses: Attest/annotations-action@v1.0.3
48+
uses: yuzutech/annotations-action@v0.3.0
4949
with:
50-
path: './violations.json'
50+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
51+
input: './violations.json'
5152
title: 'Violations'

scripts/ci/guideline_check.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ def main():
8282
if violation in violations:
8383
v = {}
8484
v['message'] = "\t\n".join(violations[violation])
85-
v['path'] = violation.split(":")[0]
86-
v['line'] = { "start": violation.split(":")[1], "end": violation.split(":")[1] }
87-
v['column'] = { "start": 0, "end": 0 }
88-
v['level'] = "warning"
85+
v['file'] = violation.split(":")[0]
86+
v['line'] = violation.split(":")[1]
87+
v['annotation_level'] = "failure"
8988
vlist.append(v)
9089
numViolations += 1
9190
if args.output:

0 commit comments

Comments
 (0)