#2467 api reports incorrect fullname for forks?
Closed: Fixed 6 years ago Opened 6 years ago by mikem.

api calls that report a fullname field for projects seem to get it wrong for forks. E.g.

$ curl -s https://pagure.io/api/0/fork/mikem/koji | jq .fullname
"forks/mikem/koji"

Shouldn't that be fork/mikem/koji? That is what appears in all the urls.


No there is a discrepancy there, forks are stored in a forks folder while the URL is about a single fork so uses fork.

That's a little detail of the backend showing up in there. It's not really pretty sorry about that :(

Would it be reasonable to add another field to report the name that is used in urls? Constructing it from the data reported seems a little awkward.

No biggie if not, I just wrote a function to do it, but I could see this catching other api users

Maybe we should have the actual URL built in there

Metadata Update from @pingou:
- Issue tagged with: RFE

6 years ago

From an api usage perspective, the name fragment might be more useful than the full url. That is, the [fork/<user>/][<namespace>/]<repo> value. Otherwise every api client needs to write their own function to put this together

This gets an easyfix then. What would be a good name for the field? url_path?

Metadata Update from @pingou:
- Issue tagged with: easyfix

6 years ago

Metadata Update from @pingou:
- Issue assigned to pingou

6 years ago

Login to comment on this ticket.

Metadata