forgejo-contrib-forgejo-cli-issues-377.md
Watch20
Star402
Fork
You've already forked forgejo-cli
CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity
fj pr status fails on relative target_url#377Closed
opened 2026-03-17 18:44:24 +01:00 by JKamsker · 2 comments
JKamsker commented 2026-03-17 18:44:24 +01:00
Copy link
GPT-5.2 high did help aggregate and formulate this bug report.
The bug itself did appear out in the wild to me
Running fj pr status 9 fails while fetching combined commit statuses. The Forgejo API response contains target_url values like /<censored>/<censored>-backend/actions/runs/.../jobs/... (path-relative), which the CLI appears to deserialize as a URL type that requires an absolute base.
fj pr status 9c3deec38106f254b69407bdd76ceec6d6da09f18fj pr status 9 prints mergeability + CI status.
Error: the response from forgejo was not properly structured
Caused by:
invalid value: string "/<censored>/<censored>-backend/actions/runs/252/jobs/13", expected relative URL without a base at line 1 column 189
Location:
...\\forgejo-cli-0.4.0\\src\\prs.rs:761:35
Endpoint: https://forge.<censored>.com/api/v1/repos/<censored>/<censored>-backend/commits/c3deec38106f254b69407bdd76ceec6d6da09f18/status
Example status item from response (shows relative target_url):
{
"id": 20,
"status": "success",
"target_url": "/<censored>/<censored>-backend/actions/runs/252/jobs/13",
"description": "Has been skipped",
"url": "https://forge.<censored>.com/api/v1/repos/<censored>/<censored>-backend/statuses/c3deec38106f254b69407bdd76ceec6d6da09f18",
"context": "Build and Test Contracts (refactored) / deploy_dev (pull_request)",
"created_at": "2026-03-17T14:43:15Z",
"updated_at": "2026-03-17T14:43:15Z"
}
fj v0.4.0
user agent: forgejo-cli/0.4.0 (https://codeberg.org/forgejo-contrib/forgejo-cli/)
build type: crates.io
target: x86_64-pc-windows-msvc
git version 2.51.0.windows.2
PowerShell 7.5.4
Caption : Microsoft Windows 11 Pro
Version : 10.0.26200
BuildNumber : 26200
origin ssh://forgejo@forge.<censored>.com/<censored>/<censored>-backend.git (fetch)
origin ssh://forgejo@forge.<censored>.com/<censored>/<censored>-backend.git (push)
fj pr status 9 fails while fetching combined commit statuses. The Forgejo API response contains target_url values like /\<censored\>/\<censored\>-backend/actions/runs/.../jobs/... (path-relative), which the CLI appears to deserialize as a URL type that requires an absolute base. ## Steps to reproduce 1. In a clone of <censored>/<censored>-backend with an origin remote pointing at Forgejo, run: fj pr status 9 2. PR: #9; latest commit: c3deec38106f254b69407bdd76ceec6d6da09f18 ## Expected result fj pr status 9 prints mergeability + CI status. ## Actual result Error: the response from forgejo was not properly structured Caused by: invalid value: string "/\<censored\>/\<censored\>-backend/actions/runs/252/jobs/13", expected relative URL without a base at line 1 column 189 Location: ...\\forgejo-cli-0.4.0\\src\\prs.rs:761:35 ## Relevant API response Endpoint: https://forge.\<censored\>.com/api/v1/repos/\<censored\>/\<censored\>-backend/commits/c3deec38106f254b69407bdd76ceec6d6da09f18/status Example status item from response (shows relative target_url): json { "id": 20, "status": "success", "target_url": "/\<censored\>/\<censored\>-backend/actions/runs/252/jobs/13", "description": "Has been skipped", "url": "https://forge.\<censored\>.com/api/v1/repos/\<censored\>/\<censored\>-backend/statuses/c3deec38106f254b69407bdd76ceec6d6da09f18", "context": "Build and Test Contracts (refactored) / deploy_dev (pull_request)", "created_at": "2026-03-17T14:43:15Z", "updated_at": "2026-03-17T14:43:15Z" } ## Environment fj v0.4.0 user agent: forgejo-cli/0.4.0 (https://codeberg.org/forgejo-contrib/forgejo-cli/) build type: crates.io target: x86_64-pc-windows-msvc git version 2.51.0.windows.2 PowerShell 7.5.4 Caption : Microsoft Windows 11 Pro Version : 10.0.26200 BuildNumber : 26200 ## Repo remote origin ssh://forgejo@forge.\<censored\>.com/\<censored\>/\<censored\>-backend.git (fetch) origin ssh://forgejo@forge.\<censored\>.com/\<censored\>/\<censored\>-backend.git (push)[forgejo-commit-status-c3deec38106f254b69407bdd76ceec6d6da09f18.json](https://codeberg.org/attachments/0792301f-270f-4616-b709-7dc83f576ccd "Click to see "forgejo-commit-status-c3deec38106f254b69407bdd76ceec6d6da09f18.json" in a new tab")
13 KiB
LordMZTE commented 2026-03-17 20:45:52 +01:00
Collaborator
Copy link
Please do not submit AI generated issues. Closing.
Please do not submit AI generated issues. Closing.
LordMZTE closed this issue 2026-03-17 20:45:52 +01:00
JKamsker commented 2026-03-17 20:50:31 +01:00
Author
Copy link
that makes it less real?
that makes it less real?
Cyborus locked and limited conversation to collaborators 2026-03-17 22:33:44 +01:00
This discussion has been locked. Commenting is limited to contributors.
No Branch/Tag specified
main
renovate/lock-file-maintenance
renovate/serde-saphyr-0.x
docs/contributing
no-port-in-refspec
login/v16.next.forgejo.org
crates-io-publish
0.5.x
compile-time-fluent
0.4.x
localization-alias-demo
api_url_field
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.0
v0.1.1
v0.1.0
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels[ Kind/Breaking Breaking change that won't be backward compatible
](#)[ Kind/Bug Something is not working
](#)[ Kind/Design Discussion about UI/UX design
](#)[ Kind/Documentation Documentation changes
](#)[ Kind/Enhancement Improve existing functionality
](#)[ Kind/Feature New functionality
](#)[ Kind/Security This is security issue
](#)[ Kind/Testing Issue or pull request related to testing
](#)[ Kind/Upstream This is an issue with upstream software (Forgejo) that is probably not our fault
](#)
[ Priority
Critical The priority is critical
](#)[ Priority
High The priority is high
](#)[ Priority
Low The priority is low
](#)[ Priority
Medium The priority is medium
](#)
[ Reviewed
Confirmed Issue has been confirmed
](#)[ Reviewed
Duplicate This issue or pull request already exists
](#)[ Reviewed
Invalid Invalid issue
](#)[ Reviewed
Won't Fix This issue won't be fixed
](#)
[ Status
Abandoned Somebody has started to work on this but abandoned work
](#)[ Status
Blocked Something is blocking this issue or pull request
](#)[ Status
Need More Info Feedback is required to reproduce issue or to continue work
](#)
[ Suspicious
](#)
No labels Kind/Breaking Kind/Bug Kind/Design Kind/Documentation Kind/Enhancement Kind/Feature Kind/Security Kind/Testing Kind/Upstream [ Priority
Critical ](/forgejo-contrib/forgejo-cli/issues?labels=173012) [ Priority
High ](/forgejo-contrib/forgejo-cli/issues?labels=173013) [ Priority
Low ](/forgejo-contrib/forgejo-cli/issues?labels=173015) [ Priority
Medium ](/forgejo-contrib/forgejo-cli/issues?labels=173014) [ Reviewed
Confirmed ](/forgejo-contrib/forgejo-cli/issues?labels=173007) [ Reviewed
Duplicate ](/forgejo-contrib/forgejo-cli/issues?labels=173005) [ Reviewed
Invalid ](/forgejo-contrib/forgejo-cli/issues?labels=173006) [ Reviewed
Won't Fix ](/forgejo-contrib/forgejo-cli/issues?labels=173008) [ Status
Abandoned ](/forgejo-contrib/forgejo-cli/issues?labels=173011) [ Status
Blocked ](/forgejo-contrib/forgejo-cli/issues?labels=173010) [ Status
Need More Info ](/forgejo-contrib/forgejo-cli/issues?labels=173009) Suspicious
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
Notifications Subscribe
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
forgejo-contrib/forgejo-cli#377
WritePreview
Loading…
Add table
| Rows | | | Columns | |
CancelOK
Add a link
Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.
CancelOK
CancelSave
Reference in a new issue
Repository
forgejo-contrib/forgejo-cli
Title
Body
Create issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
No Yes