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

Always getting Error: Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true} #81

Open
irverysmart opened this issue May 6, 2021 · 3 comments

Comments

@irverysmart
Copy link

irverysmart commented May 6, 2021

Trying to use a private repo with the github action using the following .yml:

on: ["push", "pull_request"]

name: Test Coveralls

jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v1

    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x

    - name: npm install, npm test -- --coverage
      run: |
        npm install
        npm test -- --coverage

    - name: Coveralls
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

this is the exact same .yml provided on https://github.com/coverallsapp/github-action as the "standard example" with make test-coverage swapped for npm test -- --coverage (to generate lcov.info).

I've logged into the website and turned the repository "on" and I see the repository in the "my repos" tab, but still the action always fails with the following:

Screen Shot 2021-05-06 at 3 12 39 AM

I'm kind of stumped, are there some better docs to take a look at or any working examples?

@lc-soft
Copy link

lc-soft commented May 9, 2021

Same issue.

@afinetooth
Copy link
Member

hi @irverysmart and @lc-soft. for future reference, the more active resource for coveralls user support is here:
https://github.com/lemurheavy/coveralls-public/issues

that error usually indicates a missing or incorrect repo token for your project.

that's usually avoided with our github action, because we're using the github_token secret, so this indicates some other key data is missing from the JSON you're POSTing to the coveralls API.

to look further into this for you i'll need your coveralls project URLs.

since they are private, you can email the info to support@coveralls.io and reference this issue.

in the meantime, try setting this debug env var so your build logs reveal the underlying JSON you're about to send:

NODE_COVERALLS_DEBUG: 1

in your workflow file, like:

    - name: Coveralls
      uses: coverallsapp/github-action@master
      env:
        NODE_COVERALLS_DEBUG: 1
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

@lamweili
Copy link

lamweili commented Aug 2, 2022

  1. You need to ensure the github-token is present.
  2. You need to ensure that you are running this GH action on your default branch. If you are running on other branches, this error will also happen.
    • You can either change your default branch (I did this and it worked), or
    • explicitly configure which branch to run via

PS: I have no idea if point 2 is an bug/issue or is it an intended behavior but it fixed my issue. Maybe add it to the README.md?

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

4 participants