Skip to content

Add git and GitHub fixtures

Compare
Choose a tag to compare
@jinder1s jinder1s released this 20 Jul 18:29
· 310 commits to master since this release
4d718b5

Added fixtures to fetch data from both the local git repository and the GitHub API:

  • Added a git_repo fixture to get information about the checked out repository
  • Added a git_origin_url fixture to get the configured SSH or HTTPS URL for the repository's origin
  • Added a github_client fixture to initialize a GitHub API client using a personal access token from the GITHUB_TOKEN environment variable
  • Added a github_repo fixture to return a github.py Repository object for the repo being examined. This fixture has function scope rather than session like the other new ones, since the loop fixture needed to support github.py's async network calls is also function-scoped.
  • Added the packages needed to work with git and the GitHub API
  • Refactored the test suite to correctly run sample checks that exercise fixtures
  • Added tests for the new fixtures (the ones that actually talk to the GitHub API are skipped if the token environment variable isn't set)
  • Fixed some minor docstring errors in the plugin module