Comment api endpoint broken
See original GitHub issueHi there! Great little action, I have used it in a few of our projects to automatically generate some comments on new PRs. It works great in one repo, but in another, the api request seems to fail with a duplicate /
in the url:
method: 'GET',
url: 'https://api.github.com/repos/***/docs.***/issues//comments',
headers: {
accept: 'application/vnd.github.-preview+json',
'user-agent': 'actions/github-script octokit-core.js/2.5.3 Node.js/12.13.1 (Linux 5.3; x64)',
authorization: 'token [REDACTED]'
},
request: { agent: [Agent], hook: [Function: bound bound register] }
Notice how it’s url: 'https://api.github.com/repos/***/docs.***/issues//comments',
vs .../issues/comments
. You can see the broken code here and the same, working code (slightly different syntax) here
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
API Security 101: Broken Function Level Authorization
Broken object-level authorization happens when access control is not properly implemented on these endpoints, and attackers can view or operate ...
Read more >Correct endpoint? Broken features? : r/pushshift - Reddit
Hello, I am relatively new to APIs in general and when researching how to use this one I noticed few things that seem...
Read more >What is the best way to design calls of post and comments in a ...
I have an endpoint named Posts and an endpoint named Comments that is called to retrieve comments of a post. currently I can...
Read more >Common API mistakes and how to avoid them - LogRocket Blog
One of the worst things we can do to an API is to release a backwards-breaking change. As a rule of thumb, adding...
Read more >Fix: The WordPress REST API - Meow Apps
The REST API is enabled, but it breaks (broken reply) ... It means that either an error has happened on the server side,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jclem ah, perfect, that was the issue. Didn’t realize that conflicts affected things in such a way, good to know! I appreciate your help!
Hey @aulneau in this case, I believe that is due to the merge conflict on https://github.com/blockstack/docs.blockstack/pull/655. When there’s a merge conflict on a PR, there’s not merge commit, which is the SHA that Actions uses to run the workflow from. If we just ran on the head of the PR branch itself, for example, the workflow wouldn’t represent the state of the PR if it were merged at that point.