Browse Source

Removes unneeded data from query

main
Eric Amodio 2 years ago
parent
commit
ddaaff359b
1 changed files with 13 additions and 16 deletions
  1. +13
    -16
      src/premium/github/github.ts

+ 13
- 16
src/premium/github/github.ts View File

@ -187,11 +187,12 @@ export class GitHubApi {
const cc = Logger.getCorrelationContext(); const cc = Logger.getCorrelationContext();
interface QueryResult { interface QueryResult {
repository: {
defaultBranchRef: {
name: string;
} | null;
} | null;
repository:
| {
defaultBranchRef: { name: string } | null | undefined;
}
| null
| undefined;
} }
try { try {
@ -1288,26 +1289,22 @@ export class GitHubApi {
const cc = Logger.getCorrelationContext(); const cc = Logger.getCorrelationContext();
interface QueryResult { interface QueryResult {
repository: {
defaultBranchRef:
| {
name: string;
target: { oid: string };
}
| null
| undefined;
};
repository:
| {
defaultBranchRef: { name: string } | null | undefined;
}
| null
| undefined;
} }
try { try {
const query = `query getDefaultBranchAndTip(
const query = `query getDefaultBranch(
$owner: String! $owner: String!
$repo: String! $repo: String!
) { ) {
repository(owner: $owner, name: $repo) { repository(owner: $owner, name: $repo) {
defaultBranchRef { defaultBranchRef {
name name
target { oid }
} }
} }
}`; }`;

Loading…
Cancel
Save