Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
pip install -r devel.txt
pip install $(curl --silent https://raw.githubusercontent.com/kiwitcms/Kiwi/master/requirements/base.txt | grep PyGithub)

docker exec -i postgresql_database psql -c "ALTER USER kiwi CREATEDB;"

- name: Execute tests
env:
KIWI_GITHUB_APP_ID: ${{ secrets.KIWI_GITHUB_APP_ID }}
Expand Down
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ Then configure how the application interacts with GitHub:
Changelog
---------

v2.1.0 (18 Apr 2025)
~~~~~~~~~~~~~~~~~~~~

- Refactor internal calls to PyGithub b/c of updated interface. Fixes
`Sentry KIWI-TCMS-V7 <https://kiwitcms.sentry.io/issues/6548382981/>`_
- Enable search for WebhookPayloadAdmin
- Start testing using upstream Postgres


v2.0.1 (18 Jun 2024)
~~~~~~~~~~~~~~~~~~~~

Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ version: '2'
services:
db:
container_name: postgresql_database
image: centos/postgresql-12-centos7
image: postgres:latest
volumes:
- postgresql_database_data:/var/lib/pgsql/data
- postgresql_database_data:/var/lib/postgresql/data
restart: always
ports:
- 5432:5432
environment:
POSTGRESQL_DATABASE: test_project
POSTGRESQL_USER: kiwi
POSTGRESQL_PASSWORD: kiwi
POSTGRES_DB: test_project
POSTGRES_USER: kiwi
POSTGRES_PASSWORD: kiwi

volumes:
postgresql_database_data:
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_install_requires(path):

setup(
name='kiwitcms-github-app',
version='2.0.1',
version='2.1.0',
description='GitHub App integration for Kiwi TCMS',
long_description=get_long_description(),
author='Kiwi TCMS',
Expand Down
3 changes: 2 additions & 1 deletion tcms_github_app/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2019-2025 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
Expand All @@ -20,6 +20,7 @@


class WebhookPayloadAdmin(admin.ModelAdmin):
search_fields = ('action', 'event', 'sender')
list_display = ('pk', 'received_on', 'sender', 'event', 'action')
ordering = ['-pk']

Expand Down
6 changes: 3 additions & 3 deletions tcms_github_app/tests/test_github_interfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2023-2025 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
Expand All @@ -25,7 +25,7 @@ def test_utils_PatchedGithub_and_upstream_Github_should_have_the_same_signature(

def test_instantiate_an_object_from_utils_PatchedGithub_class(self):
inst = utils.PatchedGithub(auth=github.Auth.Token("testing-token"))
self.assertIsNotNone(inst._Github__requester) # pylint: disable=no-member
self.assertIsNotNone(inst.requester)

inst = github.Github(auth=github.Auth.Token("testing-token"))
self.assertIsNotNone(inst._Github__requester)
self.assertIsNotNone(inst.requester)
7 changes: 2 additions & 5 deletions tcms_github_app/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2024 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2019-2025 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
Expand Down Expand Up @@ -35,11 +35,8 @@ def get_installation(self, inst_id):
Doesn't look like it will be introduced again:
https://github.com/PyGithub/PyGithub/issues/1776
"""
# b/c this is self.__requester in the parent class
requester = self._Github__requester # pylint: disable=protected-access,no-member

return github.Installation.Installation(
requester, headers={}, attributes={"id": inst_id}, completed=True
self.requester, headers={}, attributes={"id": inst_id}
)


Expand Down
Loading