Skip to content

Commit

Permalink
Add comments and re-generate report
Browse files Browse the repository at this point in the history
Signed-off-by: Min Kim <minkimcello@gmail.com>
  • Loading branch information
minkimcello committed Oct 31, 2024
1 parent 51a94d2 commit 67c86c4
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 18 deletions.
2 changes: 1 addition & 1 deletion workspaces/github-discussions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"tsc:full": "tsc --skipLibCheck false --incremental false",
"build:all": "backstage-cli repo build --all",
"build:api-reports": "yarn build:api-reports:only --tsc",
"build:api-reports:only": "backstage-repo-tools api-reports -o ae-wrong-input-file-type --validate-release-tags",
"build:api-reports:only": "backstage-repo-tools api-reports -o --allow-all-warnings ae-wrong-input-file-type --validate-release-tags",
"clean": "backstage-cli repo clean",
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ import { LoggerService } from '@backstage/backend-plugin-api';
import { Readable } from 'stream';
import { ScmIntegrationsGroup } from '@backstage/integration';

// Warning: (ae-missing-release-tag) "GithubDiscussionsCollatorFactory" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export class GithubDiscussionsCollatorFactory
implements DocumentCollatorFactory
{
// (undocumented)
execute(): AsyncGenerator<GithubDiscussionsDocument>;
// Warning: (ae-forgotten-export) The symbol "GithubDiscussionsCollatorFactoryConstructorOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static fromConfig({
logger,
Expand All @@ -43,18 +39,46 @@ export class GithubDiscussionsCollatorFactory
readonly type: string;
}

// Warning: (ae-missing-release-tag) "searchModuleGithubDiscussions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export interface GithubDiscussionsCollatorFactoryConstructorOptions {
// (undocumented)
cacheBase?: string;
// (undocumented)
clearCacheOnSuccess?: boolean;
// (undocumented)
commentsBatchSize?: number;
// (undocumented)
credentialsProvider: DefaultGithubCredentialsProvider;
// (undocumented)
discussionsBatchSize?: number;
// (undocumented)
githubIntegration: ScmIntegrationsGroup<GithubIntegration>;
logger: LoggerService;
// (undocumented)
repliesBatchSize?: number;
// (undocumented)
timeout: number;
// (undocumented)
url: string;
}

// @public
const searchModuleGithubDiscussions: BackendFeature;
export default searchModuleGithubDiscussions;

// Warnings were encountered during analysis:
//
// src/collators/GithubDiscussionsCollatorFactory.d.ts:31:1 - (ae-undocumented) Missing documentation for "GithubDiscussionsCollatorFactory".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:35:5 - (ae-undocumented) Missing documentation for "type".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:44:5 - (ae-undocumented) Missing documentation for "fromConfig".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:45:5 - (ae-undocumented) Missing documentation for "getCollator".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:46:5 - (ae-undocumented) Missing documentation for "execute".
// src/module.d.ts:1:22 - (ae-undocumented) Missing documentation for "searchModuleGithubDiscussions".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:17:5 - (ae-undocumented) Missing documentation for "credentialsProvider".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:18:5 - (ae-undocumented) Missing documentation for "githubIntegration".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:19:5 - (ae-undocumented) Missing documentation for "timeout".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:20:5 - (ae-undocumented) Missing documentation for "url".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:21:5 - (ae-undocumented) Missing documentation for "cacheBase".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:22:5 - (ae-undocumented) Missing documentation for "clearCacheOnSuccess".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:23:5 - (ae-undocumented) Missing documentation for "discussionsBatchSize".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:24:5 - (ae-undocumented) Missing documentation for "commentsBatchSize".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:25:5 - (ae-undocumented) Missing documentation for "repliesBatchSize".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:47:5 - (ae-undocumented) Missing documentation for "type".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:56:5 - (ae-undocumented) Missing documentation for "fromConfig".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:57:5 - (ae-undocumented) Missing documentation for "getCollator".
// src/collators/GithubDiscussionsCollatorFactory.d.ts:58:5 - (ae-undocumented) Missing documentation for "execute".
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ import {
import assert from 'assert-ts';
import gh from 'parse-github-url';

interface GithubDiscussionsCollatorFactoryConstructorOptions {
/**
* Options for {@link GithubDiscussionsCollatorFactory}
*
* @public
*/
export interface GithubDiscussionsCollatorFactoryConstructorOptions {
logger: LoggerService;
credentialsProvider: DefaultGithubCredentialsProvider;
githubIntegration: ScmIntegrationsGroup<GithubIntegration>;
Expand All @@ -65,6 +70,10 @@ export interface GithubDiscussionsCollatorFactoryOptions {
repliesBatchSize?: number;
}

/**
* Search collator responsible for fetching GitHub discussions to index.
* @public
*/
export class GithubDiscussionsCollatorFactory
implements DocumentCollatorFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { GithubDiscussionsCollatorFactory } from './GithubDiscussionsCollatorFactory';
export {
GithubDiscussionsCollatorFactory,
type GithubDiscussionsCollatorFactoryConstructorOptions,
} from './GithubDiscussionsCollatorFactory';
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
*
* @packageDocumentation
*/
export { GithubDiscussionsCollatorFactory } from './collators';
export {
GithubDiscussionsCollatorFactory,
type GithubDiscussionsCollatorFactoryConstructorOptions,
} from './collators';
export { searchModuleGithubDiscussions as default } from './module';
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const defaultSchedule = {
initialDelay: { seconds: 10 },
};

/**
* Search backend module for GitHub discussions index.
* @public
*/
export const searchModuleGithubDiscussions = createBackendModule({
pluginId: 'search',
moduleId: 'github-discussions-collator',
Expand Down

0 comments on commit 67c86c4

Please sign in to comment.