fix: splitting tokens

This commit is contained in:
Simone Corsi
2021-01-16 11:05:14 +01:00
parent 7499f866f0
commit bd470783b8
5 changed files with 13 additions and 9 deletions

View File

@@ -5,13 +5,9 @@ import * as exec from '@actions/exec';
const { GITHUB_REPOSITORY, GITHUB_REF } = process.env;
const IS_TEST = process.env.NODE_ENV === 'test';
const branch = GITHUB_REF?.replace('refs/heads/', '');
export default new (class Git {
commandsRun: string[] = [];
constructor() {
const githubToken = core.getInput('github-token', { required: true });
core.setSecret(githubToken);
@@ -76,8 +72,6 @@ export default new (class Git {
push = () => this.exec(`push origin ${branch} --follow-tags`);
isShallow = async () => {
if (IS_TEST) return false;
const isShallow: string = await this.exec(
'rev-parse --is-shallow-repository'
);