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

chore: Extract functions and add test coverage #144

Merged
merged 4 commits into from
Nov 5, 2024
Merged

Conversation

zkoppert
Copy link
Member

@zkoppert zkoppert commented Nov 4, 2024

Pull Request

Extract functions from code in main() and add test coverage for the new functions. This doesn't extract all functionality from the main() but its a start. Follow up PR's possible but not required given current usage of this action.

Proposed Changes

This pull request refactors the open_contrib_pr.py script to improve code organization and adds new test cases for better coverage. The most important changes include extracting functions for cloning repositories and creating pull requests, updating the main logic to use these functions, and adding comprehensive unit tests for the new functions and existing authentication logic.

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 bug, documentation, enhancement, infrastructure, maintenance or breaking

@zkoppert zkoppert self-assigned this Nov 4, 2024
@zkoppert zkoppert requested a review from Copilot November 4, 2024 21:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 suggestions.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

open_contrib_pr.py Outdated Show resolved Hide resolved
open_contrib_pr.py Outdated Show resolved Hide resolved
test_auth.py Outdated Show resolved Hide resolved
test_auth.py Outdated Show resolved Hide resolved
@zkoppert zkoppert merged commit 75a929e into main Nov 5, 2024
29 checks passed
@zkoppert zkoppert deleted the test-coverage branch November 5, 2024 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants