From 988ba8ec1ce8608fadfec57e81eb7dbc00d6ba51 Mon Sep 17 00:00:00 2001 From: alyx Date: Sat, 24 Dec 2022 14:15:37 -0600 Subject: [PATCH] Remove GITHUB_TOKEN support so as to avoid confusion from Gitea Actions roleplaying as Github --- .../upload/notify-git/set-commit-status.ts | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/commands/upload/notify-git/set-commit-status.ts b/src/commands/upload/notify-git/set-commit-status.ts index 53f40bf..58b2a1e 100644 --- a/src/commands/upload/notify-git/set-commit-status.ts +++ b/src/commands/upload/notify-git/set-commit-status.ts @@ -25,34 +25,6 @@ export async function setCommitStatus(data: UploadResponse, release?: string): P const context = 'meli'; const description = release ? `Release ${release} deployed to Meli` : 'Site deployed to Meli'; - if (process.env.GITHUB_TOKEN) { - logger.info('Setting Github commit status'); - - const github = new Github(process.env.GITHUB_TOKEN, process.env.GITHUB_SERVER_URL); - await github.setCommitStatus(repoId, commitHash, { - context, - description, - status: data ? 'success' : 'failure', - url: data?.urls[0], - }); - } else { - logger.debug('Github token not found, will not set commit status'); - } - - if (process.env.GITLAB_TOKEN) { - logger.info('Setting Gitlab commit status'); - - const gitlab = new Gitlab(process.env.GITLAB_TOKEN, process.env.GITLAB_URL); - await gitlab.setCommitStatus(repoId, commitHash, { - name: context, - description, - state: data ? 'success' : 'failed', - url: data?.urls[0], - }); - } else { - logger.debug('Gitlab token not found, will not set commit status'); - } - if (process.env.GITEA_TOKEN && process.env.GITEA_URL) { logger.info('Setting Gitea commit status');