Skip to content

Commit

Permalink
🐛 reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bierman committed May 15, 2024
1 parent 014031a commit 1dbee1f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/comment-workflow-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ jobs:
per_page: 100 // Adjust this as needed
});
const filteredRuns = response.data.workflow_runs.filter(run => workflows.includes(run.name));
return { runs: filteredRuns };
return filteredRuns;
- name: Create Comment Body
id: create-table
uses: actions/github-script@v6
with:
script: |
const workflows = JSON.parse('${{ steps.fetch-workflows.outputs.runs }}');
const workflows = JSON.parse('${{ steps.fetch-workflows.outputs.result }}');
let commentBody = "## Workflow Status\n| Workflow | Status | Details |\n|----------|--------|---------|\n";
workflows.forEach(workflow => {
let emoji;
Expand All @@ -82,12 +81,11 @@ jobs:
commentBody += `| ${workflow.name} | ${emoji} ${workflow.conclusion || 'Loading...'} | [Logs](${workflow.html_url}) |\n`;
});
core.setOutput('body', commentBody);
console.log(`Comment Body: ${commentBody}`);
return { body: commentBody };
- name: Debugging Outputs
run: |
echo "Comment Body: ${{ steps.create-table.outputs.body }}"
echo "Comment Body: ${{ steps.create-table.outputs.body }}"
- name: Find or Create Comment
id: find-or-create-comment
uses: peter-evans/find-comment@v3
Expand All @@ -103,4 +101,4 @@ jobs:
comment-id: ${{ steps.find-or-create-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number || github.run_id }}
body: ${{ steps.create-table.outputs.body }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1dbee1f

Please sign in to comment.