doc: add documentation for getOctokitOptions
Signed-off-by: RedlineTriad <39059512+RedlineTriad@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
||||
import { GithubCredentialsProvider } from '@backstage/integration';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { Octokit } from 'octokit';
|
||||
import { OctokitOptions } from '@octokit/core/dist-types/types';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
|
||||
@@ -392,6 +393,14 @@ export const createPublishGithubPullRequestAction: (
|
||||
JsonObject
|
||||
>;
|
||||
|
||||
// @public
|
||||
export function getOctokitOptions(options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
credentialsProvider?: GithubCredentialsProvider;
|
||||
token?: string;
|
||||
repoUrl: string;
|
||||
}): Promise<OctokitOptions>;
|
||||
|
||||
// @public
|
||||
const githubModule: () => BackendFeature;
|
||||
export default githubModule;
|
||||
|
||||
@@ -39,6 +39,11 @@ import {
|
||||
|
||||
const DEFAULT_TIMEOUT_MS = 60_000;
|
||||
|
||||
/**
|
||||
* Helper for generating octokit configuration options for given repoUrl.
|
||||
* If no token is provided, it will attempt to get a token from the credentials provider.
|
||||
* @public
|
||||
*/
|
||||
export async function getOctokitOptions(options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
credentialsProvider?: GithubCredentialsProvider;
|
||||
|
||||
Reference in New Issue
Block a user