Skip to content

Commit

Permalink
Merge pull request #67 from reload/priority
Browse files Browse the repository at this point in the history
Fix priority
  • Loading branch information
arnested authored Apr 4, 2024
2 parents 4e535d4 + af10cd9 commit 45b9aa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
23 changes: 6 additions & 17 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
printerClass="Sempro\PHPUnitPrettyPrinter\PrettyPrinterForPhpUnit9"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
7 changes: 7 additions & 0 deletions src/JiraSecurityIssue.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ class JiraSecurityIssue
*/
protected string $project;

/**
* Priority of issue to create.
*/
protected string $priority = 'Undecided';

/**
* Type of issue to create.
*/
Expand Down Expand Up @@ -77,6 +82,7 @@ class JiraSecurityIssue
public function __construct()
{
$this->project = \getenv('JIRA_PROJECT') ?: '';
$this->priority = \getenv('JIRA_PRIORITY') ?: 'Undecided';
$this->issueType = \getenv('JIRA_ISSUE_TYPE') ?: 'Bug';
$this->restrictedCommentRole = \getenv('JIRA_RESTRICTED_COMMENT_ROLE') ?: 'Developers';

Expand Down Expand Up @@ -196,6 +202,7 @@ public function ensure(): string
$issueField = new IssueField();
$issueField->setProjectKey($this->project)
->setSummary($this->title ?? '')
->setPriorityNameAsString($this->priority)
->setIssueTypeAsString($this->issueType)
->setDescription($this->body);

Expand Down

0 comments on commit 45b9aa1

Please sign in to comment.