cloudflare / pages-action

MIT License
468 stars 95 forks source link

Do not create octokit if no github token #42

Closed IanVS closed 1 year ago

IanVS commented 1 year ago

Fixes https://github.com/cloudflare/pages-action/issues/41

WalshyDev commented 1 year ago

This is awkward but the types for Octokit aren't exposed so... that's fun.

IanVS commented 1 year ago

Yeah the other option is to create it in each of the functions, but that seemed like a possible perf hit, so I figured the closure was the least-bad way to do this.

IanVS commented 1 year ago

Oh, I see that https://github.com/cloudflare/pages-action/pull/37 does indeed create it in multiple places now.