Pass a personal access token from the process environment to onRequestGitHubData, to make testing blocks that call the GitHub API easier. (I tested this with https://github.com/mattrothenberg/codeowners-block)
I also fixed a couple other uses of PATs: I don't think Accept: Bearer ${PAT} is valid, so I replaced it with Authorization: Bearer ${PAT}; but Authorization headers are rejected by raw.githubusercontent.com because of CORS so I dropped that one. If I've misunderstood things please let me know!
Pass a personal access token from the process environment to
onRequestGitHubData
, to make testing blocks that call the GitHub API easier. (I tested this with https://github.com/mattrothenberg/codeowners-block)I also fixed a couple other uses of PATs: I don't think
Accept: Bearer ${PAT}
is valid, so I replaced it withAuthorization: Bearer ${PAT}
; butAuthorization
headers are rejected byraw.githubusercontent.com
because of CORS so I dropped that one. If I've misunderstood things please let me know!