diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-09-21 19:44:17 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-09-21 19:44:17 +0900 |
| commit | 00ccc2251a399d9435d1abebfdd223860ad826aa (patch) | |
| tree | c10eed259073407bafcc203659d56fe80786ad07 /.github/workflows/report-api-diff.yml | |
| parent | fix rbt (diff) | |
| parent | fix(backend): `Retry-After`ヘッダーが実際には送信されなかっ... (diff) | |
| download | misskey-00ccc2251a399d9435d1abebfdd223860ad826aa.tar.gz misskey-00ccc2251a399d9435d1abebfdd223860ad826aa.tar.bz2 misskey-00ccc2251a399d9435d1abebfdd223860ad826aa.zip | |
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
Diffstat (limited to '.github/workflows/report-api-diff.yml')
| -rw-r--r-- | .github/workflows/report-api-diff.yml | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/.github/workflows/report-api-diff.yml b/.github/workflows/report-api-diff.yml index df9cc279e8..9fd1e28f01 100644 --- a/.github/workflows/report-api-diff.yml +++ b/.github/workflows/report-api-diff.yml @@ -70,18 +70,27 @@ jobs: - id: out-diff name: Build diff Comment run: | - cat <<- EOF > ./output.md - このPRによるapi.jsonの差分 - <details> - <summary>差分はこちら</summary> - - \`\`\`diff - $(cat ./api.json.diff) - \`\`\` - </details> - - [Get diff files from Workflow Page](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) - EOF + HEADER="このPRによるapi.jsonの差分" + FOOTER="[Get diff files from Workflow Page](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})" + DIFF_BYTES="$(stat ./api.json.diff -c '%s' | tr -d '\n')" + + echo "$HEADER" > ./output.md + + if (( "$DIFF_BYTES" <= 1 )); then + echo '差分はありません。' >> ./output.md + else + cat <<- EOF >> ./output.md + <details> + <summary>差分はこちら</summary> + + \`\`\`diff + $(cat ./api.json.diff) + \`\`\` + </details> + EOF + fi + + echo "$FOOTER" >> ./output.md - uses: thollander/actions-comment-pull-request@v2 with: pr_number: ${{ steps.load-pr-num.outputs.pr-number }} |