question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comment api endpoint broken

See original GitHub issue

Hi 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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aulneaucommented, Jul 17, 2020

@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!

0reactions
jclemcommented, Jul 17, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found