Adds assignees

This commit is contained in:
Nuno Maduro
2024-08-03 17:05:34 +01:00
parent 6fb1133d52
commit 41e50cac05
10 changed files with 124 additions and 8 deletions

View File

@ -9,6 +9,13 @@ namespace Pest\Configuration;
*/
final class Context
{
/**
* The assignees link.
*
* @internal
*/
public string $assignees = '';
/**
* The issues link.
*
@ -44,6 +51,8 @@ final class Context
$this->issues = "https://github.com/{$project}/issues/%s";
$this->prs = "https://github.com/{$project}/pull/%s";
$this->assignees = 'https://github.com/%s';
return $this;
}
@ -55,6 +64,8 @@ final class Context
$this->issues = "https://gitlab.com/{$project}/issues/%s";
$this->prs = "https://gitlab.com/{$project}/merge_requests/%s";
$this->assignees = 'https://gitlab.com/%s';
return $this;
}
@ -66,6 +77,8 @@ final class Context
$this->issues = 'https://bitbucket.org/{$project}/issues/%s';
$this->prs = "https://bitbucket.org/{$project}/pull-requests/%s";
$this->assignees = 'https://bitbucket.org/%s';
return $this;
}
@ -76,17 +89,21 @@ final class Context
{
$this->issues = "https://{$namespace}.atlassian.net/browse/{$project}-%s";
$this->assignees = "https://{$namespace}.atlassian.net/secure/ViewProfile?name=%s";
return $this;
}
/**
* Sets the test context to custom.
*/
public function using(string $issues, string $prs): self
public function using(string $issues, string $prs, string $assignees): self
{
$this->issues = $issues;
$this->prs = $prs;
$this->assignees = $assignees;
return $this;
}
}