We are building a DevOps metrics dashboard and one source we are using is CircleCI. We want to fetch all builds for each project. We already have the data fetching and processing working, but the problem is being able to query all projects in the organisation. We have CircleCI integrated with GitHub and share get the rights to projects trough GitHub. The security team does not want me to have full access to all the repositories in the organisation (I think this is quite reasonable) and as there are no organisation level API keys I’m stuck with fetching data just from projects which I have access to.
One possible workaround that we came up with is to create new GitHub admin account, create the API key with that account and then have the API key provided to the fetching script trough environmental variables in Docker container running the API fetch script. We have not yet implemented this though, as it seems a quite heavy-handed for such a simple problem.
Do you have any ideas on how to solve this problem more easily?
PS: I’m surprised that there does not seem to be more demand for organisational level API keys. Not many votes here https://ideas.circleci.com/ideas/CCI-I-1546