[bug#76809,Cuirass,2/3] forgejo: Support for Agit workflow.
Commit Message
This commit adds support for the Agit workflow (see
https://forgejo.org/docs/latest/user/agit-support/).
In this case the provided "ref" is not an existing branch and the channel
can't be fetched.
* src/cuirass/forges/forgejo.scm (forgejo-pull-request->specification): Build
channel from commit instead of branch.
* tests/forgejo.scm: Update test.
---
src/cuirass/forges/forgejo.scm | 3 ++-
tests/forgejo.scm | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
@@ -94,6 +94,7 @@
(forgejo-repository-reference-repository
(forgejo-pull-request-base pull-request))))
(source-branch (forgejo-repository-reference-ref source-repo-reference))
+ (source-commit (forgejo-repository-reference-sha source-repo-reference))
(source-url (forgejo-repository-url
(forgejo-repository-reference-repository source-repo-reference)))
(id (forgejo-pull-request-number pull-request))
@@ -129,7 +130,7 @@
(cons* (channel
(name project-name)
(url source-url)
- (branch source-branch))
+ (commit source-commit))
%default-channels))
(priority priority)
(period period)
@@ -76,7 +76,7 @@
(cons* (channel
(name 'project-name)
(url "https://forgejo.instance.test/source-repo/fork-name.git")
- (branch "test-branch"))
+ (commit "582af40e8a059fa05c7048a7ac4f2eccbbd0183b"))
%default-channels))
(priority %default-jobset-options-priority)
(period %default-jobset-options-period)