mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-31 18:04:41 -04:00
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:
parent
1343ba5ec0
commit
15b6dd63ec
11 changed files with 91 additions and 65 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue