github-api

java api to get a file content for enterprise github

梦想的初衷 提交于 2020-03-19 03:46:08
问题 I tried so hard for a simple line of code that read a file content from enterprise github with oauth token, but could not find a example of such. I tried https://github.com/jcabi/jcabi-github, but it does not support enterprise github?(maybe I am wrong) Now i am trying egit: GitHubClient client = new GitHubClient("enterprise url"); GitHubRequest request = new GitHubRequest(); request.setUri("/readme"); GitHubResponse response = client.get(request); Then what? I only saw a getBody, maybe I

Can images on 'user-images.githubusercontent.com' be deleted?

感情迁移 提交于 2020-03-03 04:37:26
问题 I accidentally uploaded an image I don't want to have on GitHub. I had thought that I had cut private information from an image I was uploading for example purposes, but the private information remains. It contains things like a hostname that I would prefer is not public knowledge. Is there a way to remove that image from github's image registry? I know it's highly unlikely that someone ever unearths it by checking all the possible destinations for the image on their server, but it would give

How do I generate the GitHub OAuth token for organization accounts?

爷,独闯天下 提交于 2020-02-26 11:32:45
问题 I have created an organization on GitHub. My organization has some repos. These repos have API documentation that I would like to re-build and publish to gh-pages branch via Travis-CI. In order to give Travis-CI access to my organization's repos I need to generate an OAuth token, encrypt it, and then add then include the encypted token in the .travis.yml file as follows... env: global: - secure: "lots-of-seemingly-random-characters" This SO post explains the process and provides the details

Laravel: how to mock dependency injection class methods

て烟熏妆下的殇ゞ 提交于 2020-02-24 10:17:30
问题 I'm using the GitHub API through a Laravel API Wrapper. I've created a dependency injection class. How can I mock the exists method within the App\Http\GitHub.php class? App\Http\GitHub.php : use GrahamCampbell\GitHub\GitHubManager; class Github { public $username; public $repository; public function __construct($username, $repository, GitHubManager $github) { $this->username = $username; $this->repository = $repository; $this->github = $github; } public static function make($username,

Trouble setting up Tower with my GitHub Account - error: could not lock config file

醉酒当歌 提交于 2020-02-13 09:03:46
问题 I've been using the GitHub for Mac app but on the suggestion of a friend, decided to give Tower a shot since it can also handle Beanstalk accounts as well. After installing the trial and putting in my GitHub username and password, I'm given this error: error: could not lock config file /Users/joshferrara/.gitconfig: Permission denied I was just curious if anyone knows what's causing this or if it has any relevance to me using Tower. Any help is greatly appreciated! Permissions on the file:

Trouble setting up Tower with my GitHub Account - error: could not lock config file

纵然是瞬间 提交于 2020-02-13 09:03:09
问题 I've been using the GitHub for Mac app but on the suggestion of a friend, decided to give Tower a shot since it can also handle Beanstalk accounts as well. After installing the trial and putting in my GitHub username and password, I'm given this error: error: could not lock config file /Users/joshferrara/.gitconfig: Permission denied I was just curious if anyone knows what's causing this or if it has any relevance to me using Tower. Any help is greatly appreciated! Permissions on the file:

How to get latest commit date - Github API

ぐ巨炮叔叔 提交于 2020-02-02 04:17:27
问题 I'm currently writing a small database of git reps and im wondering how i would go ahead and get the date of the latest commit if i have the rep listed in my database. I've never worked with the github API and im having a bit of a hard time wrapping my head around it. If anyone could help me figure it out i'd much appreciate it. PHP or JS prefereably as all the examples ive found has been in ruby. 回答1: If you were to use PHP like your example, I'd use cURL instead of file_get_contents, as you

Why aren't conversation comments in a pull request being returned from PullRequest.iter_comments()?

白昼怎懂夜的黑 提交于 2020-01-25 20:40:13
问题 I am using github3 python API and I have this piece of code: # Create new PR or get existing one prs = [pr for pr in repo.iter_pulls(state="open", base="master", head="rev_testrev2")] if len(prs) > 0: pr = prs[0] else: pr = repo.create_pull("My pull request", "master", "rev_testrev2", "This is a test pull request") comments = [c for c in pr.iter_comments()] print str(comments) In the PR, in github web page, I have several comments in the "conversation" tab and just 1 in "Files Changed" tab.

List most active users / trending developers on GitHub

可紊 提交于 2020-01-24 04:30:07
问题 There is a nice option get a list of top trending developers on GitHub using this url https://github.com/trending/developers I just want to know if this is possible to get same data via some REST API. Please help. 来源: https://stackoverflow.com/questions/44021454/list-most-active-users-trending-developers-on-github

GitHub API: Tag a commit belongs to ( parallel for git describe --tag <sha> )

风格不统一 提交于 2020-01-24 00:21:23
问题 I am experimenting with GitHub API using octokit ruby gem. My goal is to be able to extract the 'tag' that a commit SHA belongs to. Now I can easily do this on command line using > git describe 688ae0b --tags and get output > 3.0.1-122-g688ae0b which tells me Tag, commits since tags, and last commit hash. How do I get same info from GitHub API? Answers using GitHub API or Octokit client would both do, as I can translate from one other just fine. I have looked at a bunch of things like,