Skip to content

Conversation

@parkerbxyz
Copy link
Member

@parkerbxyz parkerbxyz commented Dec 20, 2023

Proposed Changes

I found some logic in issue_metrics.py that is duplicating environment variable processing already happening via get_env_vars() in config.py, which was introduced in #171.

issue-metrics/config.py

Lines 61 to 71 in ebc6a99

labels_to_measure = os.getenv("LABELS_TO_MEASURE")
if labels_to_measure:
labels_to_measure = labels_to_measure.split(",")
else:
labels_to_measure = []
ignore_users = os.getenv("IGNORE_USERS")
if ignore_users:
ignore_users = ignore_users.split(",")
else:
ignore_users = []

Duplicate logic:

labels = env_vars.labels_to_measure
if labels:
labels = labels.split(",")
else:
labels = []

if ignore_users is None:
ignore_users = []

Removing this duplicate logic fixes #180.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, or breaking

@zkoppert zkoppert added the bug Something isn't working label Jan 9, 2024
Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! good find!

@zkoppert zkoppert merged commit 439fad5 into main Jan 9, 2024
@zkoppert zkoppert deleted the parkerbxyz/bugfix branch January 9, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LABELS_TO_MEASURE causes the action to fail

3 participants