File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
torchci/pages/api/grafana_mcp Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export default async function handler(
49
49
// write permissions to the main PyTorch repository
50
50
const repoOwner = "pytorch" ;
51
51
const repoName = "pytorch" ;
52
+ let username : string ;
52
53
53
54
try {
54
55
const octokit = await getOctokitWithUserToken (
@@ -78,6 +79,9 @@ export default async function handler(
78
79
}
79
80
80
81
console . log ( `Authorized: User ${ user . data . login } has write permissions` ) ;
82
+
83
+ // Store username for use in lambda request
84
+ username = user . data . login ;
81
85
} catch ( error ) {
82
86
console . error ( "Error checking permissions:" , error ) ;
83
87
return res . status ( 500 ) . json ( { error : "Permission check failed" } ) ;
@@ -142,6 +146,7 @@ export default async function handler(
142
146
body : JSON . stringify ( {
143
147
query : query ,
144
148
userUuid : userUuid ,
149
+ username : username ,
145
150
} ) ,
146
151
} ) ;
147
152
You can’t perform that action at this time.
0 commit comments