From f2ef02cfb905e4f0ef04179acaf56f6ef425a61f Mon Sep 17 00:00:00 2001 From: Briana Date: Fri, 2 Feb 2024 10:02:02 -0800 Subject: [PATCH 1/5] Update main.ts --- src/main.ts | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/src/main.ts b/src/main.ts index a8db4aa..ff91928 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,28 +1,10 @@ -import * as indexCore from '@richnav/rich-code-nav-indexer-core'; -import { CachingTask, GitHubRepoInfo } from '@richnav/rich-code-nav-indexer-core'; -import { factory } from 'cloudbuild-task-github-actions'; import * as github from '@actions/github'; -class GitHubCachingTask extends CachingTask { - constructor(cloudTask, apiTokens) { - super(cloudTask, - { pipelineHost: "GitHub Actions", buildId: github.context.runId.toString(), buildDefinitionId: github.context.workflow}, - false, /* isExternal */ - apiTokens); - } - - protected getSourceControlInformationProvider(languageInput?: string | undefined): indexCore.BaseRepoInfo { - const repoToken = factory.inputs.getInput('repo-token') ?? process.env.REPO_TOKEN; - return new GitHubRepoInfo(factory, repoToken, languageInput); +class DeprecatedTask { + public async run() { + // Code Index deprecated, returning error on build. + github.warning(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); } } -const serviceConnection = factory.inputs.getInput('service-token') ?? process.env.SERVICE_TOKEN; -new GitHubCachingTask( - factory, - { - serviceConnection: serviceConnection, - - // Used to access private NuGet feeds. Does nothing if isPrivate input is not `true`. - systemVSSConnection: process.env.CODEINDEX_FEED_TOKEN, - }).run(); +new DeprecatedTask().run(); From 711842ea07b3f14eae2648cc64700b6d0d17e0ad Mon Sep 17 00:00:00 2001 From: Briana Date: Fri, 2 Feb 2024 10:05:32 -0800 Subject: [PATCH 2/5] Update main.ts --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index ff91928..b7f9a42 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,7 @@ import * as github from '@actions/github'; class DeprecatedTask { public async run() { // Code Index deprecated, returning error on build. - github.warning(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); + console.log(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); } } From 06538b194dd499f7ef1b0fdb7c1c39c6baeab9d6 Mon Sep 17 00:00:00 2001 From: Briana Date: Fri, 2 Feb 2024 10:06:57 -0800 Subject: [PATCH 3/5] Update main.ts --- src/main.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index b7f9a42..c87c959 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,3 @@ -import * as github from '@actions/github'; - class DeprecatedTask { public async run() { // Code Index deprecated, returning error on build. From 37f34744147e81dca86e98867789f043206636ab Mon Sep 17 00:00:00 2001 From: Briana Eng Date: Fri, 2 Feb 2024 10:12:39 -0800 Subject: [PATCH 4/5] build --- lib/main.js | 41 ++++------------------------------------- lib/main.js.map | 2 +- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/lib/main.js b/lib/main.js index 139290a..5282a32 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,41 +1,8 @@ "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -const rich_code_nav_indexer_core_1 = require("@richnav/rich-code-nav-indexer-core"); -const cloudbuild_task_github_actions_1 = require("cloudbuild-task-github-actions"); -const github = __importStar(require("@actions/github")); -class GitHubCachingTask extends rich_code_nav_indexer_core_1.CachingTask { - constructor(cloudTask, apiTokens) { - super(cloudTask, { pipelineHost: "GitHub Actions", buildId: github.context.runId.toString(), buildDefinitionId: github.context.workflow }, false, apiTokens); - } - getSourceControlInformationProvider(languageInput) { - var _a; - const repoToken = (_a = cloudbuild_task_github_actions_1.factory.inputs.getInput('repo-token')) !== null && _a !== void 0 ? _a : process.env.REPO_TOKEN; - return new rich_code_nav_indexer_core_1.GitHubRepoInfo(cloudbuild_task_github_actions_1.factory, repoToken, languageInput); +class DeprecatedTask { + async run() { + console.log(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); } } -const serviceConnection = (_a = cloudbuild_task_github_actions_1.factory.inputs.getInput('service-token')) !== null && _a !== void 0 ? _a : process.env.SERVICE_TOKEN; -new GitHubCachingTask(cloudbuild_task_github_actions_1.factory, { - serviceConnection: serviceConnection, - systemVSSConnection: process.env.CODEINDEX_FEED_TOKEN, -}).run(); +new DeprecatedTask().run(); //# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/lib/main.js.map b/lib/main.js.map index 090e659..7c96b3f 100644 --- a/lib/main.js.map +++ b/lib/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,oFAAkF;AAClF,mFAAyD;AACzD,wDAA0C;AAE1C,MAAM,iBAAkB,SAAQ,wCAAW;IAC1C,YAAY,SAAS,EAAE,SAAS;QAC/B,KAAK,CAAC,SAAS,EACd,EAAE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAC,EACtH,KAAK,EACL,SAAS,CAAC,CAAC;IACd,CAAC;IAES,mCAAmC,CAAC,aAAkC;;QAC/E,MAAM,SAAS,SAAG,wCAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,mCAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAClF,OAAO,IAAI,2CAAc,CAAC,wCAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,MAAM,iBAAiB,SAAG,wCAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,mCAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAChG,IAAI,iBAAiB,CACpB,wCAAO,EACP;IACC,iBAAiB,EAAE,iBAAiB;IAGpC,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB;CACrD,CAAC,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA,MAAM,cAAc;IACZ,KAAK,CAAC,GAAG;QAEf,OAAO,CAAC,GAAG,CAAC,qGAAqG,CAAC,CAAC;IACpH,CAAC;CACD;AAED,IAAI,cAAc,EAAE,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file From 477ec810dd87ab01528be9686e7926b67b9b560b Mon Sep 17 00:00:00 2001 From: Briana Eng Date: Fri, 2 Feb 2024 10:47:33 -0800 Subject: [PATCH 5/5] update name --- lib/main.js | 2 +- lib/main.js.map | 2 +- src/main.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index 5282a32..296a150 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,7 +1,7 @@ "use strict"; class DeprecatedTask { async run() { - console.log(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); + console.log(`As of January 2024, the RichCodeNavIndexer task is being deprecated. Please remove this task from your CI.`); } } new DeprecatedTask().run(); diff --git a/lib/main.js.map b/lib/main.js.map index 7c96b3f..90fccfa 100644 --- a/lib/main.js.map +++ b/lib/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA,MAAM,cAAc;IACZ,KAAK,CAAC,GAAG;QAEf,OAAO,CAAC,GAAG,CAAC,qGAAqG,CAAC,CAAC;IACpH,CAAC;CACD;AAED,IAAI,cAAc,EAAE,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA,MAAM,cAAc;IACZ,KAAK,CAAC,GAAG;QAEf,OAAO,CAAC,GAAG,CAAC,4GAA4G,CAAC,CAAC;IAC3H,CAAC;CACD;AAED,IAAI,cAAc,EAAE,CAAC,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index c87c959..a87f6b3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ class DeprecatedTask { public async run() { // Code Index deprecated, returning error on build. - console.log(`As of January 2024, the RichCodeNav task is being deprecated. Please remove this task from your CI.`); + console.log(`As of January 2024, the RichCodeNavIndexer task is being deprecated. Please remove this task from your CI.`); } }