-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedhacktoberfestIssues for participation in HacktoberfestIssues for participation in Hacktoberfestreleased
Description
What happened?
> const { endpoint } = require("@octokit/endpoint");
> endpoint("http://api.github.com/repos/octocat/Hello-World/branches{/branch}", {})
{
method: 'GET',
url: 'http://api.github.com/repos/octocat/Hello-World/branches/',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-endpoint.js/7.0.4 Node.js/19.4.0 (linux; x64)'
}
}
Note the slash at the end of url. GitHub returns 404 for .../branches/, but lists branches for .../branches.
Expanding the same URL with url-template and empty context returns .../branches. This makes me belive that endpoint.js performs template expansion incorrectly.
Versions
Octokit.js v7.0.4, Node v19.4.0
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedhacktoberfestIssues for participation in HacktoberfestIssues for participation in Hacktoberfestreleased
Type
Projects
Status
✅ Done