Skip to content

Commit

Permalink
anotha one
Browse files Browse the repository at this point in the history
  • Loading branch information
MarquessV committed Nov 15, 2024
1 parent de6b17d commit 33a28dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/validate-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ jobs:
const mypyFailed = '${{ steps.mypy.outcome }}' === 'failure';
const ruffFailed = '${{ steps.ruff.outcome }}' === 'failure';
const pytestFailed = '${{ steps.pytest.outcome }}' === 'failure';
const constructLogURL = (stepId) => {
return `https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.id }}?pr=${{ github.context.issue.number }}`
return `https://github.com/${owner}/${repo}/actions/runs/${{ github.run_id }}/jobs/${{ job.id }}/steps/${stepId}/logs`;
};
// Fetch the existing comment with this identifier, if it exists
// Fetch existing comment, if it exists
const identifier = `pyQuil-checks-comment`;
const comments = await github.rest.issues.listComments({
owner,
Expand All @@ -75,6 +76,7 @@ jobs:
});
const existingComment = comments.data.find(comment => comment.body.startsWith(`<!-- ${identifier} -->`));
async function postOrUpdateComment(body) {
if (existingComment) {
await github.rest.issues.updateComment({
Expand All @@ -96,7 +98,7 @@ jobs:
var body = ""
if (mypyFailed || ruffFailed || pytestFailed) {
body += `⚠️ **pyQuil Compatibility Checks Failed**:\n\n| Tool | Status |;
let body += `⚠️ **pyQuil Compatibility Checks Failed**:\n\n| Tool | Status |;
if (mypyFailed) {
body += `| mypy | ❌ Failed |\n`;
Expand All @@ -114,4 +116,4 @@ jobs:
body += `✅ **pyQuil Compatibility Checks Passed**. Great job!`;
}
postOrUpdateComment(body);
await postOrUpdateComment(body);

0 comments on commit 33a28dd

Please sign in to comment.