-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tables
github_team
, github_team_member
, github_team_repositor…
…y` and bump `google/go-github` to v45.1.0 (#165)
- Loading branch information
Showing
50 changed files
with
749 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Table: github_team | ||
|
||
Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. The `github_team` table lists all teams you have visibility to across your organizations. | ||
|
||
To list the teams that you're a member of across your organizations, use the `github_my_team` table. | ||
|
||
## Examples | ||
|
||
## List all visible teams | ||
|
||
```sql | ||
select | ||
id, | ||
name, | ||
privacy, | ||
description | ||
from | ||
github_team; | ||
``` | ||
|
||
## List all visible teams in an organization | ||
|
||
```sql | ||
select | ||
id, | ||
name, | ||
privacy, | ||
description | ||
from | ||
github_team | ||
where | ||
organization = 'my_org'; | ||
``` | ||
|
||
## List the number of members for a single team | ||
|
||
```sql | ||
select | ||
members_count | ||
from | ||
github_team | ||
where | ||
slug = 'team'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Table: github_team_member | ||
|
||
The `github_team_member` table can be used to query information about members of a team. **You must specify the organization and team slug** in the where or join clause (`where organization= AND slug=`, `join github_team_member on organization= AND slug=`). | ||
|
||
## Examples | ||
|
||
### Get information about a specific organization's team members | ||
|
||
```sql | ||
select | ||
login, | ||
role | ||
from | ||
github_team_member | ||
where | ||
organization = 'my_org' | ||
and slug = 'my-team'; | ||
``` | ||
|
||
### To get members for all teams and all organizations | ||
|
||
```sql | ||
select | ||
t.organization, | ||
t.name, | ||
t.privacy, | ||
t.description, | ||
tm.login, | ||
tm.role | ||
from | ||
github_team as t, | ||
github_team_member as tm | ||
where | ||
t.organization = tm.organization | ||
and t.slug = tm.slug | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Table: github_team_repository | ||
|
||
A repository contains all of your project's files and each file's revision history. | ||
|
||
The `github_team_repository` table can be used to query information about repositories that a team has access to. **You must specify the organization and team slug** in the where or join clause (`where organization= AND slug=`, `join github_team_repository on organization= AND slug=`). | ||
|
||
To list all **your** repositories use the `github_my_repository` table instead. To get information about **any** repository, use the `github_repository` table instead. | ||
|
||
## Examples | ||
|
||
### Get information about a specific organization's team | ||
|
||
```sql | ||
select | ||
name, | ||
owner_login, | ||
language, | ||
forks_count, | ||
stargazers_count, | ||
subscribers_count, | ||
watchers_count, | ||
description | ||
from | ||
github_team_repository | ||
where | ||
organization = 'my_org' | ||
and slug = 'my-team'; | ||
``` | ||
|
||
### To get repositories for all teams | ||
|
||
```sql | ||
select | ||
t.id as team_id, | ||
t.name as team_name, | ||
t.privacy as team_privacy, | ||
t.description as team_description, | ||
tr.name as repo_name, | ||
tr.fork as repo_is_fork, | ||
tr.private as repo_is_private, | ||
tr.archived as repo_is_archived, | ||
tr.language as repo_primary_language | ||
from | ||
github_team as t, | ||
github_team_repository AS tr | ||
where | ||
t.organization = 'my_org' | ||
and t.organization = tr.organization | ||
and t.slug = tr.slug | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.