github-pr-resource icon indicating copy to clipboard operation
github-pr-resource copied to clipboard

Field 'isDraft' doesn't exist on type 'PullRequest'

Open HemangLavana opened this issue 5 years ago • 5 comments

I am getting the following error message:


run check step: run check step: check: resource script '/opt/resource/check []' failed: exit status 1

stderr: 2020/10/22 14:07:27 check failed: failed to get last commits: Field 'isDraft' doesn't exist on type 'PullRequest'

Our GHE version is: GitHub Enterprise Server 2.20.16. These checks used to work perfectly well, so I believe this failure is due to GHE upgrade. The GHE server is maintained by our IT team so we don't have an option to rollback our GHE.

I suspect this issue is related to:

https://github.com/shurcooL/githubv4/issues/66

Is anyone else seeing this issue and any tips how to workaround this. Our pull-request pipelines are completely broken due to this.

HemangLavana avatar Oct 22 '20 14:10 HemangLavana

On further investigation, I found out that: (a) our GHE was not upgraded recently but few months back, (b) our pull requests were working until Oct 20th, and (c) there was a new release of this project (v0.22.0) on Oct 21st.

So I modified my pipeline to explicitly use v0.21.0 and my pipelines have started working again. This looks like a regression bug to me. Let me know if you need any additional details to help resolve this issue.

HemangLavana avatar Oct 22 '20 15:10 HemangLavana

It looks like to get this working in GHE, we'd need to implement something to re-write the requests to enable this preview functionality?

rickardl avatar Oct 22 '20 21:10 rickardl

yes, I guess you need to use http.RoundTripper (ex: https://lanre.wtf/blog/2017/07/24/roundtripper-go/). If you need any help in validating the fix, let me know.

HemangLavana avatar Oct 22 '20 23:10 HemangLavana