Skip to content

Commit

Permalink
feat: minPermissionLevel filter for projects connections (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Jul 8, 2024
1 parent ee111b5 commit 503d8f1
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 0 deletions.
16 changes: 16 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9379,6 +9379,7 @@ export type IssueProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down Expand Up @@ -15364,6 +15365,7 @@ export type OrganizationProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down Expand Up @@ -17856,10 +17858,20 @@ export type ProjectV2OwnerProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};

/** The possible roles of a collaborator on a project. */
export type ProjectV2PermissionLevel =
/** The collaborator can view, edit, and maange the settings of the project */
| 'ADMIN'
/** The collaborator can view the project */
| 'READ'
/** The collaborator can view and edit the project */
| 'WRITE';

/** Recent projects for the owner. */
export type ProjectV2Recent = {
/** Recent projects that this user has modified in the context of the owner. */
Expand Down Expand Up @@ -18784,6 +18796,7 @@ export type PullRequestProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down Expand Up @@ -22717,6 +22730,7 @@ export type RepositoryProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down Expand Up @@ -27073,6 +27087,7 @@ export type TeamProjectsV2Args = {
filterBy?: InputMaybe<ProjectV2Filters>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down Expand Up @@ -30445,6 +30460,7 @@ export type UserProjectsV2Args = {
before?: InputMaybe<Scalars['String']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
minPermissionLevel?: InputMaybe<ProjectV2PermissionLevel>;
orderBy?: InputMaybe<ProjectV2Order>;
query?: InputMaybe<Scalars['String']['input']>;
};
Expand Down
55 changes: 55 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -18226,6 +18226,11 @@ type Issue implements Assignable & Closable & Comment & Deletable & Labelable &
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down Expand Up @@ -29293,6 +29298,11 @@ type Organization implements Actor & AnnouncementBanner & MemberStatusable & Nod
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down Expand Up @@ -34779,6 +34789,11 @@ interface ProjectV2Owner {
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand All @@ -34791,6 +34806,26 @@ interface ProjectV2Owner {
): ProjectV2Connection!
}

"""
The possible roles of a collaborator on a project.
"""
enum ProjectV2PermissionLevel {
"""
The collaborator can view, edit, and maange the settings of the project
"""
ADMIN

"""
The collaborator can view the project
"""
READ

"""
The collaborator can view and edit the project
"""
WRITE
}

"""
Recent projects for the owner.
"""
Expand Down Expand Up @@ -36545,6 +36580,11 @@ type PullRequest implements Assignable & Closable & Comment & Labelable & Lockab
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down Expand Up @@ -45139,6 +45179,11 @@ type Repository implements Node & PackageOwner & ProjectOwner & ProjectV2Recent
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down Expand Up @@ -54274,6 +54319,11 @@ type Team implements MemberStatusable & Node & Subscribable {
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down Expand Up @@ -60969,6 +61019,11 @@ type User implements Actor & Node & PackageOwner & ProfileOwner & ProjectOwner &
"""
last: Int

"""
Filter projects based on user role.
"""
minPermissionLevel: ProjectV2PermissionLevel = READ

"""
How to order the returned projects.
"""
Expand Down
99 changes: 99 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45949,6 +45949,16 @@
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
},
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
Expand Down Expand Up @@ -75879,6 +75889,16 @@
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
},
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
Expand Down Expand Up @@ -90477,6 +90497,16 @@
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
},
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
Expand Down Expand Up @@ -90557,6 +90587,35 @@
}
]
},
{
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"description": "The possible roles of a collaborator on a project.",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "READ",
"description": "The collaborator can view the project",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WRITE",
"description": "The collaborator can view and edit the project",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "ADMIN",
"description": "The collaborator can view, edit, and maange the settings of the project",
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
},
{
"kind": "INTERFACE",
"name": "ProjectV2Recent",
Expand Down Expand Up @@ -94871,6 +94930,16 @@
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
},
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
Expand Down Expand Up @@ -117387,6 +117456,16 @@
"ofType": null
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
}
],
"type": {
Expand Down Expand Up @@ -138945,6 +139024,16 @@
"ofType": null
},
"defaultValue": "\"\""
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
}
],
"type": {
Expand Down Expand Up @@ -155859,6 +155948,16 @@
},
"defaultValue": "{field: NUMBER, direction: DESC}"
},
{
"name": "minPermissionLevel",
"description": "Filter projects based on user role.",
"type": {
"kind": "ENUM",
"name": "ProjectV2PermissionLevel",
"ofType": null
},
"defaultValue": "READ"
},
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
Expand Down

0 comments on commit 503d8f1

Please sign in to comment.