refactor: transfer to kiegroup organization (#46)

* refactor: moved to @kiegroup organization

Starting from v4 the package/project has been moved under @kiegroup
organization.

* chore: release v4.0.0

* refactor: bper renamed to git-backporting
This commit is contained in:
Andrea Lamparelli 2023-07-06 14:19:04 +02:00 committed by GitHub
parent 1343ba5ec0
commit 15b6dd63ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 91 additions and 65 deletions

View file

@ -32,7 +32,7 @@ export default class GitCLIService {
/**
* Update the provided remote URL by adding the auth token if not empty
* @param remoteURL remote link, e.g., https://github.com/lampajr/backporting-example.git
* @param remoteURL remote link, e.g., https://github.com/kiegroup/git-backporting-example.git
*/
private remoteWithAuth(remoteURL: string): string {
if (this.auth && this.gitData.user) {

View file

@ -15,7 +15,7 @@ export default class OctokitFactory {
OctokitFactory.logger.info("Creating octokit instance.");
OctokitFactory.octokit = new Octokit({
auth: token,
userAgent: "lampajr/backporting",
userAgent: "kiegroup/git-backporting",
baseUrl: apiUrl
});
}

View file

@ -21,7 +21,7 @@ export default class GitLabClient implements GitClient {
baseURL: this.apiUrl,
headers: {
Authorization: token ? `Bearer ${token}` : "",
"User-Agent": "lampajr/backporting",
"User-Agent": "kiegroup/git-backporting",
},
httpsAgent: new https.Agent({
rejectUnauthorized
@ -40,7 +40,7 @@ export default class GitLabClient implements GitClient {
// READ
// example: <host>/api/v4/projects/alampare%2Fbackporting-example/merge_requests/1
// example: <host>/api/v4/projects/<namespace>%2Fbackporting-example/merge_requests/1
async getPullRequest(namespace: string, repo: string, mrNumber: number): Promise<GitPullRequest> {
const projectId = this.getProjectId(namespace, repo);
const { data } = await this.client.get(`/projects/${projectId}/merge_requests/${mrNumber}`);
@ -144,7 +144,7 @@ export default class GitLabClient implements GitClient {
/**
* Extract repository namespace, project and mr number from the merge request url
* example: <host>/alampare/backporting-example/-/merge_requests/1
* example: <host>/<namespace>/backporting-example/-/merge_requests/1
* note: "-/" could be omitted
* @param mrUrl merge request url
* @returns {{owner: string, project: string}}