Calling REST commit_activity endpoint returns empty array in Action

When calling the REST API commit_activity endpoint manually (using PostMan or Insomnia) I get an array with commit information. However, when I hit the same endpoint within my GH Action I receive an empty array.

I’m using @actions/github to access the API from within my GH Action. I believe it is pre-seeded with auth credentials, but I don’t believe that endpoint requires credentials.

When I say “I don’t believe” it requires credentials, that’s because I can hit it successfully in Insomnia without credentials.

Payload from Insomnia without credentials:

[
  {
    "total": 0,
    "week": 1560643200,
    "days": [
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  ...
]

Payload from GitHub Action:

[]

Hi @MichaelJolley,

The actions/github is deprecated.
Githubaction
I confirmed if your repository is public, it doesn’t require credential for the command.
Please check my workflow here for your reference.

Thanks.

Thanks @weide-zhou. I’m not using actions/github. I’m using [@actions/github](https://github.com/actions/toolkit/tree/master/packages/github) which is apart of [actions/toolkit](https://github.com/actions/toolkit).

Your workflow does show me that the GH Rest API can send that data into the action so something else is happening on my end. I’ll research.

Hi @MichaelJolley,

Just wonder whether it’s resolved? If it it, could you please share the code sample to help others who has the same query?

Thanks.

Haven’t had a chance to work on it since. Will definitely update when I get it finished.