DEV Community

Discussion on: Publish DEV articles from a Git repo, with Github + Pipedream

Collapse
 
mikeyglitz profile image
mikeyGlitz • Edited

I'm seeing the errors in my trigger code, but I see getFileContents() in my code and default_branch is in the response I get back from GitHub. What's wrong with the pipeline configuration?

Errors From Event

Collapse
 
dylburger profile image
Dylan J. Sather • Edited

I apologize, for some reason the trigger step was using old code. If you don't mind, try clicking on the Configuration tab on that screen to view the source's code, then paste in the code for the newest version. Then you'll see an option to Update Code to the right. Try pushing a new commit after that.

I updated the workflow to use the newest version, too, so you can also copy it anew and that should work.

Appreciate you letting me know! Please tell me if this doesn't fix it or if you have any other issues.

Collapse
 
mikeyglitz profile image
mikeyGlitz

github.com/dylburger/dev-to-posts/...
getContents() is not a valid function. Checking the Octokit API, getContent() is the method you're looking for.

Thread Thread
 
dylburger profile image
Dylan J. Sather

Nice catch. It's funny because the plural method still worked for me - did it fail for you?

At any rate, newest version of the code should reference getContent.

Thread Thread
 
mikeyglitz profile image
mikeyGlitz

Yeah it failed for me, I got a null error when it ran.

Thread Thread
 
dylburger profile image
Dylan J. Sather

Does the code with getContent work for you now?

Thread Thread
 
mikeyglitz profile image
mikeyGlitz

Yup. Thanks!

Thread Thread
 
dylburger profile image
Dylan J. Sather

Great thanks for the back and forth and for reporting these errors.