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 13c629d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 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 @@ -73,13 +73,11 @@ jobs:
# "New Relic Client Go | NerdGraph API Report",
payload: |
{
"blocks": [
"type": "context",
"elements": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.schema-diff.outputs.new_endpoints }}"
}
"type": "plain_text",
"text": ${{ toJSON(steps.schema-diff.outputs.new_endpoints) }}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/schema-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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)
Expand Down

0 comments on commit 13c629d

Please sign in to comment.