Skip to content

Fix: Correct iteration count log message in issue-config processing#358

Merged
kkaarreell merged 1 commit into
mainfrom
ks_iter_log_fix
May 13, 2026
Merged

Fix: Correct iteration count log message in issue-config processing#358
kkaarreell merged 1 commit into
mainfrom
ks_iter_log_fix

Conversation

@kkaarreell

@kkaarreell kkaarreell commented May 13, 2026

Copy link
Copy Markdown
Collaborator

The log message reporting the number of iterations created was off by one. The loop variable 'i' from enumerate() is 0-based, so for 5 iterations (iter1-iter5), it would log "Created 4 iterations" instead of the correct "Created 5 iterations".

Changed the log message to use 'i + 1' to report the accurate count.

🤖 Generated with Claude Code

Summary by Sourcery

Bug Fixes:

  • Correct the logged number of created iterations in issue-config processing to match the actual iterations created.

@kkaarreell kkaarreell self-assigned this May 13, 2026
@sourcery-ai

sourcery-ai Bot commented May 13, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the iteration count in a Jira helper log message to correctly reflect the number of iterations created when expanding issue config actions.

File-Level Changes

Change Details Files
Fix off-by-one error in iteration count logging for expanded issue-config actions.
  • Update the final info-level log message to report the iteration count as i + 1 instead of i
  • Ensure the reported number of iterations matches the actual number of created iterations (e.g., 5 iterations logs as 5, not 4)
newa/cli/jira_helpers.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Using i + 1 in the final log will raise an exception if the loop never runs (no iterations created); consider tracking a count variable initialized to 0 or using len(...) so the log remains robust when no actions are expanded.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Using `i + 1` in the final log will raise an exception if the loop never runs (no iterations created); consider tracking a `count` variable initialized to 0 or using `len(...)` so the log remains robust when no actions are expanded.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

The log message reporting the number of iterations created was off by one.
Changed to use len(action.iterate) instead of the loop index variable,
which is more robust and prevents potential errors if the loop doesn't
execute.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kkaarreell kkaarreell merged commit 12a8728 into main May 13, 2026
18 checks passed
@kkaarreell kkaarreell deleted the ks_iter_log_fix branch May 13, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant