mirror of
https://code.forgejo.org/actions/git-backporting
synced 2025-07-01 23:06:00 +02: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
|
@ -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