jdcargile / ms-teams-notification Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to send a Microsoft Teams notification
License: MIT License
GitHub Action to send a Microsoft Teams notification
License: MIT License
Hey all,
if my current understanding is correct, right now the ms-teams-notification, take the author from the notification from the last commit message.
Are an existing way to extend that to use the own author name or ${{ github.actor }}
for GHA workflow execution that'll help a lot.?
When the workflow is triggered with workflow_run
from non-default branch, requesting the actions to have the capability to pickup the information from workflow_run
payload.
workflow_run
always uses default branch.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: jdcargile/[email protected]. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Node 12 has been out of support since April 2022, as a result we have started the deprecation process of Node 12 for GitHub Actions. We plan to migrate all actions to run on Node16 by Summer 2023. We will monitor the progress of the migration and listen to the community for how things are going before we define a final date.
To raise awareness of the upcoming change, we are adding a warning into workflows which contain Actions running on Node 12. This will come into effect starting on September 27th.
Getting this error and I'm unsure why.
TypeError: Cannot read property 'avatar_url' of null
at Object.createMessageCard (/home/runner/work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:2446:16)
at /home/runner/work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:3088:54
at Generator.next ()
at fulfilled (/home/runner/work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:3042:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Cannot read property 'avatar_url' of null
Hi,
did you think about adding proxy support?
there are some workarounds like octokit/rest.js#43
uses: jdcargile/ms-teams-notification@master
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: IN_PROGRESS
notification-color: 17a2b8
this was supposeto fix a bug in avatar but now a new bug
TypeError: Cannot read property 'login' of null
at Object.createMessageCard (/runner/_work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:2461:85)
at /runner/_work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:3090:54
at Generator.next ()
at fulfilled (/runner/_work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:3044:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Hi, I don't have much experience with ts but seems like this commit e38bccc
didn't fix Error: error:0308010C:digital envelope routines::unsupported
"build": "set NODE_OPTIONS=--openssl-legacy-provider tsc",
makes that tsc command is not run at all
so changes made to main.ts are not reflected in index.js
I would suggest adding && between commands
also I noticed that export should be used instead of set command
I am using this action in our workflow in the repo hosted at github.com and it works well, thanks for that.
Now I am trying to use a fork of it on GitHub enterprise and it does not work because the repo base URL is hard-coded
https://github.com/jdcargile/ms-teams-notification/blob/master/src/main.ts#L39
can I request to make this part configurable so we can use https://github.com or some GitHub enterprise base URL instead e.g https://github.somebigenterprise.com/some_repo
I am new to collaboration but I am happy to submit a PR if that is what helps moving us forward, thanks
The action is not working when we pass multiple webhook URI's as input
Any suggestions on how to pass multiple webhooks to a called Yaml from a caller Yaml without using matrix.
Can we add a customized tab for viewing the below git log to the existing card
git log git describe --tags --abbrev=0
..HEAD --pretty=oneline ${{inputs.branch_ref}}
Problem: This action emits a large amount of logging by default. When used in a composite action with other steps, this action will eclipse the logs of other steps.
Solution: I created a PR to add Verbose Logging control via an optional "verbose-logging" input:
#34
I have not tested these changes.
I just can make it work. I tried many options. For example my sha is: ${{ env.GITHUB_SHA }} shows as my sha is:
Thanks
I think it would be worthwhile to have an option to include the commit message in the card as well.
Hello,
I can't reproduce this all the time, but maybe every other time I get the following error:
TypeError: Cannot read property 'avatar_url' of null at Object.createMessageCard (C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2341:39) at C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2959:54 at Generator.next (<anonymous>) at fulfilled (C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2906:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) ##[error]Cannot read property 'avatar_url' of null
Hello,
Is it possible to add a URL to the notification summary? I tried using the markup syntax but it gets printed as it is. Any idea?
Thanks
Hi,
I have added the following code snippet to my yml file and the workflow executed successfully without any error. However, I don't get the notification on the MS Team Channel. Everything looks good with webhook and I used a github token which has been already in use in the same workflow. I am not sure what needs to be fixed, please help.
steps:
- name: Notify dedicated teams channel
uses: jdcargile/[email protected]
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
notification-summary: Pipeline starts
notification-color: 17a2b8
timezone: America/Denver
Thanks
Ramya
How can I take success failure status from current running test and display the success and failure notification dynamically.
Hi,
do you have any idea why notification color doesn't work? I guess even default one 0b93ff is not displayed.
steps:
- uses: actions/checkout@v4
- name: Notify dedicated teams channel
uses: jdcargile/[email protected]
with:
github-token: ${{ github.token }}
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: Test notification message
notification-color: ffc107
verbose-logging: true
Provide the ability to customize or omit message buttons such as "View Workflow Run" or "View Commit Changes".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.