File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,15 @@ public function getLatestTag(?string $repository = null): string
8383 protected function fetchLatestTag (string $ repository ): ?string
8484 {
8585 try {
86- $ response = Http::withToken ($ this ->token )
86+ $ response = Http::when ( config ( ' filament-easy-footer.github.token ' ), fn ( $ request ) => $ request -> withToken ($ this ->token ) )
8787 ->get ("https://api.github.com/repos/ {$ repository }/releases/latest " );
8888
89+
8990 if ($ response ->successful ()) {
9091 return $ response ->json ('tag_name ' );
9192 }
9293
93- $ tagsResponse = Http::withToken ($ this ->token )
94+ $ tagsResponse = Http::when ( config ( ' filament-easy-footer.github.token ' ), fn ( $ request ) => $ request -> withToken ($ this ->token ) )
9495 ->get ("https://api.github.com/repos/ {$ repository }/tags " );
9596
9697 if ($ tagsResponse ->successful () && ! empty ($ tagsResponse ->json ())) {
You can’t perform that action at this time.
0 commit comments