githubnext / blocks-template

A template for creating custom Blocks.
MIT License
112 stars 11 forks source link

fix: pass PAT without bearer prefix #30

Closed mattrothenberg closed 2 years ago

mattrothenberg commented 2 years ago

I noticed that all of my requests were failing when I provided a PAT.

Upon closer inspection, we already apply the token prefix to our authentication header in @githubnext/utils, https://github.com/githubnext/utils/blob/main/src/lib/on-request-github-data.ts#L12. As such, this Bearer prefix seems unnecessary

mattrothenberg commented 2 years ago

@Wattenberger believe it or not, the template strings cast the value to a string! we could def do this more explicitly when we assign the env var, for clarity's sake

Screen Shot 2022-04-15 at 12 12 43 PM