Bugfix: Attach correct link to "levitate detect breaking changes"-message included in PR (#60220)

* Fixed so we link to the proper job and step.

* Fixed according to feedback.

* Added check_suite to the job link
This commit is contained in:
Marcus Andersson
2022-12-15 09:56:23 +01:00
committed by GitHub
parent f73cdc5e80
commit d0a68b266c
2 changed files with 9 additions and 8 deletions

View File

@@ -1,9 +1,9 @@
module.exports = async ({ github, context, core }) => {
module.exports = async ({ name, github, context, core }) => {
const { owner, repo } = context.repo;
const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${context.runId}/jobs`
const result = await github.request(url)
const link = `https://github.com/grafana/grafana/runs/${result.data.jobs[0].id}?check_suite_focus=true`;
core.setOutput('link', link);
}
const result = await github.request(url);
const job = result.jobs.find(j => j.name === name);
core.setOutput('link', `${job.html_url}?check_suite_focus=true`);
}