Skip to content

Commit

Permalink
chore: testing output to slack
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderblue committed May 13, 2024
1 parent c54e0ab commit 96346b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/graphql-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Check for output from script
run: echo "${{ steps.schema-diff.outputs.new_endpoints }}"

- name: Send test failures report to Slack
- name: Send report to Slack
id: slack
if: ${{ always() }}
uses: slackapi/[email protected]
Expand All @@ -75,11 +75,13 @@ jobs:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.schema-diff.outputs.new_endpoints }}"
}
"type": "context",
"elements": [
{
"type": "plain_text",
"text": "${{ steps.schema-diff.outputs.new_endpoints }}"
}
]
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/schema-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module.exports = async ({

let message = "No NerdGraph API updates since the last check."
if (endpointsDiff.length > 0) {
message = `Attention: new endpoints added to NerdGraph API: ${endpointsDiff.join()}`
message = `*New endpoints added to NerdGraph API*\n\n ${endpointsDiff.join('\n')}`
}

console.log(message)
console.log("\n\n", message, "\n\n")

core.setOutput('new_endpoints', message);
}

0 comments on commit 96346b1

Please sign in to comment.