refactor(dev-infra): share more github code between commands (#38656)

Instead of repeating the logic for adding the github token to
a repository git url, we add a shared function for automatically
computing the URls with token.

Additionally, URLs for updating/generating tokens have been moved
to a dedicated file in the `utils` folder. Also while being at it,
the yargs github token helper is also moved into the dedicated
Git/Github related util folder.

PR Close #38656
This commit is contained in:
Paul Gschwendtner
2020-09-01 10:39:35 +02:00
committed by Alex Rickabaugh
parent 4744c229db
commit 758d0e2045
11 changed files with 62 additions and 47 deletions

View File

@ -84,7 +84,6 @@ class GithubGraphqlClient {
}
}
/** Perform a query using Github's GraphQL API. */
async query<T extends GraphQLQueryObject>(queryObject: T, params: RequestParameters = {}) {
const queryString = query(queryObject);