Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
vscode-pull-request-github/src/github/common.ts at main · gitgit-bot/vscode-pull-request-github · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
gitgit-bot
/
vscode-pull-request-github
Public
forked from
microsoft/vscode-pull-request-github
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
main
Breadcrumbs
vscode-pull-request-github
/
src
/
github
/
common.ts
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
108 lines (104 loc) · 6.7 KB
main
Breadcrumbs
vscode-pull-request-github
/
src
/
github
/
common.ts
Copy path
Top
File metadata and controls
Code
Blame
108 lines (104 loc) · 6.7 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
*
as
OctokitRest
from
'@octokit/rest'
;
import
{
Endpoints
}
from
'@octokit/types'
;
import
{
DocumentNode
}
from
'graphql'
;
import
{
FolderRepositoryManager
}
from
'./folderRepositoryManager'
;
import
{
GitHubRepository
}
from
'./githubRepository'
;
import
{
Repository
}
from
'../api/api'
;
import
{
GitHubRemote
}
from
'../common/remote'
;
export
namespace
OctokitCommon
{
export
type
IssuesAssignParams
=
OctokitRest
.
RestEndpointMethodTypes
[
'issues'
]
[
'addAssignees'
]
[
'parameters'
]
;
export
type
IssuesCreateParams
=
OctokitRest
.
RestEndpointMethodTypes
[
'issues'
]
[
'create'
]
[
'parameters'
]
;
export
type
IssuesCreateResponseData
=
OctokitRest
.
RestEndpointMethodTypes
[
'issues'
]
[
'create'
]
[
'response'
]
[
'data'
]
;
export
type
IssuesListCommentsResponseData
=
OctokitRest
.
RestEndpointMethodTypes
[
'issues'
]
[
'listComments'
]
[
'response'
]
[
'data'
]
;
export
type
IssuesListEventsForTimelineResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}/issues/{issue_number}/timeline'
]
[
'response'
]
[
'data'
]
;
export
type
IssuesListEventsForTimelineResponseItemActor
=
{
name
?:
string
|
null
;
email
?:
string
|
null
;
login
:
string
;
id
:
number
;
node_id
:
string
;
avatar_url
:
string
;
gravatar_id
:
string
;
url
:
string
;
html_url
:
string
;
followers_url
:
string
;
following_url
:
string
;
gists_url
:
string
;
starred_url
:
string
;
subscriptions_url
:
string
;
organizations_url
:
string
;
repos_url
:
string
;
events_url
:
string
;
received_events_url
:
string
;
type
:
string
;
site_admin
:
boolean
;
starred_at
:
string
;
user_view_type
:
string
;
}
export
type
PullsCreateParams
=
OctokitRest
.
RestEndpointMethodTypes
[
'pulls'
]
[
'create'
]
[
'parameters'
]
;
export
type
PullsCreateReviewResponseData
=
Endpoints
[
'POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews'
]
[
'response'
]
[
'data'
]
&
{
submitted_at
:
string
;
}
;
export
type
PullsCreateReviewCommentResponseData
=
Endpoints
[
'POST /repos/{owner}/{repo}/pulls/{pull_number}/comments'
]
[
'response'
]
[
'data'
]
;
export
type
PullsGetResponseData
=
OctokitRest
.
RestEndpointMethodTypes
[
'pulls'
]
[
'get'
]
[
'response'
]
[
'data'
]
;
export
type
IssuesGetResponseData
=
OctokitRest
.
RestEndpointMethodTypes
[
'issues'
]
[
'get'
]
[
'response'
]
[
'data'
]
;
export
type
PullsGetResponseUser
=
Exclude
<
PullsGetResponseData
[
'user'
]
,
null
>
;
export
type
PullsListCommitsResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}/pulls/{pull_number}/commits'
]
[
'response'
]
[
'data'
]
;
export
type
PullsListRequestedReviewersResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers'
]
[
'response'
]
[
'data'
]
;
export
type
PullsListResponseItem
=
OctokitRest
.
RestEndpointMethodTypes
[
'pulls'
]
[
'list'
]
[
'response'
]
[
'data'
]
[
0
]
;
export
type
PullsListResponseItemHead
=
PullsListResponseItem
[
'head'
]
;
export
type
PullsListResponseItemBase
=
PullsListResponseItem
[
'base'
]
;
export
type
PullsListResponseItemHeadRepo
=
PullsListResponseItemHead
[
'repo'
]
;
export
type
PullsListResponseItemBaseRepo
=
PullsListResponseItemBase
[
'repo'
]
;
export
type
PullsListResponseItemUser
=
Exclude
<
PullsListResponseItem
[
'user'
]
,
null
>
;
export
type
PullsListResponseItemAssignee
=
PullsListResponseItem
[
'assignee'
]
;
export
type
PullsListResponseItemAssigneesItem
=
(
Exclude
<
PullsListResponseItem
[
'assignees'
]
,
null
|
undefined
>
)
[
0
]
;
export
type
PullsListResponseItemRequestedReviewersItem
=
(
Exclude
<
PullsListResponseItem
[
'requested_reviewers'
]
,
null
|
undefined
>
)
[
0
]
;
export
type
PullsListResponseItemBaseUser
=
PullsListResponseItemBase
[
'user'
]
;
export
type
PullsListResponseItemBaseRepoOwner
=
PullsListResponseItemBase
[
'repo'
]
[
'owner'
]
;
export
type
PullsListResponseItemHeadUser
=
PullsListResponseItemHead
[
'user'
]
;
export
type
PullsListResponseItemHeadRepoOwner
=
PullsListResponseItemHead
[
'repo'
]
[
'owner'
]
;
export
type
PullsListReviewRequestsResponseTeamsItem
=
Endpoints
[
'GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers'
]
[
'response'
]
[
'data'
]
[
'teams'
]
[
0
]
;
export
type
PullsListCommitsResponseItem
=
Endpoints
[
'GET /repos/{owner}/{repo}/pulls/{pull_number}/commits'
]
[
'response'
]
[
'data'
]
[
0
]
;
export
type
ReposCompareCommitsResponseData
=
OctokitRest
.
RestEndpointMethodTypes
[
'repos'
]
[
'compareCommits'
]
[
'response'
]
[
'data'
]
;
export
type
ReposGetCombinedStatusForRefResponseStatusesItem
=
Endpoints
[
'GET /repos/{owner}/{repo}/commits/{ref}/status'
]
[
'response'
]
[
'data'
]
[
'statuses'
]
[
0
]
;
export
type
ReposGetCommitResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}/commits/{ref}'
]
[
'response'
]
[
'data'
]
;
export
type
ReposGetCommitResponseFiles
=
Endpoints
[
'GET /repos/{owner}/{repo}/commits/{ref}'
]
[
'response'
]
[
'data'
]
[
'files'
]
;
export
type
ReposGetResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}'
]
[
'response'
]
[
'data'
]
;
export
type
ReposGetResponseCodeOfConduct
=
ReposGetResponseData
[
'code_of_conduct'
]
;
export
type
ReposGetResponseOrganization
=
ReposGetResponseData
[
'organization'
]
;
export
type
ReposListBranchesResponseData
=
Endpoints
[
'GET /repos/{owner}/{repo}/branches'
]
[
'response'
]
[
'data'
]
;
export
type
SearchReposResponseItem
=
Endpoints
[
'GET /search/repositories'
]
[
'response'
]
[
'data'
]
[
'items'
]
[
0
]
;
export
type
CompareCommits
=
Endpoints
[
'GET /repos/{owner}/{repo}/compare/{base}...{head}'
]
[
'response'
]
[
'data'
]
;
export
type
Commit
=
CompareCommits
[
'commits'
]
[
0
]
;
export
type
CommitFiles
=
CompareCommits
[
'files'
]
export
type
Notification
=
Endpoints
[
'GET /notifications'
]
[
'response'
]
[
'data'
]
[
0
]
;
export
type
ListEventsForTimelineResponse
=
Endpoints
[
'GET /repos/{owner}/{repo}/issues/{issue_number}/timeline'
]
[
'response'
]
[
'data'
]
[
0
]
;
export
type
ListWorkflowRunsForRepo
=
Endpoints
[
'GET /repos/{owner}/{repo}/actions/runs'
]
[
'response'
]
[
'data'
]
;
export
type
WorkflowRun
=
Endpoints
[
'GET /repos/{owner}/{repo}/actions/runs'
]
[
'response'
]
[
'data'
]
[
'workflow_runs'
]
[
0
]
;
export
type
WorkflowJob
=
Endpoints
[
'GET /repos/{owner}/{repo}/actions/jobs/{job_id}'
]
[
'response'
]
[
'data'
]
;
export
type
WorkflowJobs
=
Endpoints
[
'GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs'
]
[
'response'
]
[
'data'
]
;
}
export
function
mergeQuerySchemaWithShared
(
sharedSchema
:
DocumentNode
,
schema
:
DocumentNode
)
{
const
sharedSchemaDefinitions
=
sharedSchema
.
definitions
;
const
schemaDefinitions
=
schema
.
definitions
;
const
mergedDefinitions
=
schemaDefinitions
.
concat
(
sharedSchemaDefinitions
)
;
return
{
...
schema
,
...
sharedSchema
,
definitions
:
mergedDefinitions
}
;
}
export
interface
RepoInfo
{
owner
:
string
;
repo
:
string
;
baseRef
:
string
;
remote
:
GitHubRemote
;
repository
:
Repository
;
ghRepository
:
GitHubRepository
;
fm
:
FolderRepositoryManager
;
}
You can’t perform that action at this time.