Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 4 additions & 37 deletions lib/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 5 additions & 25 deletions src/main.ts
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
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 {

@mohaimenhasanMohaimen Khan (mohaimenhasan)Feb 2, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we add JS deprecated tags -
/**

public async run() {
// Code Index deprecated, returning error on build.
console.log(`As of January 2024, the RichCodeNavIndexer 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();