File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 30
30
else
31
31
echo "stat=false" >> "$GITHUB_OUTPUT"
32
32
fi
33
+
34
+ szdiff :
35
+ name : Core MFC Line Difference
36
+ permissions :
37
+ contents : read
38
+ pull-requests : write
39
+ runs-on : ubuntu-latest
40
+ needs : checkbranch
41
+ if : needs.checkbranch.outputs.branchstat == 'false'
42
+ steps :
43
+ - name : Checkout code from PR branch
44
+ uses : actions/checkout@v4
45
+ with :
46
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
47
+ ref : ${{ github.event.pull_request.head.sha }}
48
+ path : pr
49
+ # the base default to MFC master and cannot be other fork branch for security purpose
50
+ - name : Checkout code from MFC master
51
+ uses : actions/checkout@v4
52
+ with :
53
+ path : base
54
+ - name : Set up Python 3.10
55
+ uses : actions/setup-python@v4
56
+ with :
57
+ python-version : ' 3.10'
58
+ - name : Count Line Diff
59
+ run : |
60
+ BASE="$GITHUB_WORKSPACE/base"
61
+ PR="$GITHUB_WORKSPACE/pr"
62
+ echo "$BASE" >> "GITHUB_ENV"
63
+ echo "$PR" >> "GITHUB_ENV"
64
+ echo "EOF" >> "$GITHUB_ENV"
65
+ # pip install tabulate
66
+ # cp "$BASE/sz.py" .
67
+ # echo "loc_content<<EOF" >> "$GITHUB_ENV"
68
+ # python sz.py "$BASE" "$PR" >> "$GITHUB_ENV"
69
+ - name : Comment Code Line Diff
70
+ continue-on-error : false
71
+ uses : marocchino/sticky-pull-request-comment@v2
72
+ with :
73
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74
+ ignore_empty : true
75
+ skip_unchanged : true
76
+ recreate : true
77
+ message : ${{ env.loc_content }}
You can’t perform that action at this time.
0 commit comments