github-status-resource
github-status-resource copied to clipboard
jq error
Using the example config I'm getting the following error:
jq: error (at <stdin>:4): Cannot iterate over null (null)
I also don't want to write my own resource. Could you please verify that error or tell me if I'm doing something wrong.
What operation is this occurring during: check, get, put? Are you sure your API token user has permissions for the repository you’re trying to edit?
Hi, @dpb587. Thank you for the answer. I'm trying to put status to my repo. API token is 100% right cause previously I was able to push status to that repo with a simple Go program. Basically I'm trying to do this:
plan:
- get: builder
params: {submodules: none}
trigger: true
- put: "repo-status"
params:
state: "pending"
commit: "builder"
I don't think I have seen this error before and, unfortunately, it's not easy to debug right now. Quickly reviewing some of the code, I think this could, theoretically, occur if builder
is working off a different branch than repo-status
was. You might want to make sure repo-status
is configured with the branch
option if you're using something other than master
for builder
.
For what it's worth, the original issue might be fixed by any of:
- https://github.com/dpb587/github-status-resource/pull/14
- https://github.com/dpb587/github-status-resource/pull/15
I am getting this in check
resource_types:
- name: github-status
type: "docker-image"
source:
repository: "dpb587/github-status-resource"
tag: v2.1.0
- name: github_status
type: github-status
source:
branch: master
repository: [email protected]:<repo name>.git
access_token: ((github-access-token))
jobs:
- name: Build Master
plan:
- do:
...
on_failure:
put: github_status
params: { state: failure, commit: git_master }
resource script '/opt/resource/check []' failed: exit status 5
stderr:
jq: error (at <stdin>:4): Cannot iterate over null (null)
I was also getting this error upon moving a git repo from organisation to organisation and I had forgotten to apply the changes on the resource's config.
Having the same issue. The status gets set correctly but it still throws that error.
out of curiosity, is this repo even maintained?