toko-bifrost / ms-teams-deploy-card

Microsoft Teams Deploy Card
MIT License
96 stars 77 forks source link

Error in the post notify teams channel run #35

Closed abivolmv closed 3 years ago

abivolmv commented 3 years ago

We get this error in the post notify teams channel run:

(node:3227) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'login' of null
    at Object.formatCompactLayout (/home/runner/work/_actions/toko-bifrost/ms-teams-deploy-card/3.1.2/dist/post/index.js:1:236544)
    at Object.formatAndNotify (/home/runner/work/_actions/toko-bifrost/ms-teams-deploy-card/3.1.2/dist/post/index.js:1:37551)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:3227) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3227) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
runs-on: ubuntu-18.04
    steps:
      - name: Notify Teams channel
        uses: toko-bifrost/ms-teams-deploy-card@3.1.2
        if: always()
        with:
          webhook-uri: ${{ secrets.MSO_TEAMS_WEBHOOK_URI }}
          github-token: ${{ github.token }}
          environment: ${{github.event.inputs.env}}
          show-on-start: false
abivolmv commented 3 years ago

Bump

abivolmv commented 3 years ago

It seems the author is no longer available: https://github.com/toko-bifrost/ms-teams-deploy-card/blob/288bb1d919f2a1823ecbd8cb1ff5faf9d6ac2a52/src/layouts/compact.ts#L35

abivolmv commented 3 years ago

@aldwyn-acn do you think you can check it out soon ? ☺️

aldwyn-acn commented 3 years ago

Hey @abivolmv, ah yes, I will. Apologies 🙃

abivolmv commented 3 years ago

@aldwyn-acn also pls check #34 hate to do this but I really would appreciate these fixes ☺️

aldwyn-acn commented 3 years ago

Hi @abivolmv, the author.login is still in the API. See this sample.

This issue only happens when the committer hasn't set its existing Github account email address in the git config --local user.email (or --global).

See this issue: Request for commits “author”: null and “committer”: null, can’t get user login

By the way, this repo has been inactive for months now I just forked it on my personal Github acct. I will be leaving the team soon and no one is going to maintain it there. So kindly check aldwyn/ms-teams-deploy-card@master for its continued maintenance.