I am trying to list status of commits for a repository using github rest api.
The repository is under organisation and is private.
The repos_url
of which is https://api.github.com/orgs/mydummyorg/repos
Users with pull access can view commit statuses for a given ref:
GET /repos/:owner/:repo/commits/:ref/statuses
As per the api above is the GET url
So my final url will be repos_ulr + :owner/:repo/commits/:ref/statuses
If I do the curl as below then it is giving 404 not found
curl -u "username" https://api.github.com/orgs/mydummyorg/repos/:owner:repos/commits/:ref/statuses
Where:
:owner
= username (my login id in git):repos
= repository name under 'mydummyorg:ref
= sha of the commit`
I don't know what am I doing wrong. Is my url proper?
And the value that I am passing for :owner
, :repos
, :ref
correct?