@@ -119,6 +119,9 @@ public function handle(): int
119119 $ newVersion = $ this ->askForNewVersion ($ currentVersion );
120120 $ this ->info ("New version: {$ newVersion }\n" );
121121
122+ // Ask for user token for release authorship
123+ $ userToken = $ this ->askForUserToken ();
124+
122125 $ missingPackagesResult = $ this ->packageComparisonService ->isNewOrgPackage (array_keys ($ packages ['public ' ]), array_keys ($ packages ['private ' ]), $ orgPackages );
123126
124127 // Flatten the missing packages result into a single array
@@ -187,6 +190,7 @@ public function handle(): int
187190 [
188191 'version ' => $ newVersion ,
189192 'packages ' => $ publicPackagesJson ,
193+ 'user_token ' => $ userToken ,
190194 ]
191195 );
192196 }
@@ -203,6 +207,7 @@ public function handle(): int
203207 [
204208 'version ' => $ newVersion ,
205209 'packages ' => $ privatePackagesJson ,
210+ 'user_token ' => $ userToken ,
206211 ]
207212 );
208213 }
@@ -393,6 +398,24 @@ public function askForNewVersion(string $currentVersion): string
393398 return $ version ;
394399 }
395400
401+ public function askForUserToken (): string
402+ {
403+ $ this ->line ("\n🔑 GitHub Release Authorship " );
404+ $ this ->line ("To appear as the author of GitHub releases, provide your personal access token. " );
405+ $ this ->line ("Leave empty to use bot token (releases will show as created by mooxbot). " );
406+ $ this ->line ("Token needs 'public_repo' or 'repo' scope for the target repositories. " );
407+
408+ $ token = $ this ->secret ('Enter your GitHub personal access token (optional): ' );
409+
410+ if (empty ($ token )) {
411+ $ this ->line ("ℹ️ Using bot token - releases will be created by mooxbot " );
412+ return '' ;
413+ } else {
414+ $ this ->line ("✅ Using your token - releases will show you as author " );
415+ return $ token ;
416+ }
417+ }
418+
396419 // Helper methods
397420 private function validateVersionFormat (string $ version ): bool
398421 {
0 commit comments