MCPcopy Index your code
hub / github.com/refined-github/refined-github / fetchIssueData

Function fetchIssueData

source/features/status-subscription.tsx:107–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105});
106
107async function fetchIssueData(): Promise<Record<string, any>> {
108 const {owner, name} = getRepo()!;
109 const body = {
110 // `IssueViewerSecondaryViewQuery`
111 query: 'cb9b35846fadf5f80ec3a2c05bf42a89',
112 variables: {number: getConversationNumber()!, owner, repo: name},
113 };
114 const url = new URL('/_graphql', location.origin);
115 url.searchParams.set('body', JSON.stringify(body));
116
117 const response = await fetch(url, {headers: githubApiBaseHeaders});
118 if (!response.ok) {
119 throw new Error('Failed to fetch the issue');
120 }
121
122 const {data} = await response.json();
123 return data;
124}
125
126async function updateSubscription(targetStatus: SubscriptionStatus, id: string): Promise<void> {
127 const response = await fetch('/_graphql', {

Callers 1

addButtonFunction · 0.85

Calls 2

getConversationNumberFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected