Compare commits

..

No commits in common. "b4b2b2ec5d0a2640530934fcc99235a383ca5e39" and "22456984058ff1a29215450e3aa6a0ecc0d901a7" have entirely different histories.

3 changed files with 1 additions and 21 deletions

View File

@ -58,13 +58,6 @@ def pr_merge_status(
results = {} results = {}
# Check if base branch is in our list, if it is
# no need to call commit_in_branch
merge_base_branch = pr_data.get("base", {}).get("ref")
if merge_base_branch in branches:
results[merge_base_branch] = True
branches.remove(merge_base_branch)
for branch in branches: for branch in branches:
in_branch = commit_in_branch(commit_sha, branch) in_branch = commit_in_branch(commit_sha, branch)
results[branch] = in_branch results[branch] = in_branch

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "nixprstatus" name = "nixprstatus"
version = "0.1.3" version = "0.1.2"
description = "Nixpkgs PR status checker" description = "Nixpkgs PR status checker"
authors = ["Torjus Håkestad <torjus@usit.uio.no>"] authors = ["Torjus Håkestad <torjus@usit.uio.no>"]
license = "MIT" license = "MIT"

View File

@ -66,19 +66,6 @@ class TestPRMergeStatus(unittest.TestCase):
res = pr_merge_status(pr, branches, check_backport=True) res = pr_merge_status(pr, branches, check_backport=True)
self.assertEqual(res.title, expected_title) self.assertEqual(res.title, expected_title)
@unittest.mock.patch("requests.get", side_effect=mocked_requests_get)
def test_pr_merge_status_no_check_master_345583(self, mock_get):
pr = 345583
branches = ["master", "nixos-unstable", "nixos-24.05"]
master_compare_url = "https://api.github.com/repos/NixOS/nixpkgs/compare/master...2c5fac3edf2d00d948253e392ec1604b29b38f14"
res = pr_merge_status(pr, branches, check_backport=False)
self.assertTrue(res.merged)
self.assertTrue(res.branches["master"])
urls_called = [call[0][0] for call in mock_get.call_args_list]
self.assertFalse(master_compare_url in urls_called)
class TestCommitInBranch(unittest.TestCase): class TestCommitInBranch(unittest.TestCase):
@unittest.mock.patch("requests.get", side_effect=mocked_requests_get) @unittest.mock.patch("requests.get", side_effect=mocked_requests_get)