* Support full GitHub app authentication
Refactor GithubIntegration class and add test case for app authentication
Add permissions and repository properties in InstallationAuthorization
Set JWT_EXPIRY=60 by default in GithubIntegration constructor
* Modify existing testcases for GithubIntegration as per the framework and add missing tests
* Provide installation ID for creating the access token instead of getting the first installation
* Add optional permissions support for installation access token
* Add lock around app authentication
* Keep compatibility for importing GithubIntegration from MainClass
* Group app authentication parameters in a class
Co-authored-by: Malik Ammar Akbar <malikammar.akbar@pfizer.com>
Co-authored-by: Enrico Minack <github@enrico.minack.dev>
Authenticating via client_id and client_secret is dangerous, since they
appended to the query string, and can be easily seen from the URL.
client_id/client_secret have been deprecated since May 2020, and ignored
by GitHub since late 2020, so it's high time they were removed.
There are two test cases that explicitly test with client_id and
client_secret, which means pytest helpfully tells us about them after
the test run concludes. We don't need to see them every run until we
drop the arguments, so filter them out for now.
With the Python 2.7 deadline fast approaching, modernize the codebase
making use of the modernize module to switch to using six, as well as
other upcoming features, such as absolute imports . Stop using 2to3
for Travis, yay!
# Problem #
The `.whl` available on PyPi for this repository contains its entire `tests` submodule.
The total size of the `pygithub` module is less than `1mb` without tests and `>23mb` with.
Previous discussions on this topic indicated the removal of tests would be accepted if someone created a pull request to do so: https://github.com/PyGithub/PyGithub/issues/672
This is that pull request! 😄
# Solution/Implementation #
- Moved "tests" to root of the repository ( outside the package )
- Added `tests.` module path to the imports in `AllTests.py`
- Updated `setup.py`
- Removed `package_data` from product
- Removed "tests" from packages definition
- Repointed `test_suite` to new location
- Updated `travis.yml`
- Added conditional ( if not `py2.7` ) conversion of code to `py3`
_... apologies for all the failed build spam below - new to working with Travis CI / had some gotcha moments!_