From 8e93ade1edd1547223f337264d4c7fe972044255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 20 May 2024 17:59:34 +0200 Subject: [PATCH 1/2] GH-41735: [CI][Archery] Update archery to be compatible with pygit2 1.15 API change --- dev/archery/archery/crossbow/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/archery/archery/crossbow/core.py b/dev/archery/archery/crossbow/core.py index c85f1f754b9..3237684377f 100644 --- a/dev/archery/archery/crossbow/core.py +++ b/dev/archery/archery/crossbow/core.py @@ -427,8 +427,14 @@ def create_branch(self, branch_name, files, parents=None, message='', return branch def create_tag(self, tag_name, commit_id, message=''): + commit_object = ( + pygit2.GIT_OBJECT_COMMIT + if getattr(pygit2, 'GIT_OBJECT_COMMIT') + else pygit2.GIT_OBJ_COMMIT + ) tag_id = self.repo.create_tag(tag_name, commit_id, - pygit2.GIT_OBJ_COMMIT, self.signature, + commit_object, + self.signature, message) # append to the pushable references From 5c80d8391eea35fdf6b7dca0e77c05bba39440b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 20 May 2024 18:07:56 +0200 Subject: [PATCH 2/2] Minor update to variable name --- dev/archery/archery/crossbow/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/archery/archery/crossbow/core.py b/dev/archery/archery/crossbow/core.py index 3237684377f..0b5d242bbac 100644 --- a/dev/archery/archery/crossbow/core.py +++ b/dev/archery/archery/crossbow/core.py @@ -427,13 +427,13 @@ def create_branch(self, branch_name, files, parents=None, message='', return branch def create_tag(self, tag_name, commit_id, message=''): - commit_object = ( + git_object_commit = ( pygit2.GIT_OBJECT_COMMIT if getattr(pygit2, 'GIT_OBJECT_COMMIT') else pygit2.GIT_OBJ_COMMIT ) tag_id = self.repo.create_tag(tag_name, commit_id, - commit_object, + git_object_commit, self.signature, message)