From 1db895d3ad7be4f56149207cc2536e76b7e25f1e Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 19 Jun 2022 10:00:50 -0400 Subject: [PATCH] Update github3 to 3.2 release --- .github/workflows/ci.yml | 2 +- Dockerfile | 3 +-- homu/main.py | 8 ++------ homu/server.py | 4 +--- setup.py | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 625220a..860dd21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: pull_request: {} env: - PYTHON_VERSION: 3.8 + PYTHON_VERSION: "3.10" jobs: cicd: diff --git a/Dockerfile b/Dockerfile index 6228c94..1537fc2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -FROM ubuntu:focal -# We need an older Ubuntu as github3 depends on < Python 3.10 to avoid errors +FROM ubuntu:jammy RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ python3-pip \ diff --git a/homu/main.py b/homu/main.py index 4170ed5..9b5ce4f 100644 --- a/homu/main.py +++ b/homu/main.py @@ -1627,9 +1627,7 @@ def synchronize(repo_label, repo_cfg, logger, gh, states, repos, db, mergeable_q db, states, sha=comment.original_commit_id, - command_src=comment.to_json()['html_url'], - # FIXME switch to `comment.html_url` - # after updating github3 to 1.3.0+ + command_src=comment.html_url ) for comment in pull.iter_issue_comments(): @@ -1643,9 +1641,7 @@ def synchronize(repo_label, repo_cfg, logger, gh, states, repos, db, mergeable_q my_username, db, states, - command_src=comment.to_json()['html_url'], - # FIXME switch to `comment.html_url` - # after updating github3 to 1.3.0+ + command_src=comment.html_url ) saved_state = saved_states.get(pull.number) diff --git a/homu/server.py b/homu/server.py index b778c0b..9224e40 100644 --- a/homu/server.py +++ b/homu/server.py @@ -478,9 +478,7 @@ def github(): g.my_username, g.db, g.states, - command_src=c.to_json()['html_url'], - # FIXME switch to `c.html_url` - # after updating github3 to 1.3.0+ + command_src=c.html_url ) or found status = '' diff --git a/setup.py b/setup.py index d69845c..3110d64 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ packages=['homu'], install_requires=[ - 'github3.py==0.9.6', + 'github3.py==3.2.0', 'toml', 'Jinja2', 'requests',