Refactor github actions and add copycat (#10215)

* add actions

* disable copycat, fix action location

* dont look for env for token
This commit is contained in:
Anthony Dresser
2020-04-29 19:34:02 -07:00
committed by GitHub
parent 87e5239713
commit 9ac9872533
44 changed files with 1883 additions and 74934 deletions

View File

@@ -0,0 +1,19 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
class CopyCat {
constructor(github, owner, repo) {
this.github = github;
this.owner = owner;
this.repo = repo;
}
async run() {
const issue = await this.github.getIssue();
console.log(`Mirroring issue \`${issue.title}\` to ${this.owner}/${this.repo}`);
await this.github.createIssue(this.owner, this.repo, issue.title, issue.body.replace(/@|#|issues/g, '-'));
}
}
exports.CopyCat = CopyCat;