Chore: Improve levitate CI PR messaage (#79679)

* Chore: Improve levitate CI PR messaage

* Temporary disable the skip

* Remove ignore

* Add an artificial breaking change

* Restore

* Restore

* Trigger breaking change (maybe?)

* --wip-- [skip ci]

* Empty commit

* Keep trying

* Breaking change maybe?

* Add levitate markdown to persistent output

* Move markdown output

* no skipping

* Force run

* remove skip

* Try

* Fix workflow

* tryu

* fix typo

* remove duplicated id

* Test

* Invert commands

* Fix script

* Do not output the markdown directly

* Try 2

* Try with base64

* Update message

* Update message

* Fix base64 encoding

* Update report

* Fix

* test file

* Try without base64

* Fix report to not use base64

* restore skip file

* revert breaking changes

* Empty commit
This commit is contained in:
Esteban Beltran
2023-12-20 10:09:58 +01:00
committed by GitHub
parent b312f48c10
commit 5fd5a8e385
4 changed files with 86 additions and 38 deletions
@@ -96,6 +96,22 @@ jobs:
return doesExist ? 1 : 0;
# put the markdown into a variable
- name: Levitate Markdown
id: levitate-markdown
if: steps.levitate-run.outputs.shouldSkip != 'true'
run: |
if [ -f "${ARTIFACT_FOLDER}/levitate.md" ]; then
{
echo 'levitate_markdown<<EOF'
cat ${ARTIFACT_FOLDER}/levitate.md
echo EOF
} >> $GITHUB_OUTPUT
else
echo "levitate_markdown=No breaking changes detected" >> $GITHUB_OUTPUT
fi
# Comment on the PR
- name: Comment on PR
if: steps.levitate-run.outputs.exit_code == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
@@ -103,11 +119,9 @@ jobs:
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
message: |
⚠️ &nbsp;&nbsp;**Possible breaking changes**
⚠️ &nbsp;&nbsp;**Possible breaking changes (md version)**
_(Open the links below in a new tab to go to the correct steps)_
${{ steps.levitate-run.outputs.message }}
${{ steps.levitate-markdown.outputs.levitate_markdown }}
[Console output](${{ steps.levitate-run.outputs.job_link }})
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide/breaking-changes-guide.md)