-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Can't use PullRequest PipelineResource to update status #1777
Comments
/kind bug |
I'm fairly sure this was caused by GitHub returning 404 in cases where the auth token isn't valid. For example: API request with no auth:
API request with auth:
Unfortunately I'm not sure there's much we can do here, since we're just returning the error we got back from GitHub. Can you sanity check that the token is valid? Keep in mind that if |
Thanks @wlynch !! That helps a lot - I was able to use Anyway so now with the below PipelineResource instead of the one above, I was finally able to update the status on my PR!!!! 🎉 apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: repro-pr-pr
namespace: default
spec:
params:
- name: url
value: https://github.com/bobcatfish/tekton-lab/pull/4
secrets:
- fieldName: authToken
secretKey: token
secretName: webhook-secret
type: pullRequest So there was no bug after all and the PullRequest resource DOES work in 0.9.2 🎉🎉🎉 phew!!! I'm gonna close this and open another issue about how we can improve the debugging experience (like you said it's hard when it's GitHub giving us the 404!) |
Expected Behavior
I should be able to use the PullRequest resource to update the status on a PR.
Actual Behavior
When I try to update my "poop" status, it fails and I get this in the logs from
pullrequest-init/main.go:72
:Steps to Reproduce the Problem
I was using this Task:
With this Pipeline:
I created runs with:
I created these PipelineResources:
(webhook-secret has the expected secretKey and fieldName; I don't think this is relevant b/c the error didn't seem to have anything do with permissions, and was able to be used to fetch info at least)
(bobcatfish/tekton-lab#4)
Additional Info
Before we genearlized the pullrequest resource (i think to support gitlab?) I was able to successfull use this version of the resource: https://github.com/bobcatfish/catservice/blob/master/tekton/set-status.yaml
I was surprised to see that the format of the status file changed completely so I might still be missing a similar detail? I was only able to figure out the previous syntax didn't work after looking at the examples in https://github.com/tektoncd/pipeline/tree/master/cmd/pullrequest-init/example/status
The text was updated successfully, but these errors were encountered: