File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
scripts/edgeone/edge-functions/gh Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,7 @@ async function loadAllowedOwners(context) {
6868 }
6969
7070 const owners = new Set ( DEFAULT_OWNERS ) ;
71- const kv =
72- ( context && context . env && context . env . GH_KV ) ||
73- globalThis . GH_KV ;
71+ const kv = context ?. env ?. GH_KV || globalThis . GH_KV ;
7472
7573 if ( kv && typeof kv . get === "function" ) {
7674 try {
@@ -128,9 +126,7 @@ export default async function onRequest(context) {
128126 if ( ifModifiedSince ) headers . set ( "if-modified-since" , ifModifiedSince ) ;
129127 headers . set ( "user-agent" , "edgeone-gh-proxy" ) ;
130128 if ( kind === "api" ) {
131- const token =
132- ( context && context . env && context . env . GH_TOKEN ) ||
133- globalThis . GH_TOKEN ;
129+ const token = context ?. env ?. GH_TOKEN || '' ;
134130 if ( token ) {
135131 headers . set ( "authorization" , `Bearer ${ token } ` ) ;
136132 }
You can’t perform that action at this time.
0 commit comments