File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 48
48
xl_label : ' size/xl'
49
49
fail_if_xl : ' false'
50
50
message_if_xl : >
51
- ' This PR exceeds the recommended size of 1000 lines.
51
+ This PR exceeds the recommended size of 1000 lines.
52
52
Please make sure you are NOT addressing multiple issues with one PR.
53
- Note this PR might be rejected due to its size.’
53
+ Note this PR might be rejected due to its size.
54
54
github_api_url : ' api.github.com'
55
55
files_to_ignore : ' '
56
56
` ` `
Original file line number Diff line number Diff line change @@ -17,13 +17,17 @@ github::calculate_total_modifications() {
17
17
local -r body=$( curl -sSL -H " Authorization: token $GITHUB_TOKEN " -H " $GITHUB_API_HEADER " " $GITHUB_API_URL /repos/$GITHUB_REPOSITORY /pulls/$pr_number /files?per_page=100" )
18
18
19
19
local changes=0
20
+
20
21
for file in $( echo " $body " | jq -r ' .[] | @base64' ) ; do
22
+ local ignore_file=0
21
23
for file_to_ignore in $files_to_ignore ; do
22
- if [ " $file_to_ignore " != " $( basename $( jq::base64 ' .filename' ) ) " ]; then
23
- total_changes=$( jq::base64 ' .changes' )
24
- (( changes += total_changes))
24
+ if [ " $file_to_ignore " = " $( basename $( jq::base64 ' .filename' ) ) " ]; then
25
+ ignore_file=1
25
26
fi
26
27
done
28
+ if [ $ignore_file -eq 0 ]; then
29
+ (( changes += $(jq:: base64 '.changes')) )
30
+ fi
27
31
done
28
32
29
33
echo $changes
You can’t perform that action at this time.
0 commit comments