File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ name: Size
3030
3131on :
3232 push :
33- branches :
34- - ' main '
33+ branches-ignore :
34+ - ' dependabot/** '
3535 pull_request :
3636 branches :
3737 - ' main'
8585 repo: context.repo.repo,
8686 });
8787
88- const comment = response.data.find(comment => comment.body.includes('# Size Report of **OpenThread**'))
88+ const kMagicHeader = '<!-- Size Report of **OpenThread** -->'
89+
90+ const comment = response.data.find(comment => comment.body.startsWith(kMagicHeader))
8991
9092 if (comment) {
9193 params.comment_id = comment.id;
Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ readonly OT_REPORT_FILE_TABLE
4444OT_REPORT_FILE_PR=" ${OT_TMP_DIR} /report_pr"
4545readonly OT_REPORT_FILE_TABLE
4646
47- PR_NUMBER=" $( [[ $GITHUB_REF_NAME =~ ([0-9]+)/merge ]] && echo " ${BASH_REMATCH[1]} " ) "
47+ if [[ $GITHUB_REF_NAME =~ ([0-9]+)/merge ]]; then
48+ PR_NUMBER=" ${BASH_REMATCH[1]} "
49+ else
50+ PR_NUMBER=
51+ fi
4852
4953setup_arm_gcc_7 ()
5054{
@@ -169,9 +173,9 @@ generate_table_header()
169173 } >> " ${OT_REPORT_FILE_TABLE} "
170174
171175 {
172- printf " # Size Report of **OpenThread**\n"
176+ printf " <!-- Size Report of **OpenThread** --> \n"
173177 if [[ -n $PR_NUMBER ]]; then
174- printf " > Merging #${PR_NUMBER} into ${GITHUB_BASE_REF} \n\n "
178+ printf " > Merging #%s into %s\n\n " " ${PR_NUMBER} " " ${GITHUB_BASE_REF} "
175179 fi
176180 printf " | name | branch | text | data | bss | total |\n"
177181 printf " | :----: | :------: | -----: | ----: | ---: | ----: |\n"
You can’t perform that action at this time.
0 commit comments