Use @actions/[email protected] to invoke GraphQL for GHES compatibility

This commit is contained in:
eric sciple
2020-05-13 20:24:25 -04:00
parent 9bf8ee6742
commit f4a606f9ac
5 changed files with 82 additions and 68 deletions
+2 -3
View File
@@ -1,7 +1,7 @@
import {from, Observable, merge, throwError, of} from 'rxjs'
import {graphql} from '@octokit/graphql'
import {catchError, map, tap} from 'rxjs/operators'
import {GraphQlQueryResponse} from '@octokit/graphql/dist-types/types'
import {graphql} from './graphql'
export interface DeletePackageVersionMutationResponse {
deletePackageVersion: {
@@ -21,10 +21,9 @@ export function deletePackageVersion(
token: string
): Observable<boolean> {
return from(
graphql(mutation, {
graphql(token, mutation, {
packageVersionId,
headers: {
authorization: `token ${token}`,
Accept: 'application/vnd.github.package-deletes-preview+json'
}
}) as Promise<DeletePackageVersionMutationResponse>