-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: send notifications to teams channel #895
Conversation
run: | | ||
curl \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"workflow_name": "${{github.workflow}}", "job_id": "${{github.job}}", "run_id": "${{github.run_id}}", "ref": "${{github.ref_name}}", "message": "${{inputs.message}}"}' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we quote the message string, or at least document what it may and may not contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like quoted strings just disappear from the message, should I just document this in the description of the workflow run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documented this behavior in the description of the message
parameter.
We should use a card like with Constellation and provide a direct link/button to the logs. |
7aa21c1
to
c6f2707
Compare
better message
mod message
c0610fc
to
5762ce9
Compare
Cards are now posted in the corresponding channel. |
Button to run seems to be broken? |
I don't think the buttons are broken, its just that the messages I sent contained quotes which seemingly broke the parsing of the workflow and caused the URL to be replaced with the last word of the quoted text. If you look at the card with run_id 11177841920 (which uses the same adaptive card layout) you'll see that the button works there :) |
shell: bash | ||
run: | | ||
run_url="${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" | ||
payload="$(printf '{"workflow_name": "%s", "job_id": "%s", "run_id": "%s", "ref": "%s", "message": "%s", "run_url": "%s"}' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as this gets more complex, we might want to have a template file, similar to the one in constellation.
Add the
post_to_teams
github action that allows a workflow to post into theContrast-CI-Notifications
channel. Furthermore, integrate this action into weekly running actions.