Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createComment 404 Error #77

Closed
RoyalSix opened this issue Aug 6, 2020 · 3 comments
Closed

createComment 404 Error #77

RoyalSix opened this issue Aug 6, 2020 · 3 comments

Comments

@RoyalSix
Copy link

RoyalSix commented Aug 6, 2020

Thank you 🙇‍♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

This is my yml file and it is resulting in the following error

    steps:
      - name: "test comment"
        uses: actions/[email protected]
        with:
          github-token: ${{secrets.ACTIONS_TOKEN}}
          script: |
            github.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: 'test'
            })

Error:

##[error]Unhandled error: HttpError: Not Found
...
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/xxxxx/xxxxxxx/issues//comments',

Seems like there is a url path issue. Note the double slash after issues.

@RoyalSix RoyalSix closed this as completed Aug 6, 2020
@RoyalSix
Copy link
Author

RoyalSix commented Aug 6, 2020

Looking at the source now I can see my issue_number field is returning blank

@Detective-Khalifah
Copy link

Looking at the source now I can see my issue_number field is returning blank

What's the fix/workaround to get by this?

@MikeSoft
Copy link

I found a solution for my error.

use:
on: pull_request: types: [ opened, reopened, edited ]

Instead of:
on: push:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants