I'm unable to find database query for total lines of code in all the bitbucket projects.
Does anyone know database query or REST API to get the total lines of code in all the bitbucket projects?
Thanks in advance.
There is no way to do this via the REST API as it's not information that either Bitbucket Server nor Bitbucket Cloud tracks currently.
I'm (really) curious though, why would this information be in any way useful?
I don't see an obvious way through the web gui, there's running a script like this on your local copy of the repository as an option.
https://github.com/AlDanial/cloc
Related
I have a series of jenkins pipeline jobs to move Apps to Cloud Foundry. My client application need to be able to listen to all the updates of a push. I.e. apart from getting text logs, i need other events like Git repo cloned, cloud foundry logged in, App pushed.
One crud way of doing this is to submit POST requests to an event server from a shell script(Curl). However, I think it is unlikely that such a functionality does not exist already on Jenkins(either through a plugin or something like that).
I need an advice from best practices point of view.
Thanks.
As commented by mdabdullah. But this needs a person to set up kibana or splunk. (I did not try this).
Statistics gatherer plugin
https://plugins.jenkins.io/statistics-gatherer/
Jenkins notification plugin
https://plugins.jenkins.io/notification/
Both 2,3 are available plugins in the Jenkins community. They need to configured for server endpoints before use.
Generally, we can send the variables dynamically through the parameterized project in Jenkins using the REST API. Now, in the same way, I want to send Jenkins current build number as a response to REST API. Is it possible? or Any alternative way means any plugins could help to achieve this?
Could anybody suggest me on this?
I'm having a team in BitBucket which has around 200+ members & 500 repositories. I wanted do some auditing of all repos & using BitBucket API for most of my work. I came across a requirement where I need to find out Admin members of each repos ( even one repo at a time will do), I read documentation but didn't find anything useful.
Can someone could guide me on this.
Thanks,
Meghanand
There's this rest api defined to get the users of a repository with their permissions in the below link for BitBucket stash.
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/permissions/users.
May be this can be extended to BitBucket Cloud.
https://docs.atlassian.com/DAC/rest/stash/3.11.3/stash-rest.html#idp494288
My goal is to ask questions of the Jenkins server within a Jenkins-run script (specifically when it's run on a remote agent). I'd like to use a Perl or Python script with the REST API. I'd like to ask data known by the Jenkins server.
In my specific case, I'd like a build-display-name of a most-recent successful build of a different project. I'd like to do this without username/password credentials. I'd expect to be able to use the environment variable JENKINS_SERVER_COOKIE as a credential as a cookie or header as I use the Jenkins REST API for GET-based requests.
Is that possible? If not, what is the environment variable JENKINS_SERVER_COOKIE used for?
Thanks!
JENKINS_SERVER_COOKIE is not used for anything related to the REST API; best to ignore it.
What you request is not currently possible.
Is there a way using the BitBucket API to get a list of all commiters/contributors to a repository?
I know I can user git-shortlog for this purpose but would rather make an API call if possible.
No, we do not currently have that kind of data indexed, or available through the API.