1
0
Fork 0
mirror of https://code.forgejo.org/actions/git-backporting synced 2025-03-14 22:27:02 +01:00
Commit graph

12 commits

Author SHA1 Message Date
Ratchanan Srirattanamet
b4d0481c56
fix: auto-no-squash inference for GitLab (#140)
When a GitLab MR is not squashed, `squash_commit_sha` will be `null`,
not `undefined`. Update `inferSquash()` to account for this.
2024-10-07 14:40:31 +02:00
Andrea Lamparelli
cb3473d7c9
fix(gh130): apply commits in the correct order on github (#131) 2024-07-16 17:49:23 +02:00
Earl Warren
6042bcc40b
feat: auto-detect the value of the no-squash option (#118)
The auto-no-squash option is added to:

* backport all the commits when the pull/merge request has been merged
* backport the squashed commit otherwise

It is equivalent to dynamically adjust the value of the no-squash
option, depending on the context.

The no-squash option is kept for backward compatibility for a single
use case: backporting the merged commit instead of backporting the
commits of the pull/merge request request.

Detecting if a pull/merge request was squashed or not depends on the
underlying forge:

* Forgejo / GitHub: use the API to count the number of parents
* GitLab: if the squash_commit_sha is set, the merge request was
  squashed

If the pull/merge request is open, always backport all the commits it
contains.

Fixes: https://github.com/kiegroup/git-backporting/issues/113

Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
2024-04-08 18:51:13 +02:00
Ratchanan Srirattanamet
300fa91a8a
fix: --no-squash on single-commit GitLab MR (#93)
Due to off-by-one error in GitLabMapper, --no-squash was not effective
on an MR containing single commit. Fix by using the same condition as
GitHubMapper.
2024-02-20 14:24:08 +01:00
Shyim
ed32d2275b
fix: namespace parsing in gitlab (#84)
* fix: namespace parsing in gitlab

* test: add test for nested namespace

---------

Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
2023-12-05 16:08:49 +01:00
Andrea Lamparelli
5fc72e127b
feat(issue-77): handle multiple target branches (#78)
fix: https://github.com/kiegroup/git-backporting/issues/77

This enhancement allow users to backport the same change to multiple
branches with one single tool invocation
2023-08-03 21:57:11 +02:00
Andrea Lamparelli
bed7e29ddc feat(issue-70): additional pr comments 2023-07-27 12:36:42 +02:00
Andrea Lamparelli
a8db0755a8
refactor: updated logging messages (#65) 2023-07-20 10:05:07 +02:00
Shubh Bapna
49a7350406
perf: use concurrent promises instead of awaiting them one by one (#59) 2023-07-11 22:15:52 +02:00
Andrea Lamparelli
c4dbb26c1d
feat(issue-54): backport pr commits without squash (#55)
* feat(issue-54): backport pr commits without squash

fix https://github.com/kiegroup/git-backporting/issues/54

* feat(issue-54): fixed readme
2023-07-11 11:22:01 +02:00
Andrea Lamparelli
a737aa7c4c
fix(issue-52): use pull request github api url as source (#53)
fix https://github.com/kiegroup/git-backporting/issues/52
2023-07-10 15:18:51 +02:00
Andrea Lamparelli
107f5e52d6
feat: integrate tool with gitlab service (#39)
* feat: integrate tool with gitlab service

Fix https://github.com/lampajr/backporting/issues/30
2023-07-02 00:05:17 +02:00