Compare commits

..

No commits in common. "main" and "v4.8.4" have entirely different histories.
main ... v4.8.4

9 changed files with 6731 additions and 6345 deletions

View file

@ -25,7 +25,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 18
- name: Git config - name: Git config
run: | run: |
git config user.name "${GITHUB_ACTOR}" git config user.name "${GITHUB_ACTOR}"

View file

@ -23,7 +23,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 18
- name: Git config - name: Git config
run: | run: |
git config user.name "${GITHUB_ACTOR}" git config user.name "${GITHUB_ACTOR}"

View file

@ -1,19 +1,5 @@
# Changelog # Changelog
## <small>4.8.6 (2025-09-04)</small>
* ci: bump node version to 20 for ci workflows (#161) ([c5ce1d4](https://github.com/kiegroup/git-backporting/commit/c5ce1d4)), closes [#161](https://github.com/kiegroup/git-backporting/issues/161)
* build: audit fix (#159) ([8f0df7b](https://github.com/kiegroup/git-backporting/commit/8f0df7b)), closes [#159](https://github.com/kiegroup/git-backporting/issues/159)
* build(deps): bump form-data from 4.0.0 to 4.0.4 (#158) ([83a65d8](https://github.com/kiegroup/git-backporting/commit/83a65d8)), closes [#158](https://github.com/kiegroup/git-backporting/issues/158)
* build(deps): bump tmp and @inquirer/editor (#160) ([8c412dc](https://github.com/kiegroup/git-backporting/commit/8c412dc)), closes [#160](https://github.com/kiegroup/git-backporting/issues/160)
* build(deps): bump undici, @release-it/conventional-changelog and release-it (#157) ([8625efa](https://github.com/kiegroup/git-backporting/commit/8625efa)), closes [#157](https://github.com/kiegroup/git-backporting/issues/157)
## <small>4.8.5 (2025-04-15)</small>
* build(deps): audit fix (#150) ([3a9d367](https://github.com/kiegroup/git-backporting/commit/3a9d367)), closes [#150](https://github.com/kiegroup/git-backporting/issues/150)
* build(deps): upgrade release-it to v18 (#153) ([c9a7375](https://github.com/kiegroup/git-backporting/commit/c9a7375)), closes [#153](https://github.com/kiegroup/git-backporting/issues/153)
* fix(#151): fix gitlab post comments url (#152) ([d74a787](https://github.com/kiegroup/git-backporting/commit/d74a787)), closes [#152](https://github.com/kiegroup/git-backporting/issues/152)
## [4.8.4](https://github.com/kiegroup/git-backporting/compare/v4.8.3...v4.8.4) (2024-11-02) ## [4.8.4](https://github.com/kiegroup/git-backporting/compare/v4.8.3...v4.8.4) (2024-11-02)
@ -217,4 +203,4 @@ Project moved under @kiegroup organization.
### Features ### Features
* backport still open pull requests ([b3936e0](https://github.com/kiegroup/git-backporting/commit/b3936e019a19976281c5e2582904264e974b8b42)) * backport still open pull requests ([b3936e0](https://github.com/kiegroup/git-backporting/commit/b3936e019a19976281c5e2582904264e974b8b42))
* pull request backporting ([b3936e0](https://github.com/kiegroup/git-backporting/commit/b3936e019a19976281c5e2582904264e974b8b42)) * pull request backporting ([b3936e0](https://github.com/kiegroup/git-backporting/commit/b3936e019a19976281c5e2582904264e974b8b42))

1748
dist/cli/index.js vendored

File diff suppressed because it is too large Load diff

1738
dist/gha/index.js vendored

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
[tools]
node = "20"

9556
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "@kie/git-backporting", "name": "@kie/git-backporting",
"version": "4.8.6", "version": "4.8.4",
"description": "Git backporting is a tool to execute automatic pull request git backporting.", "description": "Git backporting is a tool to execute automatic pull request git backporting.",
"author": "", "author": "",
"license": "MIT", "license": "MIT",
@ -55,7 +55,7 @@
"@gitbeaker/rest": "^39.1.0", "@gitbeaker/rest": "^39.1.0",
"@kie/mock-github": "^1.1.0", "@kie/mock-github": "^1.1.0",
"@octokit/webhooks-types": "^6.8.0", "@octokit/webhooks-types": "^6.8.0",
"@release-it/conventional-changelog": "^10.0.0", "@release-it/conventional-changelog": "^7.0.0",
"@types/fs-extra": "^9.0.13", "@types/fs-extra": "^9.0.13",
"@types/jest": "^29.2.4", "@types/jest": "^29.2.4",
"@types/node": "^18.11.17", "@types/node": "^18.11.17",
@ -66,7 +66,7 @@
"husky": "^8.0.2", "husky": "^8.0.2",
"jest": "^29.0.0", "jest": "^29.0.0",
"jest-sonar-reporter": "^2.0.0", "jest-sonar-reporter": "^2.0.0",
"release-it": "^19.0.2", "release-it": "^16.1.3",
"semver": "^7.3.8", "semver": "^7.3.8",
"ts-jest": "^29.0.0", "ts-jest": "^29.0.0",
"ts-node": "^10.8.1", "ts-node": "^10.8.1",

View file

@ -48,9 +48,7 @@ export default class GitLabClient implements GitClient {
// example: <host>/api/v4/projects/<namespace>%2Fbackporting-example/merge_requests/1 // example: <host>/api/v4/projects/<namespace>%2Fbackporting-example/merge_requests/1
async getPullRequest(namespace: string, repo: string, mrNumber: number, squash: boolean | undefined): Promise<GitPullRequest> { async getPullRequest(namespace: string, repo: string, mrNumber: number, squash: boolean | undefined): Promise<GitPullRequest> {
const projectId = this.getProjectId(namespace, repo); const projectId = this.getProjectId(namespace, repo);
const url = `/projects/${projectId}/merge_requests/${mrNumber}`; const { data } = await this.client.get(`/projects/${projectId}/merge_requests/${mrNumber}`);
this.logger.debug(`Fetching pull request ${url}`);
const { data } = await this.client.get(`${url}`);
if (squash === undefined) { if (squash === undefined) {
squash = inferSquash(data.state === "opened", data.squash_commit_sha); squash = inferSquash(data.state === "opened", data.squash_commit_sha);
@ -171,7 +169,7 @@ export default class GitLabClient implements GitClient {
const { namespace, project, id } = this.extractMergeRequestData(mrUrl); const { namespace, project, id } = this.extractMergeRequestData(mrUrl);
const projectId = this.getProjectId(namespace, project); const projectId = this.getProjectId(namespace, project);
const { data } = await this.client.post(`/projects/${projectId}/merge_requests/${id}/notes`, { const { data } = await this.client.post(`/projects/${projectId}/issues/${id}/notes`, {
body: comment, body: comment,
}); });