mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
12
.github/workflows/scripts/pr-get-job-link.js
vendored
12
.github/workflows/scripts/pr-get-job-link.js
vendored
@@ -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`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user