Skip to content

Commit

Permalink
up: update some jenkins logic, add auth logic
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 17, 2022
1 parent 85cbb57 commit 0b8b3f1
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 152 deletions.
10 changes: 8 additions & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ class Factory
{
/**
* @param string $url
* @param string $username
* @param string $apiToken
*
* @return Jenkins
*/
public static function make(string $url): Jenkins
public static function make(string $url, string $username, string $apiToken = ''): Jenkins
{
return new Jenkins($url);
$jk = new Jenkins($url);
$jk->setUsername($username);
$jk->setApiToken($apiToken);

return $jk;
}
}
Loading

0 comments on commit 0b8b3f1

Please sign in to comment.