@@ -79,13 +79,6 @@ public function triggerWorkflowDispatch(string $org, string $repo, string $workf
7979 {
8080 $ url = "https://api.github.com/repos/ {$ org }/ {$ repo }/actions/workflows/ {$ workflowId }/dispatches " ;
8181
82- // Automatically add user information to inputs
83- $ user = $ this ->getCurrentUser ();
84- if ($ user && ! isset ($ inputs ['user_name ' ]) && ! isset ($ inputs ['user_email ' ])) {
85- $ inputs ['user_name ' ] = $ user ['name ' ] ?? $ user ['login ' ] ?? 'Unknown User ' ;
86- $ inputs ['user_email ' ] = $ user ['email ' ] ?? $ user ['login ' ].'@users.noreply.github.com ' ;
87- }
88-
8982 $ data = [
9083 'ref ' => $ ref ,
9184 ];
@@ -97,9 +90,9 @@ public function triggerWorkflowDispatch(string $org, string $repo, string $workf
9790 return $ this ->postJson ($ url , $ data );
9891 }
9992
100- public function createRelease (string $ repoFullName , string $ version , ?string $ body = null , string $ targetCommitish = 'main ' ): ?array
93+ public function createRelease (string $ org , string $ repo , string $ version , ?string $ body = null , string $ targetCommitish = 'main ' ): ?array
10194 {
102- $ url = "https://api.github.com/repos/ {$ repoFullName }/releases " ;
95+ $ url = "https://api.github.com/repos/ {$ org } / { $ repo }/releases " ;
10396
10497 // Detect if this is a prerelease (alpha, beta, rc)
10598 $ isPrerelease = preg_match ('/-(alpha|beta|rc)\b/i ' , $ version );
@@ -117,9 +110,9 @@ public function createRelease(string $repoFullName, string $version, ?string $bo
117110 return $ this ->postJson ($ url , $ data );
118111 }
119112
120- public function getLatestReleaseTag (string $ repoFullName ): string
113+ public function getLatestReleaseTag (string $ org , string $ repo ): string
121114 {
122- $ data = $ this ->fetchJson ("https://api.github.com/repos/ {$ repoFullName }/releases/latest " );
115+ $ data = $ this ->fetchJson ("https://api.github.com/repos/ {$ org } / { $ repo }/releases/latest " );
123116
124117 return $ data ['name ' ] ?? 'No release ' ;
125118 }
0 commit comments