diff --git a/Makefile b/Makefile index 5b2f60e8..d6f0cafb 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ check: PYTHONPATH=$(CURDIR) PYTHONDONTWRITEBYTECODE=1 pytest --verbose --showlocals $(TEST_TARGET) check-in-container: - podman run --rm -it -v $(CURDIR):/src:Z -w /src $(OGR_IMAGE) make check + podman run --rm -it -v $(CURDIR):/src:Z -w /src $(OGR_IMAGE) make -e GITHUB_TOKEN=$(GITHUB_TOKEN) GITLAB_TOKEN=$(GITLAB_TOKEN) check shell: podman run --rm -ti -v $(CURDIR):/src:Z -w /src $(OGR_IMAGE) bash diff --git a/ogr/abstract.py b/ogr/abstract.py index adeba515..907354ee 100644 --- a/ogr/abstract.py +++ b/ogr/abstract.py @@ -315,6 +315,23 @@ class PRStatus(IntEnum): all = 4 +class CommitStatus(Enum): + pending = 1 + success = 2 + failure = 3 + error = 4 + canceled = 5 + running = 6 + + +class MergeCommitStatus(Enum): + can_be_merged = 1 + cannot_be_merged = 2 + unchecked = 3 + checking = 4 + cannot_be_merged_recheck = 5 + + class PullRequest(OgrAbstractClass): @deprecate_and_set_removal( since="0.9.0", @@ -404,6 +421,14 @@ def patch(self) -> bytes: def head_commit(self) -> str: raise NotImplementedError + @property + def merge_commit_sha(self) -> str: + raise NotImplementedError() + + @property + def merge_commit_status(self) -> MergeCommitStatus: + raise NotImplementedError() + @property def source_project(self) -> "GitProject": raise NotImplementedError() @@ -588,15 +613,6 @@ def get_statuses(self) -> List["CommitFlag"]: raise NotImplementedError() -class CommitStatus(Enum): - pending = 1 - success = 2 - failure = 3 - error = 4 - canceled = 5 - running = 6 - - class CommitFlag(OgrAbstractClass): _states: Dict[str, CommitStatus] = dict() diff --git a/ogr/services/github/pull_request.py b/ogr/services/github/pull_request.py index 40dfd325..6268f39d 100644 --- a/ogr/services/github/pull_request.py +++ b/ogr/services/github/pull_request.py @@ -31,7 +31,7 @@ from github.IssueComment import IssueComment as _GithubIssueComment from github.PullRequestComment import PullRequestComment as _GithubPullRequestComment -from ogr.abstract import PRComment, PRStatus, PullRequest +from ogr.abstract import PRComment, PRStatus, PullRequest, MergeCommitStatus from ogr.exceptions import GithubAPIException from ogr.services import github as ogr_github from ogr.services.base import BasePullRequest @@ -109,6 +109,17 @@ def commits_url(self) -> str: def head_commit(self) -> str: return self._raw_pr.head.sha + @property + def merge_commit_sha(self) -> str: + return self._raw_pr.merge_commit_sha + + @property + def merge_commit_status(self) -> MergeCommitStatus: + if self._raw_pr.mergeable: + return MergeCommitStatus.can_be_merged + else: + return MergeCommitStatus.cannot_be_merged + @property def source_project(self) -> "ogr_github.GithubProject": if self._source_project is None: diff --git a/ogr/services/gitlab/pull_request.py b/ogr/services/gitlab/pull_request.py index 78ede800..dcf24bc4 100644 --- a/ogr/services/gitlab/pull_request.py +++ b/ogr/services/gitlab/pull_request.py @@ -21,11 +21,11 @@ # SOFTWARE. import datetime -from typing import List, Optional +from typing import Dict, List, Optional from gitlab.v4.objects import MergeRequest as _GitlabMergeRequest -from ogr.abstract import PullRequest, PRComment, PRStatus +from ogr.abstract import PullRequest, PRComment, PRStatus, MergeCommitStatus from ogr.exceptions import GitlabAPIException from ogr.services import gitlab as ogr_gitlab from ogr.services.base import BasePullRequest @@ -36,6 +36,13 @@ class GitlabPullRequest(BasePullRequest): _raw_pr: _GitlabMergeRequest _target_project: "ogr_gitlab.GitlabProject" _source_project: "ogr_gitlab.GitlabProject" = None + _merge_commit_status: Dict[str, MergeCommitStatus] = { + "can_be_merged": MergeCommitStatus.can_be_merged, + "cannot_be_merged": MergeCommitStatus.cannot_be_merged, + "unchecked": MergeCommitStatus.unchecked, + "checking": MergeCommitStatus.checking, + "cannot_be_merged_recheck": MergeCommitStatus.cannot_be_merged_recheck, + } @property def title(self) -> str: @@ -103,6 +110,18 @@ def commits_url(self) -> str: def head_commit(self) -> str: return self._raw_pr.sha + @property + def merge_commit_sha(self) -> str: + return self._raw_pr.merge_commit_sha + + @property + def merge_commit_status(self) -> MergeCommitStatus: + status = self._raw_pr.merge_status + if status in self._merge_commit_status: + return self._merge_commit_status[status] + else: + raise GitlabAPIException(f"Invalid merge_status {status}") + @property def source_project(self) -> "ogr_gitlab.GitlabProject": if self._source_project is None: diff --git a/tests/integration/github/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml b/tests/integration/github/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml new file mode 100644 index 00000000..43ac6a3b --- /dev/null +++ b/tests/integration/github/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml @@ -0,0 +1,1340 @@ +_requre: + DataTypes: 1 + key_strategy: StorageKeysInspectSimple + version_storage_file: 3 +requests.sessions: + send: + GET: + https://api.github.com:443/repos/packit/hello-world: + - metadata: + latency: 0.21739912033081055 + module_call_list: + - unittest.case + - requre.online_replacing + - tests.integration.github.test_pull_requests + - ogr.utils + - ogr.services.github.pull_request + - ogr.services.github.project + - github.MainClass + - github.Requester + - requests.sessions + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + allow_merge_commit: true + allow_rebase_merge: true + allow_squash_merge: true + archive_url: https://api.github.com/repos/packit/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/packit/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/packit/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/packit/hello-world/branches{/branch} + clone_url: https://github.com/packit/hello-world.git + collaborators_url: https://api.github.com/repos/packit/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/packit/hello-world/comments{/number} + commits_url: https://api.github.com/repos/packit/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/packit/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/packit/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/packit/hello-world/contributors + created_at: '2019-05-02T18:54:46Z' + default_branch: main + delete_branch_on_merge: false + deployments_url: https://api.github.com/repos/packit/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/packit/hello-world/downloads + events_url: https://api.github.com/repos/packit/hello-world/events + fork: false + forks: 19 + forks_count: 19 + forks_url: https://api.github.com/repos/packit/hello-world/forks + full_name: packit/hello-world + git_commits_url: https://api.github.com/repos/packit/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/packit/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/packit/hello-world/git/tags{/sha} + git_url: git://github.com/packit/hello-world.git + has_downloads: true + has_issues: true + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/packit/hello-world/hooks + html_url: https://github.com/packit/hello-world + id: 184635124 + issue_comment_url: https://api.github.com/repos/packit/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/packit/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/packit/hello-world/issues{/number} + keys_url: https://api.github.com/repos/packit/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/packit/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/packit/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/packit/hello-world/merges + milestones_url: https://api.github.com/repos/packit/hello-world/milestones{/number} + mirror_url: null + name: hello-world + network_count: 19 + node_id: MDEwOlJlcG9zaXRvcnkxODQ2MzUxMjQ= + notifications_url: https://api.github.com/repos/packit/hello-world/notifications{?since,all,participating} + open_issues: 45 + open_issues_count: 45 + organization: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + owner: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + permissions: + admin: false + pull: true + push: true + private: false + pulls_url: https://api.github.com/repos/packit/hello-world/pulls{/number} + pushed_at: '2021-06-22T04:38:13Z' + releases_url: https://api.github.com/repos/packit/hello-world/releases{/id} + size: 58 + ssh_url: git@github.com:packit/hello-world.git + stargazers_count: 2 + stargazers_url: https://api.github.com/repos/packit/hello-world/stargazers + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/{sha} + subscribers_count: 8 + subscribers_url: https://api.github.com/repos/packit/hello-world/subscribers + subscription_url: https://api.github.com/repos/packit/hello-world/subscription + svn_url: https://github.com/packit/hello-world + tags_url: https://api.github.com/repos/packit/hello-world/tags + teams_url: https://api.github.com/repos/packit/hello-world/teams + temp_clone_token: '' + trees_url: https://api.github.com/repos/packit/hello-world/git/trees{/sha} + updated_at: '2021-06-17T20:04:26Z' + url: https://api.github.com/repos/packit/hello-world + watchers: 2 + watchers_count: 2 + _next: null + elapsed: 0.216856 + encoding: utf-8 + headers: + Access-Control-Allow-Origin: '*' + Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, + X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, + X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, + X-GitHub-Media-Type, Deprecation, Sunset + Cache-Control: private, max-age=60, s-maxage=60 + Content-Encoding: gzip + Content-Security-Policy: default-src 'none' + Content-Type: application/json; charset=utf-8 + Date: Tue, 22 Jun 2021 17:13:58 GMT + ETag: W/"65828359ccd9c8ac82089f00cb6ce6bc1f0d09ce4e4b51ed5de308e815e4b516" + Last-Modified: Thu, 17 Jun 2021 20:04:26 GMT + Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin + Server: GitHub.com + Strict-Transport-Security: max-age=31536000; includeSubdomains; preload + Transfer-Encoding: chunked + Vary: Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, + X-Requested-With + X-Accepted-OAuth-Scopes: repo + X-Content-Type-Options: nosniff + X-Frame-Options: deny + X-GitHub-Media-Type: github.v3; format=json + X-GitHub-Request-Id: CB2F:828C:3199B2:6F6EE6:60D21A56 + X-OAuth-Scopes: notifications, repo, user, write:discussion, write:packages + X-RateLimit-Limit: '5000' + X-RateLimit-Remaining: '4999' + X-RateLimit-Reset: '1624385638' + X-RateLimit-Resource: core + X-RateLimit-Used: '1' + X-XSS-Protection: '0' + raw: !!binary "" + reason: OK + status_code: 200 + https://api.github.com:443/repos/packit/hello-world/pulls/111: + - metadata: + latency: 0.2601480484008789 + module_call_list: + - unittest.case + - requre.online_replacing + - tests.integration.github.test_pull_requests + - ogr.utils + - ogr.services.github.pull_request + - github.Repository + - github.Requester + - requests.sessions + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + _links: + comments: + href: https://api.github.com/repos/packit/hello-world/issues/111/comments + commits: + href: https://api.github.com/repos/packit/hello-world/pulls/111/commits + html: + href: https://github.com/packit/hello-world/pull/111 + issue: + href: https://api.github.com/repos/packit/hello-world/issues/111 + review_comment: + href: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: + href: https://api.github.com/repos/packit/hello-world/pulls/111/comments + self: + href: https://api.github.com/repos/packit/hello-world/pulls/111 + statuses: + href: https://api.github.com/repos/packit/hello-world/statuses/1abb19255a7c1bec7ffcae2487f022b23175af2b + active_lock_reason: null + additions: 0 + assignee: null + assignees: [] + author_association: MEMBER + auto_merge: null + base: + label: packit:main + ref: main + repo: + archive_url: https://api.github.com/repos/packit/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/packit/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/packit/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/packit/hello-world/branches{/branch} + clone_url: https://github.com/packit/hello-world.git + collaborators_url: https://api.github.com/repos/packit/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/packit/hello-world/comments{/number} + commits_url: https://api.github.com/repos/packit/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/packit/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/packit/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/packit/hello-world/contributors + created_at: '2019-05-02T18:54:46Z' + default_branch: main + deployments_url: https://api.github.com/repos/packit/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/packit/hello-world/downloads + events_url: https://api.github.com/repos/packit/hello-world/events + fork: false + forks: 19 + forks_count: 19 + forks_url: https://api.github.com/repos/packit/hello-world/forks + full_name: packit/hello-world + git_commits_url: https://api.github.com/repos/packit/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/packit/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/packit/hello-world/git/tags{/sha} + git_url: git://github.com/packit/hello-world.git + has_downloads: true + has_issues: true + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/packit/hello-world/hooks + html_url: https://github.com/packit/hello-world + id: 184635124 + issue_comment_url: https://api.github.com/repos/packit/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/packit/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/packit/hello-world/issues{/number} + keys_url: https://api.github.com/repos/packit/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/packit/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/packit/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/packit/hello-world/merges + milestones_url: https://api.github.com/repos/packit/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkxODQ2MzUxMjQ= + notifications_url: https://api.github.com/repos/packit/hello-world/notifications{?since,all,participating} + open_issues: 45 + open_issues_count: 45 + owner: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + private: false + pulls_url: https://api.github.com/repos/packit/hello-world/pulls{/number} + pushed_at: '2021-06-22T04:38:13Z' + releases_url: https://api.github.com/repos/packit/hello-world/releases{/id} + size: 58 + ssh_url: git@github.com:packit/hello-world.git + stargazers_count: 2 + stargazers_url: https://api.github.com/repos/packit/hello-world/stargazers + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/packit/hello-world/subscribers + subscription_url: https://api.github.com/repos/packit/hello-world/subscription + svn_url: https://github.com/packit/hello-world + tags_url: https://api.github.com/repos/packit/hello-world/tags + teams_url: https://api.github.com/repos/packit/hello-world/teams + trees_url: https://api.github.com/repos/packit/hello-world/git/trees{/sha} + updated_at: '2021-06-17T20:04:26Z' + url: https://api.github.com/repos/packit/hello-world + watchers: 2 + watchers_count: 2 + sha: d5f6efe7c6fbd6c224d31618c208c924a406fedf + user: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + body: '' + changed_files: 3 + closed_at: null + comments: 0 + comments_url: https://api.github.com/repos/packit/hello-world/issues/111/comments + commits: 1 + commits_url: https://api.github.com/repos/packit/hello-world/pulls/111/commits + created_at: '2020-04-21T09:28:40Z' + deletions: 18 + diff_url: https://github.com/packit/hello-world/pull/111.diff + draft: false + head: + label: lbarcziova:test_case_no_fmf + ref: test_case_no_fmf + repo: + archive_url: https://api.github.com/repos/lbarcziova/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/lbarcziova/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/lbarcziova/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/lbarcziova/hello-world/branches{/branch} + clone_url: https://github.com/lbarcziova/hello-world.git + collaborators_url: https://api.github.com/repos/lbarcziova/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/lbarcziova/hello-world/comments{/number} + commits_url: https://api.github.com/repos/lbarcziova/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/lbarcziova/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/lbarcziova/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/lbarcziova/hello-world/contributors + created_at: '2019-07-11T13:14:42Z' + default_branch: master + deployments_url: https://api.github.com/repos/lbarcziova/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/lbarcziova/hello-world/downloads + events_url: https://api.github.com/repos/lbarcziova/hello-world/events + fork: true + forks: 0 + forks_count: 0 + forks_url: https://api.github.com/repos/lbarcziova/hello-world/forks + full_name: lbarcziova/hello-world + git_commits_url: https://api.github.com/repos/lbarcziova/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/lbarcziova/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/lbarcziova/hello-world/git/tags{/sha} + git_url: git://github.com/lbarcziova/hello-world.git + has_downloads: true + has_issues: false + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/lbarcziova/hello-world/hooks + html_url: https://github.com/lbarcziova/hello-world + id: 196397797 + issue_comment_url: https://api.github.com/repos/lbarcziova/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/lbarcziova/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/lbarcziova/hello-world/issues{/number} + keys_url: https://api.github.com/repos/lbarcziova/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/lbarcziova/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/lbarcziova/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/lbarcziova/hello-world/merges + milestones_url: https://api.github.com/repos/lbarcziova/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkxOTYzOTc3OTc= + notifications_url: https://api.github.com/repos/lbarcziova/hello-world/notifications{?since,all,participating} + open_issues: 0 + open_issues_count: 0 + owner: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + private: false + pulls_url: https://api.github.com/repos/lbarcziova/hello-world/pulls{/number} + pushed_at: '2021-05-03T10:56:58Z' + releases_url: https://api.github.com/repos/lbarcziova/hello-world/releases{/id} + size: 36 + ssh_url: git@github.com:lbarcziova/hello-world.git + stargazers_count: 0 + stargazers_url: https://api.github.com/repos/lbarcziova/hello-world/stargazers + statuses_url: https://api.github.com/repos/lbarcziova/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/lbarcziova/hello-world/subscribers + subscription_url: https://api.github.com/repos/lbarcziova/hello-world/subscription + svn_url: https://github.com/lbarcziova/hello-world + tags_url: https://api.github.com/repos/lbarcziova/hello-world/tags + teams_url: https://api.github.com/repos/lbarcziova/hello-world/teams + trees_url: https://api.github.com/repos/lbarcziova/hello-world/git/trees{/sha} + updated_at: '2020-12-02T13:43:09Z' + url: https://api.github.com/repos/lbarcziova/hello-world + watchers: 0 + watchers_count: 0 + sha: 1abb19255a7c1bec7ffcae2487f022b23175af2b + user: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + html_url: https://github.com/packit/hello-world/pull/111 + id: 406553376 + issue_url: https://api.github.com/repos/packit/hello-world/issues/111 + labels: [] + locked: false + maintainer_can_modify: true + merge_commit_sha: 8512ef316918edc39c4a6eee13e6cc45344d03ac + mergeable: false + mergeable_state: dirty + merged: false + merged_at: null + merged_by: null + milestone: null + node_id: MDExOlB1bGxSZXF1ZXN0NDA2NTUzMzc2 + number: 111 + patch_url: https://github.com/packit/hello-world/pull/111.patch + rebaseable: false + requested_reviewers: [] + requested_teams: [] + review_comment_url: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: 0 + review_comments_url: https://api.github.com/repos/packit/hello-world/pulls/111/comments + state: open + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/1abb19255a7c1bec7ffcae2487f022b23175af2b + title: 'Test case: no fmf file' + updated_at: '2021-01-28T14:59:31Z' + url: https://api.github.com/repos/packit/hello-world/pulls/111 + user: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + _next: null + elapsed: 0.259363 + encoding: utf-8 + headers: + Access-Control-Allow-Origin: '*' + Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, + X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, + X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, + X-GitHub-Media-Type, Deprecation, Sunset + Cache-Control: private, max-age=60, s-maxage=60 + Content-Encoding: gzip + Content-Security-Policy: default-src 'none' + Content-Type: application/json; charset=utf-8 + Date: Tue, 22 Jun 2021 17:13:59 GMT + ETag: W/"5708bbdb9785fc3a1a6802c1ee3b889f01ab373ddb5021daf8eb4b7c6bdceea0" + Last-Modified: Wed, 12 May 2021 19:39:38 GMT + Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin + Server: GitHub.com + Strict-Transport-Security: max-age=31536000; includeSubdomains; preload + Transfer-Encoding: chunked + Vary: Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, + X-Requested-With + X-Accepted-OAuth-Scopes: '' + X-Content-Type-Options: nosniff + X-Frame-Options: deny + X-GitHub-Media-Type: github.v3; format=json + X-GitHub-Request-Id: CB2F:828C:3199DC:6F6F32:60D21A56 + X-OAuth-Scopes: notifications, repo, user, write:discussion, write:packages + X-RateLimit-Limit: '5000' + X-RateLimit-Remaining: '4997' + X-RateLimit-Reset: '1624385638' + X-RateLimit-Resource: core + X-RateLimit-Used: '3' + X-XSS-Protection: '0' + raw: !!binary "" + reason: OK + status_code: 200 + https://api.github.com:443/repos/packit/hello-world/pulls/112: + - metadata: + latency: 0.2929873466491699 + module_call_list: + - unittest.case + - requre.online_replacing + - tests.integration.github.test_pull_requests + - ogr.utils + - ogr.services.github.pull_request + - github.Repository + - github.Requester + - requests.sessions + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + _links: + comments: + href: https://api.github.com/repos/packit/hello-world/issues/112/comments + commits: + href: https://api.github.com/repos/packit/hello-world/pulls/112/commits + html: + href: https://github.com/packit/hello-world/pull/112 + issue: + href: https://api.github.com/repos/packit/hello-world/issues/112 + review_comment: + href: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: + href: https://api.github.com/repos/packit/hello-world/pulls/112/comments + self: + href: https://api.github.com/repos/packit/hello-world/pulls/112 + statuses: + href: https://api.github.com/repos/packit/hello-world/statuses/9ab13fa4b4944510022730708045f42aea106cef + active_lock_reason: null + additions: 1 + assignee: null + assignees: [] + author_association: MEMBER + auto_merge: null + base: + label: packit:main + ref: main + repo: + archive_url: https://api.github.com/repos/packit/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/packit/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/packit/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/packit/hello-world/branches{/branch} + clone_url: https://github.com/packit/hello-world.git + collaborators_url: https://api.github.com/repos/packit/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/packit/hello-world/comments{/number} + commits_url: https://api.github.com/repos/packit/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/packit/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/packit/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/packit/hello-world/contributors + created_at: '2019-05-02T18:54:46Z' + default_branch: main + deployments_url: https://api.github.com/repos/packit/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/packit/hello-world/downloads + events_url: https://api.github.com/repos/packit/hello-world/events + fork: false + forks: 19 + forks_count: 19 + forks_url: https://api.github.com/repos/packit/hello-world/forks + full_name: packit/hello-world + git_commits_url: https://api.github.com/repos/packit/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/packit/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/packit/hello-world/git/tags{/sha} + git_url: git://github.com/packit/hello-world.git + has_downloads: true + has_issues: true + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/packit/hello-world/hooks + html_url: https://github.com/packit/hello-world + id: 184635124 + issue_comment_url: https://api.github.com/repos/packit/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/packit/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/packit/hello-world/issues{/number} + keys_url: https://api.github.com/repos/packit/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/packit/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/packit/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/packit/hello-world/merges + milestones_url: https://api.github.com/repos/packit/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkxODQ2MzUxMjQ= + notifications_url: https://api.github.com/repos/packit/hello-world/notifications{?since,all,participating} + open_issues: 45 + open_issues_count: 45 + owner: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + private: false + pulls_url: https://api.github.com/repos/packit/hello-world/pulls{/number} + pushed_at: '2021-06-22T04:38:13Z' + releases_url: https://api.github.com/repos/packit/hello-world/releases{/id} + size: 58 + ssh_url: git@github.com:packit/hello-world.git + stargazers_count: 2 + stargazers_url: https://api.github.com/repos/packit/hello-world/stargazers + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/packit/hello-world/subscribers + subscription_url: https://api.github.com/repos/packit/hello-world/subscription + svn_url: https://github.com/packit/hello-world + tags_url: https://api.github.com/repos/packit/hello-world/tags + teams_url: https://api.github.com/repos/packit/hello-world/teams + trees_url: https://api.github.com/repos/packit/hello-world/git/trees{/sha} + updated_at: '2021-06-17T20:04:26Z' + url: https://api.github.com/repos/packit/hello-world + watchers: 2 + watchers_count: 2 + sha: d5f6efe7c6fbd6c224d31618c208c924a406fedf + user: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + body: '' + changed_files: 1 + closed_at: null + comments: 0 + comments_url: https://api.github.com/repos/packit/hello-world/issues/112/comments + commits: 1 + commits_url: https://api.github.com/repos/packit/hello-world/pulls/112/commits + created_at: '2020-04-23T07:49:41Z' + deletions: 1 + diff_url: https://github.com/packit/hello-world/pull/112.diff + draft: false + head: + label: lbarcziova:test_case_invalid_specfile + ref: test_case_invalid_specfile + repo: + archive_url: https://api.github.com/repos/lbarcziova/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/lbarcziova/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/lbarcziova/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/lbarcziova/hello-world/branches{/branch} + clone_url: https://github.com/lbarcziova/hello-world.git + collaborators_url: https://api.github.com/repos/lbarcziova/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/lbarcziova/hello-world/comments{/number} + commits_url: https://api.github.com/repos/lbarcziova/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/lbarcziova/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/lbarcziova/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/lbarcziova/hello-world/contributors + created_at: '2019-07-11T13:14:42Z' + default_branch: master + deployments_url: https://api.github.com/repos/lbarcziova/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/lbarcziova/hello-world/downloads + events_url: https://api.github.com/repos/lbarcziova/hello-world/events + fork: true + forks: 0 + forks_count: 0 + forks_url: https://api.github.com/repos/lbarcziova/hello-world/forks + full_name: lbarcziova/hello-world + git_commits_url: https://api.github.com/repos/lbarcziova/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/lbarcziova/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/lbarcziova/hello-world/git/tags{/sha} + git_url: git://github.com/lbarcziova/hello-world.git + has_downloads: true + has_issues: false + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/lbarcziova/hello-world/hooks + html_url: https://github.com/lbarcziova/hello-world + id: 196397797 + issue_comment_url: https://api.github.com/repos/lbarcziova/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/lbarcziova/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/lbarcziova/hello-world/issues{/number} + keys_url: https://api.github.com/repos/lbarcziova/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/lbarcziova/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/lbarcziova/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/lbarcziova/hello-world/merges + milestones_url: https://api.github.com/repos/lbarcziova/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkxOTYzOTc3OTc= + notifications_url: https://api.github.com/repos/lbarcziova/hello-world/notifications{?since,all,participating} + open_issues: 0 + open_issues_count: 0 + owner: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + private: false + pulls_url: https://api.github.com/repos/lbarcziova/hello-world/pulls{/number} + pushed_at: '2021-05-03T10:56:58Z' + releases_url: https://api.github.com/repos/lbarcziova/hello-world/releases{/id} + size: 36 + ssh_url: git@github.com:lbarcziova/hello-world.git + stargazers_count: 0 + stargazers_url: https://api.github.com/repos/lbarcziova/hello-world/stargazers + statuses_url: https://api.github.com/repos/lbarcziova/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/lbarcziova/hello-world/subscribers + subscription_url: https://api.github.com/repos/lbarcziova/hello-world/subscription + svn_url: https://github.com/lbarcziova/hello-world + tags_url: https://api.github.com/repos/lbarcziova/hello-world/tags + teams_url: https://api.github.com/repos/lbarcziova/hello-world/teams + trees_url: https://api.github.com/repos/lbarcziova/hello-world/git/trees{/sha} + updated_at: '2020-12-02T13:43:09Z' + url: https://api.github.com/repos/lbarcziova/hello-world + watchers: 0 + watchers_count: 0 + sha: 9ab13fa4b4944510022730708045f42aea106cef + user: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + html_url: https://github.com/packit/hello-world/pull/112 + id: 407742342 + issue_url: https://api.github.com/repos/packit/hello-world/issues/112 + labels: [] + locked: false + maintainer_can_modify: true + merge_commit_sha: 0dc8211e10e37370f49364495249f5c693a9eff7 + mergeable: true + mergeable_state: unstable + merged: false + merged_at: null + merged_by: null + milestone: null + node_id: MDExOlB1bGxSZXF1ZXN0NDA3NzQyMzQy + number: 112 + patch_url: https://github.com/packit/hello-world/pull/112.patch + rebaseable: true + requested_reviewers: [] + requested_teams: [] + review_comment_url: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: 0 + review_comments_url: https://api.github.com/repos/packit/hello-world/pulls/112/comments + state: open + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/9ab13fa4b4944510022730708045f42aea106cef + title: 'Test case: invalid specfile' + updated_at: '2021-01-28T14:59:31Z' + url: https://api.github.com/repos/packit/hello-world/pulls/112 + user: + avatar_url: https://avatars.githubusercontent.com/u/49026743?v=4 + events_url: https://api.github.com/users/lbarcziova/events{/privacy} + followers_url: https://api.github.com/users/lbarcziova/followers + following_url: https://api.github.com/users/lbarcziova/following{/other_user} + gists_url: https://api.github.com/users/lbarcziova/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/lbarcziova + id: 49026743 + login: lbarcziova + node_id: MDQ6VXNlcjQ5MDI2NzQz + organizations_url: https://api.github.com/users/lbarcziova/orgs + received_events_url: https://api.github.com/users/lbarcziova/received_events + repos_url: https://api.github.com/users/lbarcziova/repos + site_admin: false + starred_url: https://api.github.com/users/lbarcziova/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/lbarcziova/subscriptions + type: User + url: https://api.github.com/users/lbarcziova + _next: null + elapsed: 0.292332 + encoding: utf-8 + headers: + Access-Control-Allow-Origin: '*' + Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, + X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, + X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, + X-GitHub-Media-Type, Deprecation, Sunset + Cache-Control: private, max-age=60, s-maxage=60 + Content-Encoding: gzip + Content-Security-Policy: default-src 'none' + Content-Type: application/json; charset=utf-8 + Date: Tue, 22 Jun 2021 17:13:59 GMT + ETag: W/"8049407367981326cd457d6846e11dcde60af095434050f5afbf6e6a53f907b2" + Last-Modified: Wed, 12 May 2021 19:39:38 GMT + Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin + Server: GitHub.com + Strict-Transport-Security: max-age=31536000; includeSubdomains; preload + Transfer-Encoding: chunked + Vary: Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, + X-Requested-With + X-Accepted-OAuth-Scopes: '' + X-Content-Type-Options: nosniff + X-Frame-Options: deny + X-GitHub-Media-Type: github.v3; format=json + X-GitHub-Request-Id: CB2F:828C:3199F6:6F6F57:60D21A57 + X-OAuth-Scopes: notifications, repo, user, write:discussion, write:packages + X-RateLimit-Limit: '5000' + X-RateLimit-Remaining: '4996' + X-RateLimit-Reset: '1624385638' + X-RateLimit-Resource: core + X-RateLimit-Used: '4' + X-XSS-Protection: '0' + raw: !!binary "" + reason: OK + status_code: 200 + https://api.github.com:443/repos/packit/hello-world/pulls/240: + - metadata: + latency: 0.2983279228210449 + module_call_list: + - unittest.case + - requre.online_replacing + - tests.integration.github.test_pull_requests + - ogr.utils + - ogr.services.github.pull_request + - github.Repository + - github.Requester + - requests.sessions + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + _links: + comments: + href: https://api.github.com/repos/packit/hello-world/issues/240/comments + commits: + href: https://api.github.com/repos/packit/hello-world/pulls/240/commits + html: + href: https://github.com/packit/hello-world/pull/240 + issue: + href: https://api.github.com/repos/packit/hello-world/issues/240 + review_comment: + href: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: + href: https://api.github.com/repos/packit/hello-world/pulls/240/comments + self: + href: https://api.github.com/repos/packit/hello-world/pulls/240 + statuses: + href: https://api.github.com/repos/packit/hello-world/statuses/dabfd3862702e49b6877da7f224e6d6458eb961a + active_lock_reason: null + additions: 13 + assignee: null + assignees: [] + author_association: MEMBER + auto_merge: null + base: + label: packit:main + ref: main + repo: + archive_url: https://api.github.com/repos/packit/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/packit/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/packit/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/packit/hello-world/branches{/branch} + clone_url: https://github.com/packit/hello-world.git + collaborators_url: https://api.github.com/repos/packit/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/packit/hello-world/comments{/number} + commits_url: https://api.github.com/repos/packit/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/packit/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/packit/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/packit/hello-world/contributors + created_at: '2019-05-02T18:54:46Z' + default_branch: main + deployments_url: https://api.github.com/repos/packit/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/packit/hello-world/downloads + events_url: https://api.github.com/repos/packit/hello-world/events + fork: false + forks: 19 + forks_count: 19 + forks_url: https://api.github.com/repos/packit/hello-world/forks + full_name: packit/hello-world + git_commits_url: https://api.github.com/repos/packit/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/packit/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/packit/hello-world/git/tags{/sha} + git_url: git://github.com/packit/hello-world.git + has_downloads: true + has_issues: true + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/packit/hello-world/hooks + html_url: https://github.com/packit/hello-world + id: 184635124 + issue_comment_url: https://api.github.com/repos/packit/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/packit/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/packit/hello-world/issues{/number} + keys_url: https://api.github.com/repos/packit/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/packit/hello-world/labels{/name} + language: Python + languages_url: https://api.github.com/repos/packit/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/packit/hello-world/merges + milestones_url: https://api.github.com/repos/packit/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkxODQ2MzUxMjQ= + notifications_url: https://api.github.com/repos/packit/hello-world/notifications{?since,all,participating} + open_issues: 45 + open_issues_count: 45 + owner: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + private: false + pulls_url: https://api.github.com/repos/packit/hello-world/pulls{/number} + pushed_at: '2021-06-22T04:38:13Z' + releases_url: https://api.github.com/repos/packit/hello-world/releases{/id} + size: 58 + ssh_url: git@github.com:packit/hello-world.git + stargazers_count: 2 + stargazers_url: https://api.github.com/repos/packit/hello-world/stargazers + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/packit/hello-world/subscribers + subscription_url: https://api.github.com/repos/packit/hello-world/subscription + svn_url: https://github.com/packit/hello-world + tags_url: https://api.github.com/repos/packit/hello-world/tags + teams_url: https://api.github.com/repos/packit/hello-world/teams + trees_url: https://api.github.com/repos/packit/hello-world/git/trees{/sha} + updated_at: '2021-06-17T20:04:26Z' + url: https://api.github.com/repos/packit/hello-world + watchers: 2 + watchers_count: 2 + sha: d5f6efe7c6fbd6c224d31618c208c924a406fedf + user: + avatar_url: https://avatars.githubusercontent.com/u/46870917?v=4 + events_url: https://api.github.com/users/packit/events{/privacy} + followers_url: https://api.github.com/users/packit/followers + following_url: https://api.github.com/users/packit/following{/other_user} + gists_url: https://api.github.com/users/packit/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/packit + id: 46870917 + login: packit + node_id: MDEyOk9yZ2FuaXphdGlvbjQ2ODcwOTE3 + organizations_url: https://api.github.com/users/packit/orgs + received_events_url: https://api.github.com/users/packit/received_events + repos_url: https://api.github.com/users/packit/repos + site_admin: false + starred_url: https://api.github.com/users/packit/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/packit/subscriptions + type: Organization + url: https://api.github.com/users/packit + body: "Not sure whenre did `commands` go away, but I believe\r\nthis was\ + \ an `cruncher` archaism.\r\n\r\nMove to plans subdir also, no need\ + \ to name the test now\r\n`ci.fmf`.\r\n\r\nAnd as a last step, use our\ + \ install prepare step to install\r\nthe test requirements.\r\n\r\n\ + Signed-off-by: Miroslav Vadkerti " + changed_files: 2 + closed_at: '2021-02-18T08:42:48Z' + comments: 2 + comments_url: https://api.github.com/repos/packit/hello-world/issues/240/comments + commits: 1 + commits_url: https://api.github.com/repos/packit/hello-world/pulls/240/commits + created_at: '2021-02-17T17:10:34Z' + deletions: 9 + diff_url: https://github.com/packit/hello-world/pull/240.diff + draft: false + head: + label: thrix:fix-fmf-tests + ref: fix-fmf-tests + repo: + archive_url: https://api.github.com/repos/thrix/hello-world/{archive_format}{/ref} + archived: false + assignees_url: https://api.github.com/repos/thrix/hello-world/assignees{/user} + blobs_url: https://api.github.com/repos/thrix/hello-world/git/blobs{/sha} + branches_url: https://api.github.com/repos/thrix/hello-world/branches{/branch} + clone_url: https://github.com/thrix/hello-world.git + collaborators_url: https://api.github.com/repos/thrix/hello-world/collaborators{/collaborator} + comments_url: https://api.github.com/repos/thrix/hello-world/comments{/number} + commits_url: https://api.github.com/repos/thrix/hello-world/commits{/sha} + compare_url: https://api.github.com/repos/thrix/hello-world/compare/{base}...{head} + contents_url: https://api.github.com/repos/thrix/hello-world/contents/{+path} + contributors_url: https://api.github.com/repos/thrix/hello-world/contributors + created_at: '2021-02-10T13:48:48Z' + default_branch: main + deployments_url: https://api.github.com/repos/thrix/hello-world/deployments + description: The most progresive command-line tool in the world. + disabled: false + downloads_url: https://api.github.com/repos/thrix/hello-world/downloads + events_url: https://api.github.com/repos/thrix/hello-world/events + fork: true + forks: 0 + forks_count: 0 + forks_url: https://api.github.com/repos/thrix/hello-world/forks + full_name: thrix/hello-world + git_commits_url: https://api.github.com/repos/thrix/hello-world/git/commits{/sha} + git_refs_url: https://api.github.com/repos/thrix/hello-world/git/refs{/sha} + git_tags_url: https://api.github.com/repos/thrix/hello-world/git/tags{/sha} + git_url: git://github.com/thrix/hello-world.git + has_downloads: true + has_issues: false + has_pages: false + has_projects: true + has_wiki: true + homepage: null + hooks_url: https://api.github.com/repos/thrix/hello-world/hooks + html_url: https://github.com/thrix/hello-world + id: 337737859 + issue_comment_url: https://api.github.com/repos/thrix/hello-world/issues/comments{/number} + issue_events_url: https://api.github.com/repos/thrix/hello-world/issues/events{/number} + issues_url: https://api.github.com/repos/thrix/hello-world/issues{/number} + keys_url: https://api.github.com/repos/thrix/hello-world/keys{/key_id} + labels_url: https://api.github.com/repos/thrix/hello-world/labels{/name} + language: null + languages_url: https://api.github.com/repos/thrix/hello-world/languages + license: + key: mit + name: MIT License + node_id: MDc6TGljZW5zZTEz + spdx_id: MIT + url: https://api.github.com/licenses/mit + merges_url: https://api.github.com/repos/thrix/hello-world/merges + milestones_url: https://api.github.com/repos/thrix/hello-world/milestones{/number} + mirror_url: null + name: hello-world + node_id: MDEwOlJlcG9zaXRvcnkzMzc3Mzc4NTk= + notifications_url: https://api.github.com/repos/thrix/hello-world/notifications{?since,all,participating} + open_issues: 0 + open_issues_count: 0 + owner: + avatar_url: https://avatars.githubusercontent.com/u/633969?v=4 + events_url: https://api.github.com/users/thrix/events{/privacy} + followers_url: https://api.github.com/users/thrix/followers + following_url: https://api.github.com/users/thrix/following{/other_user} + gists_url: https://api.github.com/users/thrix/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/thrix + id: 633969 + login: thrix + node_id: MDQ6VXNlcjYzMzk2OQ== + organizations_url: https://api.github.com/users/thrix/orgs + received_events_url: https://api.github.com/users/thrix/received_events + repos_url: https://api.github.com/users/thrix/repos + site_admin: false + starred_url: https://api.github.com/users/thrix/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/thrix/subscriptions + type: User + url: https://api.github.com/users/thrix + private: false + pulls_url: https://api.github.com/repos/thrix/hello-world/pulls{/number} + pushed_at: '2021-02-17T17:10:02Z' + releases_url: https://api.github.com/repos/thrix/hello-world/releases{/id} + size: 39 + ssh_url: git@github.com:thrix/hello-world.git + stargazers_count: 0 + stargazers_url: https://api.github.com/repos/thrix/hello-world/stargazers + statuses_url: https://api.github.com/repos/thrix/hello-world/statuses/{sha} + subscribers_url: https://api.github.com/repos/thrix/hello-world/subscribers + subscription_url: https://api.github.com/repos/thrix/hello-world/subscription + svn_url: https://github.com/thrix/hello-world + tags_url: https://api.github.com/repos/thrix/hello-world/tags + teams_url: https://api.github.com/repos/thrix/hello-world/teams + trees_url: https://api.github.com/repos/thrix/hello-world/git/trees{/sha} + updated_at: '2021-02-10T13:48:49Z' + url: https://api.github.com/repos/thrix/hello-world + watchers: 0 + watchers_count: 0 + sha: dabfd3862702e49b6877da7f224e6d6458eb961a + user: + avatar_url: https://avatars.githubusercontent.com/u/633969?v=4 + events_url: https://api.github.com/users/thrix/events{/privacy} + followers_url: https://api.github.com/users/thrix/followers + following_url: https://api.github.com/users/thrix/following{/other_user} + gists_url: https://api.github.com/users/thrix/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/thrix + id: 633969 + login: thrix + node_id: MDQ6VXNlcjYzMzk2OQ== + organizations_url: https://api.github.com/users/thrix/orgs + received_events_url: https://api.github.com/users/thrix/received_events + repos_url: https://api.github.com/users/thrix/repos + site_admin: false + starred_url: https://api.github.com/users/thrix/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/thrix/subscriptions + type: User + url: https://api.github.com/users/thrix + html_url: https://github.com/packit/hello-world/pull/240 + id: 575075293 + issue_url: https://api.github.com/repos/packit/hello-world/issues/240 + labels: [] + locked: false + maintainer_can_modify: false + merge_commit_sha: f502aae6920d82948f2dba0b70c9260fb1e34822 + mergeable: null + mergeable_state: unknown + merged: true + merged_at: '2021-02-18T08:42:48Z' + merged_by: + avatar_url: https://avatars.githubusercontent.com/u/288686?v=4 + events_url: https://api.github.com/users/jpopelka/events{/privacy} + followers_url: https://api.github.com/users/jpopelka/followers + following_url: https://api.github.com/users/jpopelka/following{/other_user} + gists_url: https://api.github.com/users/jpopelka/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/jpopelka + id: 288686 + login: jpopelka + node_id: MDQ6VXNlcjI4ODY4Ng== + organizations_url: https://api.github.com/users/jpopelka/orgs + received_events_url: https://api.github.com/users/jpopelka/received_events + repos_url: https://api.github.com/users/jpopelka/repos + site_admin: false + starred_url: https://api.github.com/users/jpopelka/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/jpopelka/subscriptions + type: User + url: https://api.github.com/users/jpopelka + milestone: null + node_id: MDExOlB1bGxSZXF1ZXN0NTc1MDc1Mjkz + number: 240 + patch_url: https://github.com/packit/hello-world/pull/240.patch + rebaseable: null + requested_reviewers: [] + requested_teams: [] + review_comment_url: https://api.github.com/repos/packit/hello-world/pulls/comments{/number} + review_comments: 0 + review_comments_url: https://api.github.com/repos/packit/hello-world/pulls/240/comments + state: closed + statuses_url: https://api.github.com/repos/packit/hello-world/statuses/dabfd3862702e49b6877da7f224e6d6458eb961a + title: 'testing-farm: migrate to official TMT format' + updated_at: '2021-02-18T08:42:48Z' + url: https://api.github.com/repos/packit/hello-world/pulls/240 + user: + avatar_url: https://avatars.githubusercontent.com/u/633969?v=4 + events_url: https://api.github.com/users/thrix/events{/privacy} + followers_url: https://api.github.com/users/thrix/followers + following_url: https://api.github.com/users/thrix/following{/other_user} + gists_url: https://api.github.com/users/thrix/gists{/gist_id} + gravatar_id: '' + html_url: https://github.com/thrix + id: 633969 + login: thrix + node_id: MDQ6VXNlcjYzMzk2OQ== + organizations_url: https://api.github.com/users/thrix/orgs + received_events_url: https://api.github.com/users/thrix/received_events + repos_url: https://api.github.com/users/thrix/repos + site_admin: false + starred_url: https://api.github.com/users/thrix/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/thrix/subscriptions + type: User + url: https://api.github.com/users/thrix + _next: null + elapsed: 0.295798 + encoding: utf-8 + headers: + Access-Control-Allow-Origin: '*' + Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, + X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, + X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, + X-GitHub-Media-Type, Deprecation, Sunset + Cache-Control: private, max-age=60, s-maxage=60 + Content-Encoding: gzip + Content-Security-Policy: default-src 'none' + Content-Type: application/json; charset=utf-8 + Date: Tue, 22 Jun 2021 17:13:58 GMT + ETag: W/"8518dd9afea8e71ce1c30725e5c63f4d31c81348f35a52abaaa568fc32f852b0" + Last-Modified: Thu, 17 Jun 2021 15:45:57 GMT + Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin + Server: GitHub.com + Strict-Transport-Security: max-age=31536000; includeSubdomains; preload + Transfer-Encoding: chunked + Vary: Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, + X-Requested-With + X-Accepted-OAuth-Scopes: '' + X-Content-Type-Options: nosniff + X-Frame-Options: deny + X-GitHub-Media-Type: github.v3; format=json + X-GitHub-Request-Id: CB2F:828C:3199BA:6F6EF9:60D21A56 + X-OAuth-Scopes: notifications, repo, user, write:discussion, write:packages + X-RateLimit-Limit: '5000' + X-RateLimit-Remaining: '4998' + X-RateLimit-Reset: '1624385638' + X-RateLimit-Resource: core + X-RateLimit-Used: '2' + X-XSS-Protection: '0' + raw: !!binary "" + reason: OK + status_code: 200 diff --git a/tests/integration/github/test_pull_requests.py b/tests/integration/github/test_pull_requests.py index d5f8d113..cb5a4f8a 100644 --- a/tests/integration/github/test_pull_requests.py +++ b/tests/integration/github/test_pull_requests.py @@ -1,7 +1,7 @@ from requre.online_replacing import record_requests_for_all_methods from tests.integration.github.base import GithubTests -from ogr.abstract import PRStatus +from ogr.abstract import PRStatus, MergeCommitStatus @record_requests_for_all_methods() @@ -260,6 +260,23 @@ def test_head_commit(self): == "7cf6d0cbeca285ecbeb19a0067cb243783b3c768" ) + def test_merge_commit_sha(self): + pr240 = self.hello_world_project.get_pr(240) + assert pr240.head_commit == "dabfd3862702e49b6877da7f224e6d6458eb961a" + assert pr240.merge_commit_sha == "f502aae6920d82948f2dba0b70c9260fb1e34822" + assert pr240.merge_commit_status == MergeCommitStatus.cannot_be_merged + # ^ Because it's already merged + pr111 = self.hello_world_project.get_pr(111) + assert pr111.head_commit == "1abb19255a7c1bec7ffcae2487f022b23175af2b" + assert pr111.merge_commit_sha == "8512ef316918edc39c4a6eee13e6cc45344d03ac" + assert pr111.merge_commit_status == MergeCommitStatus.cannot_be_merged + # ^ Conflicts + pr112 = self.hello_world_project.get_pr(112) + assert pr112.head_commit == "9ab13fa4b4944510022730708045f42aea106cef" + assert pr112.merge_commit_sha == "0dc8211e10e37370f49364495249f5c693a9eff7" + assert pr112.merge_commit_status == MergeCommitStatus.can_be_merged + # ^ Not (yet) merged; good thing! (invalid specfile): + def test_source_project_upstream_branch(self): # Tests source project for PR from upstream to upstream. pr = self.hello_world_project.get_pr(72) diff --git a/tests/integration/gitlab/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml b/tests/integration/gitlab/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml new file mode 100644 index 00000000..185ecf87 --- /dev/null +++ b/tests/integration/gitlab/test_data/test_pull_requests/PullRequests.test_merge_commit_sha.yaml @@ -0,0 +1,785 @@ +_requre: + DataTypes: 1 + key_strategy: StorageKeysInspectSimple + version_storage_file: 3 +requests.sessions: + send: + GET: + https://gitlab.com/api/v4/projects/14233409/merge_requests/1: + - metadata: + latency: 0.30664944648742676 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + approvals_before_merge: 0 + assignee: null + assignees: [] + author: + avatar_url: https://secure.gravatar.com/avatar/9c8d9a288151a8e563547e082c591f2a?s=80&d=identicon + id: 4594931 + name: "Laura Barcziov\xE1" + state: active + username: lbarcziova + web_url: https://gitlab.com/lbarcziova + blocking_discussions_resolved: true + changes_count: '1' + closed_at: null + closed_by: null + created_at: '2019-09-10T14:03:24.365Z' + description: description of mergerequest + diff_refs: + base_sha: 24c86d0704694f686329b2ea636c5b7522cfdc40 + head_sha: d490ec67dd98f69dfdc1732b98bb3189f0e0aace + start_sha: 24c86d0704694f686329b2ea636c5b7522cfdc40 + discussion_locked: null + downvotes: 0 + draft: false + first_contribution: false + first_deployed_to_production_at: null + force_remove_source_branch: false + has_conflicts: false + head_pipeline: null + id: 36948617 + iid: 1 + labels: + - test_lb1 + - test_lb2 + latest_build_finished_at: null + latest_build_started_at: null + merge_commit_sha: 101a42bbbe174d04b465d49caf274dc3b4defeca + merge_error: null + merge_status: can_be_merged + merge_when_pipeline_succeeds: false + merged_at: '2019-09-11T08:55:32.822Z' + merged_by: + avatar_url: https://secure.gravatar.com/avatar/9c8d9a288151a8e563547e082c591f2a?s=80&d=identicon + id: 4594931 + name: "Laura Barcziov\xE1" + state: active + username: lbarcziova + web_url: https://gitlab.com/lbarcziova + milestone: null + pipeline: null + project_id: 14233409 + reference: '!1' + references: + full: packit-service/ogr-tests!1 + relative: '!1' + short: '!1' + reviewers: [] + sha: d490ec67dd98f69dfdc1732b98bb3189f0e0aace + should_remove_source_branch: null + source_branch: change + source_project_id: 14233409 + squash: false + squash_commit_sha: null + state: merged + subscribed: false + target_branch: master + target_project_id: 14233409 + task_completion_status: + completed_count: 0 + count: 0 + time_stats: + human_time_estimate: null + human_total_time_spent: null + time_estimate: 0 + total_time_spent: 0 + title: change + updated_at: '2020-10-12T10:29:20.574Z' + upvotes: 0 + user: + can_merge: false + user_notes_count: 3 + web_url: https://gitlab.com/packit-service/ogr-tests/-/merge_requests/1 + work_in_progress: false + _next: null + elapsed: 0.306201 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 66460703585905da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:55 GMT + Etag: W/"ed497aba09a68017b0186e3bc4a2ed49" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-03-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '18' + RateLimit-Remaining: '1982' + RateLimit-Reset: '1624538515' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:55 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K7KMY00HA1YXRP67X89K + X-Runtime: '0.170230' + cf-request-id: 0adfa2b61d000005da15af2000000001 + raw: !!binary "" + reason: OK + status_code: 200 + https://gitlab.com/api/v4/projects/14233409/merge_requests/12: + - metadata: + latency: 0.1910078525543213 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + approvals_before_merge: 0 + assignee: null + assignees: [] + author: + avatar_url: https://secure.gravatar.com/avatar/e1ae3427f994784121371108f12eceb5?s=80&d=identicon + id: 4626962 + name: jscotka + state: active + username: jscotka + web_url: https://gitlab.com/jscotka + blocking_discussions_resolved: true + changes_count: '1' + closed_at: null + closed_by: null + created_at: '2019-09-26T14:08:08.843Z' + description: '' + diff_refs: + base_sha: ff3df8288306e95ad76f803d6b9e398efe0b754d + head_sha: 2543f1728c7e1c2b8772d0dc11dc8b1870f4db60 + start_sha: ff3df8288306e95ad76f803d6b9e398efe0b754d + discussion_locked: null + downvotes: 0 + draft: false + first_contribution: false + first_deployed_to_production_at: null + force_remove_source_branch: false + has_conflicts: false + head_pipeline: null + id: 38258502 + iid: 12 + labels: [] + latest_build_finished_at: null + latest_build_started_at: null + merge_commit_sha: f6de56d97ec3ec74cd5194e79175162d9f969195 + merge_error: null + merge_status: can_be_merged + merge_when_pipeline_succeeds: false + merged_at: '2019-09-26T14:20:35.371Z' + merged_by: + avatar_url: https://secure.gravatar.com/avatar/e1ae3427f994784121371108f12eceb5?s=80&d=identicon + id: 4626962 + name: jscotka + state: active + username: jscotka + web_url: https://gitlab.com/jscotka + milestone: null + pipeline: null + project_id: 14233409 + reference: '!12' + references: + full: packit-service/ogr-tests!12 + relative: '!12' + short: '!12' + reviewers: [] + sha: 2543f1728c7e1c2b8772d0dc11dc8b1870f4db60 + should_remove_source_branch: null + source_branch: pr-test2 + source_project_id: 14233409 + squash: false + squash_commit_sha: null + state: merged + subscribed: false + target_branch: master + target_project_id: 14233409 + task_completion_status: + completed_count: 0 + count: 0 + time_stats: + human_time_estimate: null + human_total_time_spent: null + time_estimate: 0 + total_time_spent: 0 + title: Update README.md + updated_at: '2019-09-26T14:20:35.342Z' + upvotes: 0 + user: + can_merge: false + user_notes_count: 0 + web_url: https://gitlab.com/packit-service/ogr-tests/-/merge_requests/12 + work_in_progress: false + _next: null + elapsed: 0.190612 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 664607055b7305da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:56 GMT + Etag: W/"ad5d040bc99471264612002ba5f6470e" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-11-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '19' + RateLimit-Remaining: '1981' + RateLimit-Reset: '1624538516' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:56 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K7W56HSKBRQCTQDYJ42V + X-Runtime: '0.099084' + cf-request-id: 0adfa2b755000005da1c1fb000000001 + raw: !!binary "" + reason: OK + status_code: 200 + https://gitlab.com/api/v4/projects/14233409/merge_requests/19: + - metadata: + latency: 0.24100089073181152 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + approvals_before_merge: 0 + assignee: null + assignees: [] + author: + avatar_url: https://assets.gitlab-static.net/uploads/-/system/user/avatar/375555/avatar.png + id: 375555 + name: Matej Focko + state: active + username: mfocko + web_url: https://gitlab.com/mfocko + blocking_discussions_resolved: true + changes_count: '1' + closed_at: null + closed_by: null + created_at: '2019-11-26T19:39:01.381Z' + description: test2 + diff_refs: + base_sha: 3d278426b64647aa92fb63c8d7ccdb4d8c4919ff + head_sha: 59b1a9bab5b5198c619270646410867788685c16 + start_sha: 3d278426b64647aa92fb63c8d7ccdb4d8c4919ff + discussion_locked: null + downvotes: 0 + draft: false + first_contribution: false + first_deployed_to_production_at: null + force_remove_source_branch: false + has_conflicts: false + head_pipeline: null + id: 43305101 + iid: 19 + labels: [] + latest_build_finished_at: null + latest_build_started_at: null + merge_commit_sha: b8e18207cfdad954f1b3a96db34d0706b272e6cf + merge_error: null + merge_status: can_be_merged + merge_when_pipeline_succeeds: false + merged_at: '2019-11-26T19:40:49.350Z' + merged_by: + avatar_url: https://assets.gitlab-static.net/uploads/-/system/user/avatar/375555/avatar.png + id: 375555 + name: Matej Focko + state: active + username: mfocko + web_url: https://gitlab.com/mfocko + milestone: null + pipeline: null + project_id: 14233409 + reference: '!19' + references: + full: packit-service/ogr-tests!19 + relative: '!19' + short: '!19' + reviewers: [] + sha: 59b1a9bab5b5198c619270646410867788685c16 + should_remove_source_branch: null + source_branch: test_branch + source_project_id: 14233409 + squash: false + squash_commit_sha: null + state: merged + subscribed: false + target_branch: master + target_project_id: 14233409 + task_completion_status: + completed_count: 0 + count: 0 + time_stats: + human_time_estimate: null + human_total_time_spent: null + time_estimate: 0 + total_time_spent: 0 + title: Got to merge something + updated_at: '2020-10-12T10:28:51.845Z' + upvotes: 0 + user: + can_merge: false + user_notes_count: 2 + web_url: https://gitlab.com/packit-service/ogr-tests/-/merge_requests/19 + work_in_progress: false + _next: null + elapsed: 0.2406 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 664607068d3605da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:56 GMT + Etag: W/"cc755b7283fdec804dc04aa8a9f9cb5b" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-07-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '20' + RateLimit-Remaining: '1980' + RateLimit-Reset: '1624538516' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:56 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K824K3Z2PD2686EB0V7Q + X-Runtime: '0.137274' + cf-request-id: 0adfa2b81a000005da4a923000000001 + raw: !!binary "" + reason: OK + status_code: 200 + https://gitlab.com/api/v4/projects/14233409/merge_requests/79: + - metadata: + latency: 0.20970726013183594 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + allow_collaboration: true + allow_maintainer_to_push: true + approvals_before_merge: null + assignee: null + assignees: [] + author: + avatar_url: https://secure.gravatar.com/avatar/eff1ae69a40d35559a382d36b53b72d2?s=80&d=identicon + id: 2952463 + name: Jiri Popelka + state: active + username: jpopelka + web_url: https://gitlab.com/jpopelka + blocking_discussions_resolved: true + changes_count: '1' + closed_at: null + closed_by: null + created_at: '2021-06-24T12:21:59.290Z' + description: please ignore, I'm trying to create a MR with a conflict + diff_refs: + base_sha: b8e18207cfdad954f1b3a96db34d0706b272e6cf + head_sha: 45e3737aea87a9fd14adcf6a42070cb4f8665ada + start_sha: dd9b6c54c0788301c86bdf058a8e91e3594a0a17 + discussion_locked: null + downvotes: 0 + draft: false + first_contribution: false + first_deployed_to_production_at: null + force_remove_source_branch: true + has_conflicts: true + head_pipeline: null + id: 105673770 + iid: 79 + labels: [] + latest_build_finished_at: null + latest_build_started_at: null + merge_commit_sha: null + merge_error: null + merge_status: cannot_be_merged + merge_when_pipeline_succeeds: false + merged_at: null + merged_by: null + milestone: null + pipeline: null + project_id: 14233409 + reference: '!79' + references: + full: packit-service/ogr-tests!79 + relative: '!79' + short: '!79' + reviewers: [] + sha: 45e3737aea87a9fd14adcf6a42070cb4f8665ada + should_remove_source_branch: null + source_branch: create-conflict + source_project_id: 27674837 + squash: false + squash_commit_sha: null + state: opened + subscribed: false + target_branch: master + target_project_id: 14233409 + task_completion_status: + completed_count: 0 + count: 0 + time_stats: + human_time_estimate: null + human_total_time_spent: null + time_estimate: 0 + total_time_spent: 0 + title: testing conflict + updated_at: '2021-06-24T12:21:59.290Z' + upvotes: 0 + user: + can_merge: false + user_notes_count: 0 + web_url: https://gitlab.com/packit-service/ogr-tests/-/merge_requests/79 + work_in_progress: false + _next: null + elapsed: 0.209292 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 66460708182705da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:56 GMT + Etag: W/"cafe15a5a4b9a12e2b1be49e26b13157" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-04-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '21' + RateLimit-Remaining: '1979' + RateLimit-Reset: '1624538516' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:56 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K8A1QXB004AYVK1ARM1S + X-Runtime: '0.119820' + cf-request-id: 0adfa2b913000005da12968000000001 + raw: !!binary "" + reason: OK + status_code: 200 + https://gitlab.com/api/v4/projects/packit-service%2Fogr-tests: + - metadata: + latency: 0.21320104598999023 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - ogr.services.gitlab.project + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + _links: + events: https://gitlab.com/api/v4/projects/14233409/events + issues: https://gitlab.com/api/v4/projects/14233409/issues + labels: https://gitlab.com/api/v4/projects/14233409/labels + members: https://gitlab.com/api/v4/projects/14233409/members + merge_requests: https://gitlab.com/api/v4/projects/14233409/merge_requests + repo_branches: https://gitlab.com/api/v4/projects/14233409/repository/branches + self: https://gitlab.com/api/v4/projects/14233409 + allow_merge_on_skipped_pipeline: null + analytics_access_level: enabled + approvals_before_merge: 0 + archived: false + auto_cancel_pending_pipelines: enabled + auto_devops_deploy_strategy: continuous + auto_devops_enabled: false + autoclose_referenced_issues: true + avatar_url: null + build_coverage_regex: null + build_timeout: 3600 + builds_access_level: enabled + can_create_merge_request_in: true + ci_config_path: null + ci_default_git_depth: 50 + ci_forward_deployment_enabled: null + ci_job_token_scope_enabled: false + compliance_frameworks: [] + container_registry_enabled: true + container_registry_image_prefix: registry.gitlab.com/packit-service/ogr-tests + created_at: '2019-09-10T10:28:09.946Z' + creator_id: 433670 + default_branch: master + description: Testing repository for python-ogr package. | https://github.com/packit-service/ogr + emails_disabled: null + empty_repo: false + external_authorization_classification_label: '' + forking_access_level: enabled + forks_count: 8 + http_url_to_repo: https://gitlab.com/packit-service/ogr-tests.git + id: 14233409 + import_status: none + issues_access_level: enabled + issues_enabled: true + issues_template: null + jobs_enabled: true + keep_latest_artifact: true + last_activity_at: '2021-06-24T12:22:00.095Z' + lfs_enabled: true + marked_for_deletion_at: null + marked_for_deletion_on: null + merge_method: merge + merge_requests_access_level: enabled + merge_requests_enabled: true + merge_requests_template: null + mirror: false + name: ogr-tests + name_with_namespace: packit-service / ogr-tests + namespace: + avatar_url: /uploads/-/system/group/avatar/6032704/logo-square-small-borders.png + full_path: packit-service + id: 6032704 + kind: group + name: packit-service + parent_id: null + path: packit-service + web_url: https://gitlab.com/groups/packit-service + only_allow_merge_if_all_discussions_are_resolved: false + only_allow_merge_if_pipeline_succeeds: false + open_issues_count: 68 + operations_access_level: enabled + packages_enabled: true + pages_access_level: enabled + path: ogr-tests + path_with_namespace: packit-service/ogr-tests + permissions: + group_access: null + project_access: null + printing_merge_request_link_enabled: true + public_jobs: true + readme_url: https://gitlab.com/packit-service/ogr-tests/-/blob/master/README.md + remove_source_branch_after_merge: null + repository_access_level: enabled + request_access_enabled: false + requirements_enabled: true + resolve_outdated_diff_discussions: false + restrict_user_defined_variables: false + security_and_compliance_enabled: false + service_desk_address: incoming+packit-service-ogr-tests-14233409-issue-@incoming.gitlab.com + service_desk_enabled: true + shared_runners_enabled: true + shared_with_groups: [] + snippets_access_level: enabled + snippets_enabled: true + squash_option: default_off + ssh_url_to_repo: git@gitlab.com:packit-service/ogr-tests.git + star_count: 0 + suggestion_commit_message: null + tag_list: [] + topics: [] + visibility: public + web_url: https://gitlab.com/packit-service/ogr-tests + wiki_access_level: enabled + wiki_enabled: true + _next: null + elapsed: 0.212788 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 66460701fdf205da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:55 GMT + Etag: W/"30a6ab3924cc4757674331997805169d" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-05-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '19' + RateLimit-Remaining: '1981' + RateLimit-Reset: '1624538515' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:55 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K7BGEVVFRE39RK5Z2AJZ + X-Runtime: '0.118069' + cf-request-id: 0adfa2b53d000005da3a029000000001 + raw: !!binary "" + reason: OK + status_code: 200 + https://gitlab.com/api/v4/user: + - metadata: + latency: 0.39325928688049316 + module_call_list: + - unittest.case + - requre.record_and_replace + - tests.integration.gitlab.test_pull_requests + - ogr.utils + - ogr.services.gitlab.pull_request + - ogr.services.gitlab.project + - ogr.services.gitlab.service + - gitlab + - gitlab.exceptions + - gitlab.mixins + - gitlab + - requre.objects + - requre.cassette + - requests.sessions + - send + output: + __store_indicator: 2 + _content: + avatar_url: https://secure.gravatar.com/avatar/c7fe77b328a6631baf8705597be56406?s=80&d=identicon + bio: '' + bio_html: '' + bot: false + can_create_group: true + can_create_project: true + color_scheme_id: 1 + commit_email: bcrocker@redhat.com + confirmed_at: '2020-07-22T18:20:14.744Z' + created_at: '2020-07-22T18:09:47.704Z' + current_sign_in_at: '2021-06-23T12:22:43.587Z' + email: bcrocker@redhat.com + external: false + extra_shared_runners_minutes_limit: null + followers: 0 + following: 0 + id: 6466632 + identities: + - extern_uid: c7a504c0-7e21-11e6-807a-001a4a0a0045 + provider: group_saml + saml_provider_id: 1769 + job_title: '' + last_activity_on: '2021-06-24' + last_sign_in_at: '2021-06-22T17:26:14.699Z' + linkedin: '' + location: null + name: Ben Crocker + organization: null + private_profile: false + projects_limit: 100000 + pronouns: null + public_email: '' + shared_runners_minutes_limit: null + skype: '' + state: active + theme_id: 1 + twitter: '' + two_factor_enabled: false + username: bcrocker + web_url: https://gitlab.com/bcrocker + website_url: '' + work_information: null + _next: null + elapsed: 0.392854 + encoding: null + headers: + CF-Cache-Status: DYNAMIC + CF-RAY: 664606ffeac705da-IAD + Cache-Control: max-age=0, private, must-revalidate + Connection: keep-alive + Content-Encoding: gzip + Content-Type: application/json + Date: Thu, 24 Jun 2021 12:40:55 GMT + Etag: W/"495e10b7ac8e33cdfafdc8d7dede21b4" + Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" + GitLab-LB: fe-05-lb-gprd + GitLab-SV: localhost + RateLimit-Limit: '2000' + RateLimit-Observed: '18' + RateLimit-Remaining: '1982' + RateLimit-Reset: '1624538515' + RateLimit-ResetTime: Thu, 24 Jun 2021 12:41:55 GMT + Referrer-Policy: strict-origin-when-cross-origin + Server: cloudflare + Strict-Transport-Security: max-age=31536000 + Transfer-Encoding: chunked + Vary: Origin + X-Content-Type-Options: nosniff + X-Frame-Options: SAMEORIGIN + X-Request-Id: 01F8Z0K71C38MNJP9CSTC84BRV + X-Runtime: '0.114576' + cf-request-id: 0adfa2b3f6000005dadd098000000001 + raw: !!binary "" + reason: OK + status_code: 200 diff --git a/tests/integration/gitlab/test_pull_requests.py b/tests/integration/gitlab/test_pull_requests.py index 28085475..2056a763 100644 --- a/tests/integration/gitlab/test_pull_requests.py +++ b/tests/integration/gitlab/test_pull_requests.py @@ -4,7 +4,7 @@ from requre.online_replacing import record_requests_for_all_methods from tests.integration.gitlab.base import GitlabTests -from ogr.abstract import PRStatus, CommitStatus +from ogr.abstract import PRStatus, CommitStatus, MergeCommitStatus @record_requests_for_all_methods() @@ -174,6 +174,21 @@ def test_head_commit(self): == "59b1a9bab5b5198c619270646410867788685c16" ) + def test_merge_commit_sha(self): + pr1 = self.project.get_pr(1) + pr12 = self.project.get_pr(12) + pr19 = self.project.get_pr(19) + pr79 = self.project.get_pr(79) + assert pr1.merge_commit_sha == "101a42bbbe174d04b465d49caf274dc3b4defeca" + assert pr1.merge_commit_status == MergeCommitStatus.can_be_merged + assert pr12.merge_commit_sha == "f6de56d97ec3ec74cd5194e79175162d9f969195" + assert pr12.merge_commit_status == MergeCommitStatus.can_be_merged + assert pr19.merge_commit_sha == "b8e18207cfdad954f1b3a96db34d0706b272e6cf" + assert pr19.merge_commit_status == MergeCommitStatus.can_be_merged + assert pr79.head_commit == "45e3737aea87a9fd14adcf6a42070cb4f8665ada" + assert pr79.merge_commit_sha is None + assert pr79.merge_commit_status == MergeCommitStatus.cannot_be_merged + def test_source_project_upstream_branch(self): pr = self.project.get_pr(23) source_project = pr.source_project