Skip to content

Commit

Permalink
rename confusing variable
Browse files Browse the repository at this point in the history
  • Loading branch information
avarsava committed Oct 3, 2024
1 parent fe54d67 commit 73ae004
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public ActionState perform(
// This unfortunately still matches on supersets, so if you have 'My Ticket' it won't match
// 'Ny Ticket'
// but it will match 'My Ticket 2'. We address that later.
var issues =
var searchedIssues =
current.search(
String.format(
"summary ~ \"%s\" and project = %s and issuetype = %s",
Expand All @@ -157,21 +157,23 @@ public ActionState perform(
Issue.UPDATED.name(),
Issue.SUMMARY.name()));
// Filter again by summary title for exact matching
issues =
issues.stream()
searchedIssues =
searchedIssues.stream()
.filter(i -> i.getFields().get(Issue.SUMMARY.name()).asText().equals(summary))
.toList();
this.issues = issues.stream().map(Issue::getKey).collect(Collectors.toSet());
this.issues = searchedIssues.stream().map(Issue::getKey).collect(Collectors.toSet());
((Definer<JiraConnection>) connection)
.log(
new StringBuilder("Got ").append(issues.isEmpty() ? "nothing" : issues).toString(),
new StringBuilder("Got ")
.append(searchedIssues.isEmpty() ? "nothing" : searchedIssues)
.toString(),
LogLevel.DEBUG,
new TreeMap<>());
final var missingLabels = new TreeSet<String>();
final var result =
verb.perform(
connection,
issues,
searchedIssues,
summary,
labels,
type,
Expand Down

0 comments on commit 73ae004

Please sign in to comment.