I am in the process of conducting a research on open source GitHub repositories, and there is this particular piece of information I would like to get about a repository: whether it is currently using a CI-service or not.
In order to do that, I locate the *.yml
configuration file, identify the CI-provider and query its API for latest build history. Then I can verify if the latest commits of master
branch have an associated CI-build.
For instance, if the project's using Travis, then querying https://api.travis-ci.org/repos/{owner}/{repo}/builds
gives me information on the latest 50 builds, which is right what I need.
But I have been having some issues with AppVeyor. According to their documentation, the build history can be acquired via: https://ci.appveyor.com/api/projects/{accountName}/{projectSlug}/history?recordsNumber={records-per-page}
. The API service request is accordingly provided with obligatory headings (Accept
and Authorization
). However, when I try to fetch build history for a project (e.g. Octokit/Octokit.net
), I always receive "Project not found or access denied."
.
Hence, am I correct in the assumption that AppVeyor restricts access to build information to registered project collaborators only?
Thanks!
To verify that the latest commits of master
branch have an associated CI builds you don't even need to call CI API - the required information is on GitHub already! All that you need is to check commit statuses with Statuses API. Every CI system has its own unique status context
value. For example, AppVeyor context starts from continuous-integration/appveyor
.