penland365 / gh Goto Github PK
View Code? Open in Web Editor NEWA GitHub CLI tool
License: BSD 3-Clause "New" or "Revised" License
A GitHub CLI tool
License: BSD 3-Clause "New" or "Revised" License
PATCH /orgs/:org
.
Edit an organization API Documentation
Name | Type | Description |
---|---|---|
billing_email | string | Billing email address. This address is not publicized. |
company | string | The company name. |
string | The publicly visible email address. | |
location | string | The location. |
name | string | The shorthand name of the company. |
description | string | The description of the company. |
has_organization_projects | boolean | Toggles whether organization projects are enabled for the organization. |
has_repository_projects | boolean | Toggles whether repository projects are enabled for repositories that belong to the organization. |
default_repository_permission | boolean | Default permission level members have for organization repositories: * read - can pull, but not push to or administer this repository. * write - can pull and push, but not administer this repository. * admin - can pull, push and administer this repository. * none - no permissions granted by default. Default: read |
members_can_create_repositories | boolean | Toggles ability of non-admin organization members to create repositories * true - all organization members can create repositories. * false - only admin members can create repositories Default: true |
{
"billing_email": "[email protected]",
"blog": "https://github.com/blog",
"company": "GitHub",
"email": "[email protected]",
"location": "San Francisco",
"name": "github",
"description": "GitHub, the company.",
"default_repository_permission": "read",
"members_can_create_repositories": "true"
}
200 OK
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "[email protected]",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"billing_email": "[email protected]",
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20
},
"default_repository_settings": "read",
"members_can_create_repositories": "true",
"has_organization_projects": true,
"has_repository_projects": true
}
DELETE /orgs/:org/outside_collaborators/:username
.
Removing a user from this list will remove them from all the organization's repositories.
Remove outside collaborators API documentation
204 No Content
422 Unprocessable Entity
{
"message": "You cannot specify an organization member to remove as an outside collaborator.",
"documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#remove-outside-collaborator"
}
It has been deprecated: announcement.
Is there any functionality you would require from another library before this would be possible?
PATCH /user/email/visibility
200 OK
Toggle primary email visibility
[
{
"email": "[email protected]",
"primary": true,
"verified": true,
"visibility": "private"
}
]
Get a single user from the API --> GET /users/:username
Get a Single User API Documentation
Example JSON Payload
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "[email protected]",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"two_factor_authentication": true,
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"collaborators": 0
}
}
PUT /orgs/:org/outside_collaborators/:username
.
When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see Converting an organization member to an outside collaborator.
Convert member to outsdie collaborator API documentation
204 No Content
403 Forbidden
{
"message": "Cannot convert the last owner to an outside collaborator",
"documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}
403 Forbidden
{
"message": "<user> is not a member of the <organization> organization.",
"documentation_url": "https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}
GET /user/emails
.
200 OK
[
{
"email": "[email protected]",
"verified": true,
"primary": true,
"visibility": "public"
}
]
POST /user/emails
201 Created
[
"[email protected]",
"[email protected]"
]
[
{
"email": "[email protected]",
"primary": false,
"verified": false
},
{
"email": "[email protected]",
"primary": false,
"verified": false
}
]
DELETE /user/emails
204 No content
[
"[email protected]",
"[email protected]"
]
GET /user/public_emails
200 OK
List public email addresses for a user
[
{
"email": "[email protected]",
"verified": true,
"primary": true,
"visibility": "public"
}
]
GET /users/:username/orgs
.
200 OK
List public organization memberships for the specified user.
This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List your organizations API instead.
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization"
}
]
Due to rust_curl's lack of DELETE
and PATCH
HTTP support, a change is needed to move over to hyper before we go to far down the path with rust_curl.
GET /user
.
Get the authenticated user from the API
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "[email protected]",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"two_factor_authentication": true,
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"collaborators": 0
}
}
Set up a full testing pipeline. Includes CI server, one default Unit test, one default integration test, setting up GitHub to receive the status of the CI output.
The config resource needs to be cleaned up.
GET /orgs/:org
.
Note: Many Organization response values require the user making the request to be authenticated, an organization owner, and have the admin:org scope authorized.
Get an organization API Documentation
200 OK
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization"
}
]
GET /user/orgs
.
200 OK
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization"
}
]
PATCH /user
200 OK
Name | Type | Description |
---|---|---|
name | string | The new name of the user. |
string | Publicly visible email address. | |
blog | string | The new blog URL of the user. |
company | string | The new company of the user. |
location | string | The new location of the user. |
hireable | boolean | The new hiring availability of the user. |
bio | string | The new short biography of the user. |
{
"name": "monalisa octocat",
"email": "[email protected]",
"blog": "https://github.com/blog",
"company": "GitHub",
"location": "San Francisco",
"hireable": true,
"bio": "There once..."
}
GET /orgs/:org/outside_collaborators
.
List all users who are outside collaborators of an organization.
List outside collaborators API documentation
Name | Type | Description |
---|---|---|
filter | string | Filter the list of outside collaborators. Can be one of: * 2fa_disabled: Outside collaborators without two-factor authentication enabled. * all: All outside collaborators. Default: all |
200 OK
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.