diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 3e0f3a0..ba9da10 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -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 }}
diff --git a/README.rst b/README.rst
index fb902d2..1f83165 100644
--- a/README.rst
+++ b/README.rst
@@ -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 `_
+- Enable search for WebhookPayloadAdmin
+- Start testing using upstream Postgres
+
+
v2.0.1 (18 Jun 2024)
~~~~~~~~~~~~~~~~~~~~
diff --git a/docker-compose.yml b/docker-compose.yml
index 0285788..8b42c02 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -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:
diff --git a/setup.py b/setup.py
index 17308d8..76419f6 100644
--- a/setup.py
+++ b/setup.py
@@ -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',
diff --git a/tcms_github_app/admin.py b/tcms_github_app/admin.py
index 21546b5..cc07bf8 100644
--- a/tcms_github_app/admin.py
+++ b/tcms_github_app/admin.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2024 Alexander Todorov
+# Copyright (c) 2019-2025 Alexander Todorov
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
@@ -20,6 +20,7 @@
class WebhookPayloadAdmin(admin.ModelAdmin):
+ search_fields = ('action', 'event', 'sender')
list_display = ('pk', 'received_on', 'sender', 'event', 'action')
ordering = ['-pk']
diff --git a/tcms_github_app/tests/test_github_interfaces.py b/tcms_github_app/tests/test_github_interfaces.py
index 80eab21..b77f964 100644
--- a/tcms_github_app/tests/test_github_interfaces.py
+++ b/tcms_github_app/tests/test_github_interfaces.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2023-2024 Alexander Todorov
+# Copyright (c) 2023-2025 Alexander Todorov
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
@@ -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)
diff --git a/tcms_github_app/utils.py b/tcms_github_app/utils.py
index b3b8559..a7a6e83 100644
--- a/tcms_github_app/utils.py
+++ b/tcms_github_app/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2024 Alexander Todorov
+# Copyright (c) 2019-2025 Alexander Todorov
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
@@ -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}
)