How do I add a private repo from my organization to BuildHive? - cloudbees

I'd like to add a private Github repo for my organization to BuildHive but for some reason they aren't showing in the "Add Projects from GitHub!" page.
Is there someway to add these or are private repos not yet supported? Is there some paid subscription service for BuildHive I can use to get this support?

BuildHive is an intentionally simple build service: only open-source (or at least public) repositories supported, only on GitHub, and with minimal configuration options. If you want any other options, you can subscribe to the DEV#cloud service to get a Jenkins instance that you can configure however you like, including access to password-protected version control.

Related

DocuSign API integration issue with RESTful Web Services : javax.ws.rs-api-2.0.1.jar

My project is using DocuSign API to post Envelope with the Java client:
docusign-esign-java-3.2.0.jar
It works fine, but the project also needs to use jCloud with another lib dependency:
javax.ws.rs-api-2.0.1.jar
The server (tomcat) gets an exception when calling the JWT authent of DocuSign:
Could not initialize class com.sun.jersey.core.header.MediaTypes
Is it possible to fix this dependency problem without exploring the DocuSign sources?
welcome to SO.
depending on the dependency management program you are using , you can print a tree and then investigate if there is any conflict.
for gradle,
./gradlew app:dependencies
for Maven
mvn dependency:tree
Also, generally before that message you will see a Java Exception. If you add that or look at it, it may throw more light on the problem.
best wishes.
Yes, we (DocuSign) have this issue logged as an issue for the SDK and as DocuSign internal ticket DCM-3324.
Please ask your DocuSign representative to add your organization information to DCM-3324 to help raise the priority of the issue. Thank you.

Which scope should I use to ask user for permission to read-only repo (private and public) with Github API?

According to GitHub API documentation, I can't get what scope I should use to ask to user to let me download his public/private repo, in read-only manner.
Currently I'm using repo but as you can read in the docs it:
Grants read/write access to code, commit statuses, invitations,
collaborators, adding team memberships, and deployment statuses for
public and private repositories and organizations.
But I don't want to ask to the user the permission to write on his repos!
That was requested in 2015, and two years later, the GitHub Platform Roadmap does mention a "Granular access permissions".
But for now, read-only access is not yet part of the available scopes.
A possible workaround would be to setup a mirror repo, and on each commit on the first original repo, force pushing (overriding) said commit to the second repo (obliterating any write/modification done on that second repo)

Asana Task Permissions

I am connecting to the Asana API endpoint and creating a task independent from anything except I am putting in into my company workspace.
I see that it has the permission "private" but I can change it to "public" on the UI in the site. However, I want to make the task public upon my POST request to the /tasks endpoint.
This is because I don't necessarily want the user to have to specify a project to be able to POST a public task that is available for the whole company workspace to see.
How can I add this attribute to my task without associating with a project?
There isn't currently support for this, but I'll add it to our feature wish list!

Access to api from gitlab webhooks

I need to develop a bunch of my own web hooks (or services maybe) for auto deploy, report into project management systems, etc.
But data posted to web hook don't have much information to fill my needs.
For example, I've received simple push event, how can I know is it force push or not? Okay, I have 2 treeishes, let's look at repository and check this push — oops, need user token to do it. Sad.
What is the right method to access gitlab api from web hooks? Probably I've missed something important? I'm really confused.
Upd1:
Let's try to find a solution. Possibilities
Imagine we can have a user who can read all projects in gitlab. But
that user should be connected to each project to have an access. Ok
;-(
What about to read repo by pusher? We can't because we need to use his private token to do this.
Maybe some internal functionality to read all repos or something? Sure not.
So. Maybe database? Nope. Because we need to clone repo at first and can't save data in DB anyway with refreshing caches.
I think we need a security token and maybe many checkboxes with access permissions for each joined web hook or an app (service).
Please feel free to share your ideas.
I've remembered partial solution. So scenario will be like that:
Create web service with your web hook.
Create a ssh key on the same host for some special (usually owner of web hook service) user to have an access to repos.
Add ssh key created at previous step as deploy key.
Finally: Register your webhook and add your deploy key for that hook to project — repeat it for each project what need this hook.
You have event listener (your web hook service), and you have access to that repository (ssh/git).
But still that solution doesn't have access to API itself.
Probably, there is also an another solution.
Create custom admin user with a big random password and some synthetic name like HookBot or something, remember private_token of that user;
Register your web hook;
Use api access to add your deploy key with HookBot (untested);
Use sudo api to get sources or something else. Just mimicry to pusher's account (sudo -u {author_id}) and go on, read repo, work with it, etc.
Maybe some another solutions? More legit?

Can I see the hooks in a repository I don't own?

I want to know if a Github repository has defined a certain service hook (Webhook URL) but I am not the owner of the repos (though I am a collaborator).
Is there a way to do that via the API (or any other programmatic way)?
If it helps, the repository in question may sometimes belong to an individual and sometimes to an organization.
I confirm the OP's conclusion:
It does not work. If I authenticate as the owner of the repo, it does work.
That means the List query (GET /repos/:owner/:repo/hooks) won't work if you are not owner (or admin for an organization) of a repo.
The Hooks GitHub API does mention:
The Repository Hooks API allows repository admins to manage the post-receive hooks for a repository.
Update February 2014: "New scopes for managing repository hooks"
You now can see hooks for a repo you don't own, provided the owner set the right scope:
Many third party services need to set up hooks in order to act upon events in your repositories.
We’ve introduced three new scopes that provide more granular access to your repository hooks without allowing access to your repository contents:
read:repo_hook grants read access to hooks in public or private repositories.
write:repo_hook grants read and write access to hooks in public or private repositories.
admin:repo_hook grants read, write, and delete access to hooks in public or private repositories.