Git Product home page Git Product logo

Comments (38)

tsposato avatar tsposato commented on June 14, 2024 2

I updated to 1.3 but I still received the same error.

from ms-teams-notification.

mariam-alexander avatar mariam-alexander commented on June 14, 2024 2

Is there a fix for this issue yet ?

from ms-teams-notification.

dnepusb2 avatar dnepusb2 commented on June 14, 2024 1

Hey, I am running into the same issue....any good news?

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024 1

This is fixed in #7. To pick up the new version, update your action version to use v1.3. See snippet below for more information.

uses: jdcargile/[email protected]

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024 1

@tsposato, can you try using uses: jdcargile/ms-teams-notification (don't provide the version so it grabs master)? If that works I will create another release. I just pushed what I think will fix this finally.

Will do. Not sure I'll get to test this until Monday as 5pm has rolled around but I'll let you know the outcome as soon as I can.

from ms-teams-notification.

rwetzeler avatar rwetzeler commented on June 14, 2024 1

The other weird thing is that the person in question does actually have an avatar set. Unless I'm misunderstanding the way it retrieves an avatar. Is there something strange about how GitHub does things avatar wise I'm not getting?

We experienced this exact problem. When I dug in further, it appears that the author, was different than who committed... that author wasn't registered in GitHub from Name and email, but SSH keys are.. so he is a valid contributor on the repository, but GitHub doesn't recognize the email he committed with (because he didn't add that in his profile), yet his SSH key's re valid to commit.

I propose that if avatar_url fails, you put in a default avatar image, instead of failing the job.

image

from ms-teams-notification.

gfrid avatar gfrid commented on June 14, 2024 1

this is still not fixed in 1.3 getting the same error, i think the owner of code does not continue to support this code
i will move to another one

TypeError: Cannot read property 'avatar_url' of null
at Object.createMessageCard (/runner/_work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:2446:16)
at /runner/_work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:3088:54
at Generator.next ()
at fulfilled (/runner/_work/_actions/jdcargile/ms-teams-notification/v1.3/dist/index.js:3042:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Cannot read property 'avatar_url' of null

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

@mpconte, do you have a user that is making commits that doesn't have an avatar? I can test this myself, but curious whether you're seeing any consistency from the users who commit who are seeing this issue?

from ms-teams-notification.

mpconte avatar mpconte commented on June 14, 2024

Yes, I'm performing the commit and I don't have an avatar in Microsoft Teams and I think someone else makes commits too but does have one. Does an avatar have to be necessary?

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

Thanks! I will take a look at this before the end of the week.

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

@mpconte, this is referencing the author of the commit in GitHub. I can see that you have an avatar in GitHub. Do you have an automated task that is creating the commits for you when it fails?

from ms-teams-notification.

mpconte avatar mpconte commented on June 14, 2024

@jdcargile My gihub workflow using this action doesn't run on commits (sorry), I have it set as a workflow_dispatch to checkout changes, build and package it and notify microsoft teams at the end if the previous steps succeed.

from ms-teams-notification.

vtrusevich-incomm avatar vtrusevich-incomm commented on June 14, 2024

It looks like the issue is reproduced, when the last commit is made by the user, whose email is not registered in GitHub

from ms-teams-notification.

vtrusevich-incomm avatar vtrusevich-incomm commented on June 14, 2024

@jdcargile , I see, that the author is taken from commit here

const author = commit.data.author;
. Looks like it is needed to add some checks on author existence before building the card

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024

I'm also running into this issue, is there any progress on a fix?
Error is here:
TypeError: Cannot read property 'avatar_url' of null
at Object.createMessageCard (/home/runner/work/_actions/jdcargile/ms-teams-notification/v1.2/dist/index.js:2341:39)
at /home/runner/work/_actions/jdcargile/ms-teams-notification/v1.2/dist/index.js:2959:54
at Generator.next ()
at fulfilled (/home/runner/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

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

Thank you all for your comments and questions. What would you suggest we use for the author if it is not found? Should I do a default avatar image or omit the image altogether?

from ms-teams-notification.

dnepusb2 avatar dnepusb2 commented on June 14, 2024

He JD,
Thanks for the quick follow up. From my perspective:

  • Author undefined
  • Default avatar image

Cheers and thanks again!

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024

Sounds good to me.

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

I updated to 1.3 but I still received the same error.

@tsposato, can you try using uses: jdcargile/ms-teams-notification (don't provide the version so it grabs master)? If that works I will create another release. I just pushed what I think will fix this finally.

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024

The other weird thing is that the person in question does actually have an avatar set. Unless I'm misunderstanding the way it retrieves an avatar. Is there something strange about how GitHub does things avatar wise I'm not getting?

from ms-teams-notification.

jdcargile avatar jdcargile commented on June 14, 2024

This might not be fixed then. Perhaps I need to query the user directly before trying to grab their information. I can look into this more tomorrow.

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024

Slightly different error when using master now @jdcargile :

TypeError: Cannot read property 'login' of null
at Object.createMessageCard (/home/runner/work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:2461:85)
at /home/runner/work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:3090:54
at Generator.next ()
at fulfilled (/home/runner/work/_actions/jdcargile/ms-teams-notification/master/dist/index.js:3044:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Cannot read property 'login' of null

from ms-teams-notification.

tsposato avatar tsposato commented on June 14, 2024

Ok, so after some more digging it turns out the user had incorrectly spelt their email in their git user.email settings on one of their clients, hence why the user isn't being linked to their github account correctly. I think it should still probably be 'caught' instead of just failing completely though. Maybe just grab the name from the commit message and use that default avatar.

from ms-teams-notification.

akshata-kenchanagudd avatar akshata-kenchanagudd commented on June 14, 2024

Hi @jdcargile,

Getting the below error when using "uses: jdcargile/ms-teams-notification" instead of uses: jdcargile/[email protected]. Kindly suggest.
The workflow is not valid. .github/workflows/terraform-validate.yml (Line: 182, Col: 17): Expected format {org}/{repo}[/path]@ref. Actual 'jdcargile/ms-teams-notification' Input string was not in a correct format.

from ms-teams-notification.

stuartforrest-infinity avatar stuartforrest-infinity commented on June 14, 2024

@jdcargile can you release a v1.4 that includes this commit - 3e536e0?

from ms-teams-notification.

gspindev avatar gspindev commented on June 14, 2024

@jdcargile facing same issue - using v1.3

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

from ms-teams-notification.

825i avatar 825i commented on June 14, 2024

The other weird thing is that the person in question does actually have an avatar set. Unless I'm misunderstanding the way it retrieves an avatar. Is there something strange about how GitHub does things avatar wise I'm not getting?

We experienced this exact problem. When I dug in further, it appears that the author, was different than who committed... that author wasn't registered in GitHub from Name and email, but SSH keys are.. so he is a valid contributor on the repository, but GitHub doesn't recognize the email he committed with (because he didn't add that in his profile), yet his SSH key's re valid to commit.

I propose that if avatar_url fails, you put in a default avatar image, instead of failing the job.

image

Hi mate, have you got a pull request that shows how to fix this? Most of our users do not have avatars.

from ms-teams-notification.

lumos94 avatar lumos94 commented on June 14, 2024

same here, started having this issue since yesterday! all was good until suddenly it stopped!
the weird thing is that this happens only to 1 of my projects. in the other projects it works fine!

from ms-teams-notification.

dennistex avatar dennistex commented on June 14, 2024

Having this issue since last week. Looks like 3e536e0 fixes it
@jdcargile ?

from ms-teams-notification.

EvgeniyRub avatar EvgeniyRub commented on June 14, 2024

anibody fixed this issue already?

from ms-teams-notification.

bfernandes-d avatar bfernandes-d commented on June 14, 2024

Any news on this bug ?

from ms-teams-notification.

dimitar-cp avatar dimitar-cp commented on June 14, 2024

This started appearing today. Any news on the fix?

from ms-teams-notification.

LeonSnajdr avatar LeonSnajdr commented on June 14, 2024

I looked at the forks and searched for a fix, one fixed the bug in this pre-release https://github.com/TBCTSystems/ms-teams-notification/releases/tag/v1.3.1

from ms-teams-notification.

LeonSnajdr avatar LeonSnajdr commented on June 14, 2024

Maybe someone can create a pull request if it works for you too.

from ms-teams-notification.

silveiratalita avatar silveiratalita commented on June 14, 2024

try this, for me it works! Only this, and remove other parameters.

  • name: "Microsoft Teams - Notification"
    uses: toko-bifrost/ms-teams-deploy-card@master
    if: always()
    with:
    github-token: ${{ github.token }}
    webhook-uri: ${{ secrets.YOUR_TEAMS_WEBHOOK }}
    timezone: America/Sao_Paulo

from ms-teams-notification.

elubikowski avatar elubikowski commented on June 14, 2024

You have to have git user configured globally. I was using custom configuration without global settings. Adding as follows fixed the issue.
Obviously provide your values between double-quotes ;)

git config --global user.name "your_username"
git config --global user.email "[email protected]"

from ms-teams-notification.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.