Always getting Error: Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}
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:
I'm kind of stumped, are there some better docs to take a look at or any working examples?
Same issue.
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 [email protected] 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 }}
- You need to ensure the
github-tokenis present. - You need to ensure that you are running this GH action on your
defaultbranch. If you are running on other branches, this error will also happen.- You can either change your
defaultbranch (I did this and it worked), or - explicitly configure which branch to run via
- the
COVERALLS_GIT_BRANCHenvironment variable, or - the
git-branchinput.
- the
- You can either change your
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?