Camelcase GitHub and GitLab (#2034)
* Camelcase GitHub and GitLab * GitLab * Code GitLab * GitHub in code * Fix auth naming * Update docs/features/software-templates/adding-templates.md Co-authored-by: Raghunandan Balachandran <soapraj@gmail.com> * Update docs/features/software-templates/extending/create-your-own-preparer.md Co-authored-by: Raghunandan Balachandran <soapraj@gmail.com> Co-authored-by: Raghunandan Balachandran <soapraj@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ export class GithubAuthProvider implements OAuthProviderHandlers {
|
||||
idToken: params.id_token,
|
||||
};
|
||||
|
||||
// Github provides an id numeric value (123)
|
||||
// GitHub provides an id numeric value (123)
|
||||
// as a fallback
|
||||
const id = passportProfile!.id;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('GitlabApiReaderProcessor', () => {
|
||||
'https://gitlab.com/groupA/teams/teamA/repoA/-/blob/branch/my/path/',
|
||||
url: null,
|
||||
err:
|
||||
'Incorrect url: https://gitlab.com/groupA/teams/teamA/repoA/-/blob/branch/my/path/, Error: Gitlab url does not end in .ya?ml',
|
||||
'Incorrect url: https://gitlab.com/groupA/teams/teamA/repoA/-/blob/branch/my/path/, Error: GitLab url does not end in .ya?ml',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export class GitlabApiReaderProcessor implements LocationProcessor {
|
||||
const branchAndfilePath = url.pathname.split('/-/blob/')[1];
|
||||
|
||||
if (!branchAndfilePath.match(/\.ya?ml$/)) {
|
||||
throw new Error('Gitlab url does not end in .ya?ml');
|
||||
throw new Error('GitLab url does not end in .ya?ml');
|
||||
}
|
||||
|
||||
const [branch, ...filePath] = branchAndfilePath.split('/');
|
||||
@@ -127,7 +127,7 @@ export class GitlabApiReaderProcessor implements LocationProcessor {
|
||||
|
||||
return projectID;
|
||||
} catch (e) {
|
||||
throw new Error(`Could not get Gitlab ProjectID for: ${target}, ${e}`);
|
||||
throw new Error(`Could not get GitLab ProjectID for: ${target}, ${e}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export class GitlabReaderProcessor implements LocationProcessor {
|
||||
blobKeyword !== 'blob' ||
|
||||
!restOfPath.join('/').match(/\.yaml$/)
|
||||
) {
|
||||
throw new Error('Wrong Gitlab URL');
|
||||
throw new Error('Wrong GitLab URL');
|
||||
}
|
||||
|
||||
// Replace 'blob' with 'raw'
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
|
||||
export const githubActionsApiRef = createApiRef<GithubActionsApi>({
|
||||
id: 'plugin.githubactions.service',
|
||||
description: 'Used by the Github Actions plugin to make requests',
|
||||
description: 'Used by the GitHub Actions plugin to make requests',
|
||||
});
|
||||
|
||||
export type GithubActionsApi = {
|
||||
|
||||
@@ -33,7 +33,7 @@ export type GithubEndpointConfig = {
|
||||
id: string;
|
||||
title: string;
|
||||
/**
|
||||
* Github GraphQL API url, defaults to https://api.github.com/graphql
|
||||
* GitHub GraphQL API url, defaults to https://api.github.com/graphql
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ const {
|
||||
mockRemote: jest.Mocked<NodeGit.Remote>;
|
||||
};
|
||||
|
||||
describe('Github Publisher', () => {
|
||||
describe('GitHub Publisher', () => {
|
||||
const publisher = new GithubPublisher({ client: new Octokit() });
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user