Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use the output_file variable in issue_metrics.py #480

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jakeatoms
Copy link

Pull Request

Proposed Changes

Resolves #479

When the OUTPUT_FILE env variable is specified in a calling Action, it is used everywhere except when checking for file size and splitting into multiple files. The default issue_metrics.md name was hardcoded.

This PR updates the script to use the provided output_file name and uses that naming as the basis for the smaller file names.

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
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance, or breaking

@github-actions github-actions bot added the fix label Feb 28, 2025
@jakeatoms jakeatoms marked this pull request as ready for review February 28, 2025 16:27
@jakeatoms jakeatoms requested a review from a team as a code owner February 28, 2025 16:27
@jmeridth
Copy link
Member

jmeridth commented Mar 4, 2025

@jakeatoms great addition. Thank you. Could you please alter or add some new tests to ensure this doesn't regress?

@jakeatoms
Copy link
Author

@jakeatoms great addition. Thank you. Could you please alter or add some new tests to ensure this doesn't regress?

Will do!

@jakeatoms
Copy link
Author

jakeatoms commented Mar 5, 2025

@jakeatoms great addition. Thank you. Could you please alter or add some new tests to ensure this doesn't regress?

@jmeridth OK, to accomplish testing without strictly testing main, I extracted the code that works with the output file to a separate function and tested that directly. We're now testing interaction with the various function calls and covering True and False scenarios. It's still not strictly testing that main isn't passing a hardcoded value, but to test that would involve a huge amount of mocking.

Let me know if you think this is sufficient, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OUTPUT_FILE ignored in issue_metrics.py
2 participants