Skip to content

Commit

Permalink
fix: project setting (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-stackrox authored Dec 12, 2023
1 parent b772931 commit f69d8f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (j junit2jira) createIssueOrComment(tc testCase) (*testIssue, error) {
logEntry(NA, summary).Debugf("Dry run: will just print issue\n %q", description)
return nil, nil
}
create, response, err := j.jiraClient.Issue.Create(newIssue(summary, description))
create, response, err := j.jiraClient.Issue.Create(newIssue(j.jiraProject, summary, description))
if response != nil && err != nil {
logError(err, response)
return nil, fmt.Errorf("could not create issue %s: %w", summary, err)
Expand Down Expand Up @@ -325,14 +325,14 @@ func logEntry(id, summary string) *log.Entry {
return log.WithField("ID", id).WithField("summary", summary)
}

func newIssue(summary string, description string) *jira.Issue {
func newIssue(project string, summary string, description string) *jira.Issue {
return &jira.Issue{
Fields: &jira.IssueFields{
Type: jira.IssueType{
Name: "Bug",
},
Project: jira.Project{
Key: "ROX",
Key: project,
},
Summary: summary,
Description: description,
Expand Down

0 comments on commit f69d8f5

Please sign in to comment.