From adf6a7b9a2185a47d09afe632e251e6733b0934f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 22 Sep 2022 11:42:51 +0200 Subject: [PATCH 1/2] Add minimal tests for GHIssue Copied from GHPullRequestTest: I'm not trying to test everything here, just to have a basic test class that I can add comment-related tests to. --- .../java/org/kohsuke/github/GHIssueTest.java | 191 ++++++++++++++++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...est-org_ghissuetest_issues_5_labels-6.json | 29 +++ ...est-org_ghissuetest_issues_5_labels-7.json | 29 +++ .../wiremock/addLabels/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 48 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...est-org_ghissuetest_issues_5_labels-5.json | 57 ++++++ ...est-org_ghissuetest_issues_5_labels-6.json | 54 +++++ ...est-org_ghissuetest_issues_5_labels-7.json | 56 +++++ .../wiremock/addLabels/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-5.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...ub4j-test-org_ghissuetest_issues_10-6.json | 61 ++++++ ...st-org_ghissuetest_issues_10_labels-7.json | 11 + ...st-org_ghissuetest_issues_10_labels-8.json | 20 ++ .../__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-5.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...ub4j-test-org_ghissuetest_issues_10-6.json | 48 +++++ ...st-org_ghissuetest_issues_10_labels-7.json | 54 +++++ ...st-org_ghissuetest_issues_10_labels-8.json | 54 +++++ .../mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-5.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-8.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...hub4j-test-org_ghissuetest_issues_2-6.json | 61 ++++++ ...hub4j-test-org_ghissuetest_issues_2-7.json | 80 ++++++++ ...hub4j-test-org_ghissuetest_issues_2-9.json | 80 ++++++++ .../wiremock/closeIssue/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-5.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-8.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...hub4j-test-org_ghissuetest_issues_2-6.json | 51 +++++ ...hub4j-test-org_ghissuetest_issues_2-7.json | 54 +++++ ...hub4j-test-org_ghissuetest_issues_2-9.json | 50 +++++ .../wiremock/closeIssue/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ .../wiremock/createIssue/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 48 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ .../wiremock/createIssue/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...-org_ghissuetest_issues_11_comments-5.json | 44 ++++ .../createIssueComment/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 48 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...-org_ghissuetest_issues_11_comments-5.json | 55 +++++ .../createIssueComment/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-5.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-7.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...s_hub4j-test-org_ghissuetest_issues-8.json | 62 ++++++ ...hub4j-test-org_ghissuetest_issues_9-6.json | 61 ++++++ .../wiremock/getUserTest/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-5.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-7.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...s_hub4j-test-org_ghissuetest_issues-8.json | 47 +++++ ...hub4j-test-org_ghissuetest_issues_9-6.json | 48 +++++ .../wiremock/getUserTest/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-6.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...hub4j-test-org_ghissuetest_issues_3-5.json | 89 ++++++++ ...hub4j-test-org_ghissuetest_issues_3-7.json | 89 ++++++++ ..._3_labels_removelabels_label_name_2-8.json | 20 ++ .../wiremock/removeLabels/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-6.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...hub4j-test-org_ghissuetest_issues_3-5.json | 54 +++++ ...hub4j-test-org_ghissuetest_issues_3-7.json | 48 +++++ ..._3_labels_removelabels_label_name_2-8.json | 47 +++++ ...3_labels_removelabels_label_name_3-10.json | 45 +++++ ...3_labels_removelabels_label_name_3-11.json | 44 ++++ ..._3_labels_removelabels_label_name_3-9.json | 50 +++++ .../removeLabels/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-6.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...hub4j-test-org_ghissuetest_issues_8-5.json | 101 +++++++++ ...hub4j-test-org_ghissuetest_issues_8-7.json | 101 +++++++++ .../wiremock/setAssignee/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-6.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...hub4j-test-org_ghissuetest_issues_8-5.json | 54 +++++ ...hub4j-test-org_ghissuetest_issues_8-7.json | 48 +++++ .../wiremock/setAssignee/mappings/user-1.json | 48 +++++ .../__files/orgs_hub4j-test-org-2.json | 62 ++++++ .../repos_hub4j-test-org_ghissuetest-3.json | 140 +++++++++++++ .../repos_hub4j-test-org_ghissuetest-6.json | 140 +++++++++++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 61 ++++++ ...hub4j-test-org_ghissuetest_issues_6-5.json | 71 +++++++ ...hub4j-test-org_ghissuetest_issues_6-7.json | 71 +++++++ .../wiremock/setLabels/__files/user-1.json | 34 ++++ .../mappings/orgs_hub4j-test-org-2.json | 48 +++++ .../repos_hub4j-test-org_ghissuetest-3.json | 51 +++++ .../repos_hub4j-test-org_ghissuetest-6.json | 50 +++++ ...s_hub4j-test-org_ghissuetest_issues-4.json | 55 +++++ ...hub4j-test-org_ghissuetest_issues_6-5.json | 54 +++++ ...hub4j-test-org_ghissuetest_issues_6-7.json | 48 +++++ .../wiremock/setLabels/mappings/user-1.json | 48 +++++ 129 files changed, 8395 insertions(+) create mode 100644 src/test/java/org/kohsuke/github/GHIssueTest.java create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-9.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-9.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues_9-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues_9-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-10.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-11.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-9.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/orgs_hub4j-test-org-2.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/user-1.json diff --git a/src/test/java/org/kohsuke/github/GHIssueTest.java b/src/test/java/org/kohsuke/github/GHIssueTest.java new file mode 100644 index 0000000000..e2c1763c63 --- /dev/null +++ b/src/test/java/org/kohsuke/github/GHIssueTest.java @@ -0,0 +1,191 @@ +package org.kohsuke.github; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.util.Collection; +import java.util.List; + +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; + +/** + * @author Kohsuke Kawaguchi + * @author Yoann Rodiere + */ +public class GHIssueTest extends AbstractGitHubWireMockTest { + + @Before + @After + public void cleanUp() throws Exception { + // Cleanup is only needed when proxying + if (!mockGitHub.isUseProxy()) { + return; + } + + for (GHIssue issue : getRepository(this.getNonRecordingGitHub()).getIssues(GHIssueState.OPEN)) { + issue.close(); + } + } + + @Test + public void createIssue() throws Exception { + String name = "createIssue"; + GHRepository repo = getRepository(); + GHIssue issue = repo.createIssue(name).body("## test").create(); + assertThat(issue.getTitle(), equalTo(name)); + } + + @Test + public void createIssueComment() throws Exception { + String name = "createIssueComment"; + GHIssue issue = getRepository().createIssue(name).body("## test").create(); + issue.comment("Some comment"); + } + + @Test + public void closeIssue() throws Exception { + String name = "closeIssue"; + GHIssue issue = getRepository().createIssue(name).body("## test").create(); + assertThat(issue.getTitle(), equalTo(name)); + assertThat(getRepository().getIssue(issue.getNumber()).getState(), equalTo(GHIssueState.OPEN)); + issue.close(); + assertThat(getRepository().getIssue(issue.getNumber()).getState(), equalTo(GHIssueState.CLOSED)); + } + + @Test + // Requires push access to the test repo to pass + public void setLabels() throws Exception { + GHIssue issue = getRepository().createIssue("setLabels").body("## test").create(); + String label = "setLabels_label_name"; + issue.setLabels(label); + + Collection labels = getRepository().getIssue(issue.getNumber()).getLabels(); + assertThat(labels.size(), equalTo(1)); + GHLabel savedLabel = labels.iterator().next(); + assertThat(savedLabel.getName(), equalTo(label)); + assertThat(savedLabel.getId(), notNullValue()); + assertThat(savedLabel.getNodeId(), notNullValue()); + assertThat(savedLabel.isDefault(), is(false)); + } + + @Test + // Requires push access to the test repo to pass + public void addLabels() throws Exception { + GHIssue issue = getRepository().createIssue("addLabels").body("## test").create(); + String addedLabel1 = "addLabels_label_name_1"; + String addedLabel2 = "addLabels_label_name_2"; + String addedLabel3 = "addLabels_label_name_3"; + + List resultingLabels = issue.addLabels(addedLabel1); + assertThat(resultingLabels.size(), equalTo(1)); + GHLabel ghLabel = resultingLabels.get(0); + assertThat(ghLabel.getName(), equalTo(addedLabel1)); + + int requestCount = mockGitHub.getRequestCount(); + resultingLabels = issue.addLabels(addedLabel2, addedLabel3); + // multiple labels can be added with one api call + assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 1)); + + assertThat(resultingLabels.size(), equalTo(3)); + assertThat(resultingLabels, + containsInAnyOrder(hasProperty("name", equalTo(addedLabel1)), + hasProperty("name", equalTo(addedLabel2)), + hasProperty("name", equalTo(addedLabel3)))); + + // Adding a label which is already present does not throw an error + resultingLabels = issue.addLabels(ghLabel); + assertThat(resultingLabels.size(), equalTo(3)); + } + + @Test + // Requires push access to the test repo to pass + public void addLabelsConcurrencyIssue() throws Exception { + String addedLabel1 = "addLabelsConcurrencyIssue_label_name_1"; + String addedLabel2 = "addLabelsConcurrencyIssue_label_name_2"; + + GHIssue issue1 = getRepository().createIssue("addLabelsConcurrencyIssue").body("## test").create(); + issue1.getLabels(); + + GHIssue issue2 = getRepository().getIssue(issue1.getNumber()); + issue2.addLabels(addedLabel2); + + Collection labels = issue1.addLabels(addedLabel1); + + assertThat(labels.size(), equalTo(2)); + assertThat(labels, + containsInAnyOrder(hasProperty("name", equalTo(addedLabel1)), + hasProperty("name", equalTo(addedLabel2)))); + } + + @Test + // Requires push access to the test repo to pass + public void removeLabels() throws Exception { + GHIssue issue = getRepository().createIssue("removeLabels").body("## test").create(); + String label1 = "removeLabels_label_name_1"; + String label2 = "removeLabels_label_name_2"; + String label3 = "removeLabels_label_name_3"; + issue.setLabels(label1, label2, label3); + + Collection labels = getRepository().getIssue(issue.getNumber()).getLabels(); + assertThat(labels.size(), equalTo(3)); + GHLabel ghLabel3 = labels.stream().filter(label -> label3.equals(label.getName())).findFirst().get(); + + int requestCount = mockGitHub.getRequestCount(); + List resultingLabels = issue.removeLabels(label2, label3); + // each label deleted is a separate api call + assertThat(mockGitHub.getRequestCount(), equalTo(requestCount + 2)); + + assertThat(resultingLabels.size(), equalTo(1)); + assertThat(resultingLabels.get(0).getName(), equalTo(label1)); + + // Removing some labels that are not present does not throw + // This is consistent with earlier behavior and with addLabels() + issue.removeLabels(ghLabel3); + + // Calling removeLabel() on label that is not present will throw + try { + issue.removeLabel(label3); + fail("Expected GHFileNotFoundException"); + } catch (GHFileNotFoundException e) { + assertThat(e.getMessage(), containsString("Label does not exist")); + } + } + + @Test + // Requires push access to the test repo to pass + public void setAssignee() throws Exception { + GHIssue issue = getRepository().createIssue("setAssignee").body("## test").create(); + GHMyself user = gitHub.getMyself(); + issue.assignTo(user); + + assertThat(getRepository().getIssue(issue.getNumber()).getAssignee(), equalTo(user)); + } + + @Test + public void getUserTest() throws IOException { + GHIssue issue = getRepository().createIssue("getUserTest").create(); + GHIssue issueSingle = getRepository().getIssue(issue.getNumber()); + assertThat(issueSingle.getUser().root(), notNullValue()); + + PagedIterable ghIssues = getRepository().listIssues(GHIssueState.OPEN); + for (GHIssue otherIssue : ghIssues) { + assertThat(otherIssue.getUser().root(), notNullValue()); + } + } + + protected GHRepository getRepository() throws IOException { + return getRepository(gitHub); + } + + private GHRepository getRepository(GitHub gitHub) throws IOException { + return gitHub.getOrganization(GITHUB_API_TEST_ORG).getRepository("GHIssueTest"); + } + +} diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..1cf04d6c07 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTXQCFHZ364O4YRVRITDFQZIY", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..38fafe1e40 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/5", + "id": 1382170906, + "node_id": "I_kwDOIC5ExM5SYkEa", + "number": 5, + "title": "addLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:49Z", + "updated_at": "2022-09-22T09:56:49Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json new file mode 100644 index 0000000000..24eedc0b5e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json @@ -0,0 +1,29 @@ +[ + { + "id": 4563124459, + "node_id": "LA_kwDOIC5ExM8AAAABD_vA6w", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_1", + "name": "addLabels_label_name_1", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563124522, + "node_id": "LA_kwDOIC5ExM8AAAABD_vBKg", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_2", + "name": "addLabels_label_name_2", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563124523, + "node_id": "LA_kwDOIC5ExM8AAAABD_vBKw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_3", + "name": "addLabels_label_name_3", + "color": "ededed", + "default": false, + "description": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json new file mode 100644 index 0000000000..24eedc0b5e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json @@ -0,0 +1,29 @@ +[ + { + "id": 4563124459, + "node_id": "LA_kwDOIC5ExM8AAAABD_vA6w", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_1", + "name": "addLabels_label_name_1", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563124522, + "node_id": "LA_kwDOIC5ExM8AAAABD_vBKg", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_2", + "name": "addLabels_label_name_2", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563124523, + "node_id": "LA_kwDOIC5ExM8AAAABD_vBKw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_3", + "name": "addLabels_label_name_3", + "color": "ededed", + "default": false, + "description": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..79ef9b4ed6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "3fbdf35c-3b7e-414b-a64e-81dc05b9aa11", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:48 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4873", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "127", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E5B5:AA4E:97D547C:9A11CB4:632C3160" + } + }, + "uuid": "3fbdf35c-3b7e-414b-a64e-81dc05b9aa11", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..6215a05a86 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,48 @@ +{ + "id": "c482fc82-e5e3-4d86-9b19-868472655aad", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:48 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4872", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "128", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D211:5D3D:A238C47:A47972A:632C3160" + } + }, + "uuid": "c482fc82-e5e3-4d86-9b19-868472655aad", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..11e5a3c046 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "9d3c503c-5053-4466-853e-69e1bd3d8702", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"addLabels\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"30bb891c883e47c2d23757ef3e90614e1526cf4f68b6b9496e94c261dc5dc502\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4871", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "129", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EC52:2C44:972736B:995F490:632C3160", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/5" + } + }, + "uuid": "9d3c503c-5053-4466-853e-69e1bd3d8702", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-5.json new file mode 100644 index 0000000000..c026133adb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-5.json @@ -0,0 +1,57 @@ +{ + "id": "29f74017-4392-4702-88db-a3d1170c0ead", + "name": "repos_hub4j-test-org_ghissuetest_issues_5_labels", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/5/labels", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"addLabels_label_name_1\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "body": "[{\"id\":4563124459,\"node_id\":\"LA_kwDOIC5ExM8AAAABD_vA6w\",\"url\":\"https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabels_label_name_1\",\"name\":\"addLabels_label_name_1\",\"color\":\"ededed\",\"default\":false,\"description\":null}]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:49 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8dd45248ecbe504cead8f206c42aa9b45703454d518860db6d930e804ec2cec3\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4870", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "130", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EC2C:A95E:64D4707:6667696:632C3161" + } + }, + "uuid": "29f74017-4392-4702-88db-a3d1170c0ead", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-5-labels", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-5-labels-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json new file mode 100644 index 0000000000..c2ee44812e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json @@ -0,0 +1,54 @@ +{ + "id": "90c2617f-6a63-4f07-b6b7-f4159e05280d", + "name": "repos_hub4j-test-org_ghissuetest_issues_5_labels", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/5/labels", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"addLabels_label_name_2\",\"addLabels_label_name_3\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_5_labels-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"963752c47cedb1279c3660a27d41c73fcee070c6e07aed68bf6cc60cc6690cd1\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4869", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "131", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DBC6:8EE4:DB507C:DF0A21:632C3162" + } + }, + "uuid": "90c2617f-6a63-4f07-b6b7-f4159e05280d", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json new file mode 100644 index 0000000000..68b0cba470 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json @@ -0,0 +1,56 @@ +{ + "id": "dee9d6fe-da81-4107-a9ad-c206543957c7", + "name": "repos_hub4j-test-org_ghissuetest_issues_5_labels", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/5/labels", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"addLabels_label_name_1\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_5_labels-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:51 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"963752c47cedb1279c3660a27d41c73fcee070c6e07aed68bf6cc60cc6690cd1\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4868", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "132", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CBA0:9FDD:4C36874:4D6F2E7:632C3163" + } + }, + "uuid": "dee9d6fe-da81-4107-a9ad-c206543957c7", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-5-labels", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-5-labels-2", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/user-1.json new file mode 100644 index 0000000000..13283cb2af --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabels/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "4215097b-a17d-4557-ad75-b2d8a4ff58fd", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:47 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4878", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "122", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EA0A:33AC:A6FAC0A:A9361DE:632C315E" + } + }, + "uuid": "4215097b-a17d-4557-ad75-b2d8a4ff58fd", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..0bd68af233 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTWWXKL6OZOIJEABRBDDFQZK2", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..72374fab2c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTRBCE6X3LYNJUZSQYDDFQZK4", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..c694a5c5b3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/10", + "id": 1382171684, + "node_id": "I_kwDOIC5ExM5SYkQk", + "number": 10, + "title": "addLabelsConcurrencyIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:22Z", + "updated_at": "2022-09-22T09:57:22Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10-6.json new file mode 100644 index 0000000000..c694a5c5b3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10-6.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/10", + "id": 1382171684, + "node_id": "I_kwDOIC5ExM5SYkQk", + "number": 10, + "title": "addLabelsConcurrencyIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:22Z", + "updated_at": "2022-09-22T09:57:22Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json new file mode 100644 index 0000000000..2cc5202394 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json @@ -0,0 +1,11 @@ +[ + { + "id": 4563126475, + "node_id": "LA_kwDOIC5ExM8AAAABD_vIyw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabelsConcurrencyIssue_label_name_2", + "name": "addLabelsConcurrencyIssue_label_name_2", + "color": "ededed", + "default": false, + "description": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json new file mode 100644 index 0000000000..be3a390c2e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json @@ -0,0 +1,20 @@ +[ + { + "id": 4563126475, + "node_id": "LA_kwDOIC5ExM8AAAABD_vIyw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabelsConcurrencyIssue_label_name_2", + "name": "addLabelsConcurrencyIssue_label_name_2", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563126503, + "node_id": "LA_kwDOIC5ExM8AAAABD_vI5w", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/addLabelsConcurrencyIssue_label_name_1", + "name": "addLabelsConcurrencyIssue_label_name_1", + "color": "ededed", + "default": false, + "description": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..9fa88ca501 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "e2665a26-bc4b-47e8-b13c-23ca40cb97bf", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4804", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "196", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C97E:DF11:9B5689F:9D94C10:632C3180" + } + }, + "uuid": "e2665a26-bc4b-47e8-b13c-23ca40cb97bf", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..b0f6f7a669 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "aef62a6f-fdeb-478c-9e46-ebed01d04313", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4803", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "197", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C980:0BB5:90FD042:933577B:632C3181" + } + }, + "uuid": "aef62a6f-fdeb-478c-9e46-ebed01d04313", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..d2cc23c281 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,50 @@ +{ + "id": "9d790305-7e62-4ac6-b087-5b9b29b8d578", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4801", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "199", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C992:5420:9414A95:964F376:632C3182" + } + }, + "uuid": "9d790305-7e62-4ac6-b087-5b9b29b8d578", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..19315fb58c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "aa7d9bfd-8278-4e7c-9c77-f01cf6e1d035", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"addLabelsConcurrencyIssue\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"cc5a3f28118dcdbc63fa1da7ec8666e8a6cf9aa3c0304f28f7bb5861485ce250\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4802", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "198", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C986:5103:940A302:9645AD3:632C3181", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/10" + } + }, + "uuid": "aa7d9bfd-8278-4e7c-9c77-f01cf6e1d035", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10-6.json new file mode 100644 index 0000000000..8477af0ed4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10-6.json @@ -0,0 +1,48 @@ +{ + "id": "2dfa9293-1396-4e30-9ab3-b516e5c6882d", + "name": "repos_hub4j-test-org_ghissuetest_issues_10", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/10", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_10-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"cc5a3f28118dcdbc63fa1da7ec8666e8a6cf9aa3c0304f28f7bb5861485ce250\"", + "Last-Modified": "Thu, 22 Sep 2022 09:57:22 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4800", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "200", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A2:DF11:9B57082:9D95418:632C3182" + } + }, + "uuid": "2dfa9293-1396-4e30-9ab3-b516e5c6882d", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json new file mode 100644 index 0000000000..45cc94106a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json @@ -0,0 +1,54 @@ +{ + "id": "28cef0cb-6da3-412e-9a9f-93cfac7dba50", + "name": "repos_hub4j-test-org_ghissuetest_issues_10_labels", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/10/labels", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"addLabelsConcurrencyIssue_label_name_2\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_10_labels-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"42f810a175a4ecef5865726bbc90f788ed716921301b2688a9bbdb7e48276804\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4799", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "201", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9A4:10DC3:A23569B:A479B90:632C3183" + } + }, + "uuid": "28cef0cb-6da3-412e-9a9f-93cfac7dba50", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json new file mode 100644 index 0000000000..5fd60286d1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json @@ -0,0 +1,54 @@ +{ + "id": "78395e6e-a580-49fa-a023-e58e7d23363a", + "name": "repos_hub4j-test-org_ghissuetest_issues_10_labels", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/10/labels", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"addLabelsConcurrencyIssue_label_name_1\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_10_labels-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"1cfee8eaa75ffb3d4985a457cc965eda11427e39b7b0ad2d6dca9de72015d230\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4798", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "202", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C9AC:644B:3C6B3D8:3D6CAD9:632C3184" + } + }, + "uuid": "78395e6e-a580-49fa-a023-e58e7d23363a", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/user-1.json new file mode 100644 index 0000000000..e8271ab4cb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/addLabelsConcurrencyIssue/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "cad9bdc7-fa9d-4fc8-a5ac-53d8132a9e94", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4809", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "191", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C974:33AC:A703F09:A93F6F0:632C317F" + } + }, + "uuid": "cad9bdc7-fa9d-4fc8-a5ac-53d8132a9e94", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..c0fcaa9e3c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTTNCRTRVWBLX5DQ423DFQZHS", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..31b3e7433c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTU2IPJVGSA7MDTBYYLDFQZHU", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-8.json new file mode 100644 index 0000000000..f19253b086 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest-8.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTQ3RQYZTG2VDP4I36TDFQZHY", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..385f7f1fc3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/2", + "id": 1382170446, + "node_id": "I_kwDOIC5ExM5SYj9O", + "number": 2, + "title": "closeIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:30Z", + "updated_at": "2022-09-22T09:56:30Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-6.json new file mode 100644 index 0000000000..385f7f1fc3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-6.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/2", + "id": 1382170446, + "node_id": "I_kwDOIC5ExM5SYj9O", + "number": 2, + "title": "closeIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:30Z", + "updated_at": "2022-09-22T09:56:30Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-7.json new file mode 100644 index 0000000000..67d988901e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-7.json @@ -0,0 +1,80 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/2", + "id": 1382170446, + "node_id": "I_kwDOIC5ExM5SYj9O", + "number": 2, + "title": "closeIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "closed", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:30Z", + "updated_at": "2022-09-22T09:56:31Z", + "closed_at": "2022-09-22T09:56:31Z", + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/timeline", + "performed_via_github_app": null, + "state_reason": "completed" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-9.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-9.json new file mode 100644 index 0000000000..67d988901e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/repos_hub4j-test-org_ghissuetest_issues_2-9.json @@ -0,0 +1,80 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/2", + "id": 1382170446, + "node_id": "I_kwDOIC5ExM5SYj9O", + "number": 2, + "title": "closeIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "closed", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:30Z", + "updated_at": "2022-09-22T09:56:31Z", + "closed_at": "2022-09-22T09:56:31Z", + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2/timeline", + "performed_via_github_app": null, + "state_reason": "completed" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..5cca9b485c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "1a0937e0-b736-4a54-86d8-13aee7fd3db4", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4917", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "83", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DC9A:5103:93FCFD9:96384D4:632C314D" + } + }, + "uuid": "1a0937e0-b736-4a54-86d8-13aee7fd3db4", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..6cda589601 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "2ce7af8f-4601-4ad2-9c19-eac51e079b03", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4916", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "84", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F165:2C44:97223AD:995A3E2:632C314D" + } + }, + "uuid": "2ce7af8f-4601-4ad2-9c19-eac51e079b03", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..e687fbbc50 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,51 @@ +{ + "id": "672ad408-5d0a-4817-9501-e2a067597f1c", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4914", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "86", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E411:5103:93FD577:9638A95:632C314E" + } + }, + "uuid": "672ad408-5d0a-4817-9501-e2a067597f1c", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-3", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-8.json new file mode 100644 index 0000000000..6a9e7a9101 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest-8.json @@ -0,0 +1,50 @@ +{ + "id": "64d9fa03-a06e-47ea-a254-66361c3cf910", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4911", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "89", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F6A8:A95E:64D0683:666351E:632C3150" + } + }, + "uuid": "64d9fa03-a06e-47ea-a254-66361c3cf910", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-3", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..df9a6843dd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "3ca5f1cd-2ccd-464b-8374-fe7794670e7d", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"closeIssue\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"6a7e1b8053cf334c096601b11ef39e8bdc6d5cf13a5a01c298a44cf038d680dd\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4915", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "85", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C8F9:5103:93FD2FB:9638804:632C314D", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/2" + } + }, + "uuid": "3ca5f1cd-2ccd-464b-8374-fe7794670e7d", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-6.json new file mode 100644 index 0000000000..b7e43ba01d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-6.json @@ -0,0 +1,51 @@ +{ + "id": "92944bd9-f048-49a8-9061-358058f8a63f", + "name": "repos_hub4j-test-org_ghissuetest_issues_2", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/2", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_2-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"6a7e1b8053cf334c096601b11ef39e8bdc6d5cf13a5a01c298a44cf038d680dd\"", + "Last-Modified": "Thu, 22 Sep 2022 09:56:30 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4913", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "87", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "FA3F:5103:93FD6F1:9638C0A:632C314F" + } + }, + "uuid": "92944bd9-f048-49a8-9061-358058f8a63f", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-2", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-2-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-7.json new file mode 100644 index 0000000000..f132c47997 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-7.json @@ -0,0 +1,54 @@ +{ + "id": "cb71760a-4d04-4843-b808-cc51a4281536", + "name": "repos_hub4j-test-org_ghissuetest_issues_2", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/2", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"state\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_2-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8db07db774417cdefc05c3f517a7b1bafd8e4455e81f0df37f0474700772a783\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4912", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "88", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E441:082A:969E74B:98D63BA:632C314F" + } + }, + "uuid": "cb71760a-4d04-4843-b808-cc51a4281536", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-9.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-9.json new file mode 100644 index 0000000000..e341a5377c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/repos_hub4j-test-org_ghissuetest_issues_2-9.json @@ -0,0 +1,50 @@ +{ + "id": "1ae0465a-a383-4657-b79f-e4e221dbf98a", + "name": "repos_hub4j-test-org_ghissuetest_issues_2", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/2", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_2-9.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8db07db774417cdefc05c3f517a7b1bafd8e4455e81f0df37f0474700772a783\"", + "Last-Modified": "Thu, 22 Sep 2022 09:56:31 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4910", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "90", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D0A1:8EE4:DB12C0:DECB58:632C3150" + } + }, + "uuid": "1ae0465a-a383-4657-b79f-e4e221dbf98a", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-2", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-2-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/user-1.json new file mode 100644 index 0000000000..6313b06664 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "7f4b08da-853c-480c-afb3-d4ae0ac24704", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:26 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4923", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "77", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DF74:C712:A021950:A269664:632C314A" + } + }, + "uuid": "7f4b08da-853c-480c-afb3-d4ae0ac24704", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..54e6028f47 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTRCJXWG6UZFC7Q6KRLDFQZIQ", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..320e7bc424 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/4", + "id": 1382170832, + "node_id": "I_kwDOIC5ExM5SYkDQ", + "number": 4, + "title": "createIssue", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:45Z", + "updated_at": "2022-09-22T09:56:45Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..cb037bb41c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "84bd4f92-22d7-413f-8bc9-197c0a4c917c", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4884", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "116", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C289:10DC3:A22B210:A46F4CD:632C315C" + } + }, + "uuid": "84bd4f92-22d7-413f-8bc9-197c0a4c917c", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..47dec3a957 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,48 @@ +{ + "id": "984e33df-0ad0-4887-93c6-e28c3992da9e", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4883", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "117", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E6BF:0BC9:B51948B:B74E79A:632C315C" + } + }, + "uuid": "984e33df-0ad0-4887-93c6-e28c3992da9e", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..00b6ae38bc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "5cecda11-d6a7-47ea-a11b-ef3ed9b71617", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"createIssue\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:45 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"45661893439e57b8df1c7452186348e84c0f7a80709512440eb31473dff467e7\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4882", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "118", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EA75:A95E:64D3880:66667C7:632C315D", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/4" + } + }, + "uuid": "5cecda11-d6a7-47ea-a11b-ef3ed9b71617", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/user-1.json new file mode 100644 index 0000000000..be1eda1c7e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssue/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "94b1a0f5-d8cd-4856-b6a9-28870940add7", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:42 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4889", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "111", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F456:082A:96A10AE:98D8D80:632C315A" + } + }, + "uuid": "94b1a0f5-d8cd-4856-b6a9-28870940add7", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..00a6eae928 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 38, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..2edca51325 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTVSNXJAAABQRALMHX3DFQ3OK", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..18e0a1eeff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/11", + "id": 1382197385, + "node_id": "I_kwDOIC5ExM5SYqiJ", + "number": 11, + "title": "createIssueComment", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T10:15:21Z", + "updated_at": "2022-09-22T10:15:21Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json new file mode 100644 index 0000000000..45001afdfe --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json @@ -0,0 +1,44 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/11#issuecomment-1254818709", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11", + "id": 1254818709, + "node_id": "IC_kwDOIC5ExM5KywOV", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?u=952a892aea58858acd1668c10aa6c36ba3dcd7b5&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:15:22Z", + "updated_at": "2022-09-22T10:15:22Z", + "author_association": "NONE", + "body": "Some comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json new file mode 100644 index 0000000000..6cbb51aae1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-22T10:12:47Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..02bc07b6f4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "782fec21-40f4-4fe8-87e6-9f328d1e565d", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:15:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"fd5df5bd73106f275e6fe9f78f0d8acc4551774eae3e2e391588d01d0bc6d21f\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4789", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "211", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E2AC:9FDD:4D59731:4E961EF:632C35B8" + } + }, + "uuid": "782fec21-40f4-4fe8-87e6-9f328d1e565d", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..088a1b30be --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,48 @@ +{ + "id": "067b933a-91dc-4e20-8b25-52bf103a1d58", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:15:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4788", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "212", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CC66:9FDD:4D598A7:4E9637A:632C35B9" + } + }, + "uuid": "067b933a-91dc-4e20-8b25-52bf103a1d58", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..9ac0e69aac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "5102f8cf-d607-4a67-b157-bfadc243a1cc", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"createIssueComment\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:15:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"5c6969f08d2f87426cf9b8270d60ac74e95d26a5fb5fe87a27cd6c2931129759\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4787", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "213", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E9ED:5103:9522D4B:97623E4:632C35B9", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11" + } + }, + "uuid": "5102f8cf-d607-4a67-b157-bfadc243a1cc", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json new file mode 100644 index 0000000000..9954f77914 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json @@ -0,0 +1,55 @@ +{ + "id": "dfa922c7-c9fa-4c60-b76f-427ab656fb9d", + "name": "repos_hub4j-test-org_ghissuetest_issues_11_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/11/comments", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"body\":\"Some comment\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:15:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"3fef745c8d9fe7f16dd908e6ab108846459a987ac3f1ddd528c4dc7c74aa16d2\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4786", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "214", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C791:5D3D:A36CC27:A5B1853:632C35BA", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709" + } + }, + "uuid": "dfa922c7-c9fa-4c60-b76f-427ab656fb9d", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json new file mode 100644 index 0000000000..b332d26e7e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "d167430d-0fa6-4993-80ea-5243b8b471e0", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:15:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"32b033573dc38d4e52ca1ad7c3f276480abd6cc661590bac0e37e012d54b0aa6\"", + "Last-Modified": "Thu, 22 Sep 2022 10:12:47 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4794", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "206", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DB8B:12B09:59D06F0:5B4A0AD:632C35B7" + } + }, + "uuid": "d167430d-0fa6-4993-80ea-5243b8b471e0", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..4dd65cc1a8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTSRKQRFCY474X7I4W3DFQZKM", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..de18b036a9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTSRSWOR476DZRLOEHLDFQZKO", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-7.json new file mode 100644 index 0000000000..5310b16314 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest-7.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTR4FP7KGMJIDDLLDDDDFQZKS", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..b7eeebf613 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/9", + "id": 1382171511, + "node_id": "I_kwDOIC5ExM5SYkN3", + "number": 9, + "title": "getUserTest", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:14Z", + "updated_at": "2022-09-22T09:57:14Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": null, + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-8.json new file mode 100644 index 0000000000..7889315528 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues-8.json @@ -0,0 +1,62 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/9", + "id": 1382171511, + "node_id": "I_kwDOIC5ExM5SYkN3", + "number": 9, + "title": "getUserTest", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:14Z", + "updated_at": "2022-09-22T09:57:14Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/timeline", + "performed_via_github_app": null, + "state_reason": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues_9-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues_9-6.json new file mode 100644 index 0000000000..b7eeebf613 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/repos_hub4j-test-org_ghissuetest_issues_9-6.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/9", + "id": 1382171511, + "node_id": "I_kwDOIC5ExM5SYkN3", + "number": 9, + "title": "getUserTest", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:14Z", + "updated_at": "2022-09-22T09:57:14Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": null, + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..43ae79c3cc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "3417ab15-fe0d-40b1-b2d7-408c73b83648", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:13 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4819", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "181", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1EC:DF11:9B549E7:9D92CF1:632C3179" + } + }, + "uuid": "3417ab15-fe0d-40b1-b2d7-408c73b83648", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..0736767546 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "7b6021a3-06d9-4cdd-9737-122398150c8b", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4818", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "182", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1FC:33AC:A7027DE:A93DF7B:632C317A" + } + }, + "uuid": "7b6021a3-06d9-4cdd-9737-122398150c8b", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-5.json new file mode 100644 index 0000000000..8efd774b34 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-5.json @@ -0,0 +1,51 @@ +{ + "id": "ba156749-d956-48d2-8b64-975b7fd7b244", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:15 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4816", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "184", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E20A:8EE4:DBAA52:DF6564:632C317B" + } + }, + "uuid": "ba156749-d956-48d2-8b64-975b7fd7b244", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-3", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-7.json new file mode 100644 index 0000000000..95912c3684 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest-7.json @@ -0,0 +1,50 @@ +{ + "id": "ff0f16dc-e2a6-47b4-99af-7268cb47c094", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:17 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4814", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "186", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C960:B08A:7D8AC50:7F82732:632C317C" + } + }, + "uuid": "ff0f16dc-e2a6-47b4-99af-7268cb47c094", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-3", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..34e063ec37 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "11b68a17-a1d3-462a-9cf0-468f89a14255", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"getUserTest\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7111b4a67dfc408c602b7f9eba375fed5351530b5c28f487222b11aa77615ef\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4817", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "183", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E200:9FDD:4C3D1E9:4D75DBF:632C317A", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/9" + } + }, + "uuid": "11b68a17-a1d3-462a-9cf0-468f89a14255", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-8.json new file mode 100644 index 0000000000..556094155f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues-8.json @@ -0,0 +1,47 @@ +{ + "id": "6919b78c-8288-4610-9191-5bf4b29a1226", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues?state=open", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:17 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"4d8e09b3132e055afbd167f6f3e69a507ee51da8435bcd7a63b3490ebb513183\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4813", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "187", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C964:6970:9ED8741:A113FD1:632C317D" + } + }, + "uuid": "6919b78c-8288-4610-9191-5bf4b29a1226", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues_9-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues_9-6.json new file mode 100644 index 0000000000..5de5d83c75 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/repos_hub4j-test-org_ghissuetest_issues_9-6.json @@ -0,0 +1,48 @@ +{ + "id": "f2bca62f-2392-4263-836a-e540727bdbcd", + "name": "repos_hub4j-test-org_ghissuetest_issues_9", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/9", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_9-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:15 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"c7111b4a67dfc408c602b7f9eba375fed5351530b5c28f487222b11aa77615ef\"", + "Last-Modified": "Thu, 22 Sep 2022 09:57:14 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4815", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "185", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C95C:0BC9:B52212C:B75760A:632C317B" + } + }, + "uuid": "f2bca62f-2392-4263-836a-e540727bdbcd", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/user-1.json new file mode 100644 index 0000000000..6a12de714c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/getUserTest/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "cc1e14ae-d6b6-4028-b769-af43add573d2", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:12 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4824", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "176", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1E0:CC72:5B69106:5CE4F8A:632C3177" + } + }, + "uuid": "cc1e14ae-d6b6-4028-b769-af43add573d2", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..74955f8242 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTXLXAEEJE2XBUVJOY3DFQZH6", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..4f162bc30d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTWJV6Z77AL27XKINHDDFQZIC", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..baae396766 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/3", + "id": 1382170593, + "node_id": "I_kwDOIC5ExM5SYj_h", + "number": 3, + "title": "removeLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:35Z", + "updated_at": "2022-09-22T09:56:35Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-5.json new file mode 100644 index 0000000000..6d12d629bd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-5.json @@ -0,0 +1,89 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/3", + "id": 1382170593, + "node_id": "I_kwDOIC5ExM5SYj_h", + "number": 3, + "title": "removeLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 4563123625, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9qQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_1", + "name": "removeLabels_label_name_1", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563123627, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9qw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_2", + "name": "removeLabels_label_name_2", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563123629, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9rQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_3", + "name": "removeLabels_label_name_3", + "color": "ededed", + "default": false, + "description": null + } + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:35Z", + "updated_at": "2022-09-22T09:56:36Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-7.json new file mode 100644 index 0000000000..6d12d629bd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3-7.json @@ -0,0 +1,89 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/3", + "id": 1382170593, + "node_id": "I_kwDOIC5ExM5SYj_h", + "number": 3, + "title": "removeLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 4563123625, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9qQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_1", + "name": "removeLabels_label_name_1", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563123627, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9qw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_2", + "name": "removeLabels_label_name_2", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563123629, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9rQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_3", + "name": "removeLabels_label_name_3", + "color": "ededed", + "default": false, + "description": null + } + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:35Z", + "updated_at": "2022-09-22T09:56:36Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json new file mode 100644 index 0000000000..80e2e7fb34 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json @@ -0,0 +1,20 @@ +[ + { + "id": 4563123625, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9qQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_1", + "name": "removeLabels_label_name_1", + "color": "ededed", + "default": false, + "description": null + }, + { + "id": 4563123629, + "node_id": "LA_kwDOIC5ExM8AAAABD_u9rQ", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_3", + "name": "removeLabels_label_name_3", + "color": "ededed", + "default": false, + "description": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..55fadd0cfa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "95f107d4-c769-4b24-a9c4-44c92751a424", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4902", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "98", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C61C:12B09:58BAFC5:5A308FC:632C3152" + } + }, + "uuid": "95f107d4-c769-4b24-a9c4-44c92751a424", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..e161c5de4a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "60c0a92c-8c04-456e-a993-b4594705f659", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4901", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "99", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D84B:0BB5:90F1AF7:9329FC9:632C3153" + } + }, + "uuid": "60c0a92c-8c04-456e-a993-b4594705f659", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..92d2a901f3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,50 @@ +{ + "id": "f41d680a-ce44-4c2a-8aa3-87a67d36381f", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4898", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "102", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DB3F:A95E:64D1C41:6664B16:632C3155" + } + }, + "uuid": "f41d680a-ce44-4c2a-8aa3-87a67d36381f", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..559397178a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "2b720948-b3de-41bf-9e83-423e25daa865", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"removeLabels\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"3b87c9c19a8975ad48506503031c8b97b15a177cc877dbf119792c5969419f15\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4900", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "100", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D8F7:12B09:58BB2B2:5A30C04:632C3153", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/3" + } + }, + "uuid": "2b720948-b3de-41bf-9e83-423e25daa865", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-5.json new file mode 100644 index 0000000000..0e57f80b22 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-5.json @@ -0,0 +1,54 @@ +{ + "id": "e979c5aa-6569-498f-9aec-5352d2112cfb", + "name": "repos_hub4j-test-org_ghissuetest_issues_3", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"removeLabels_label_name_1\",\"removeLabels_label_name_2\",\"removeLabels_label_name_3\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_3-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"1f66f7e96d5c6af037bc31bdaaa74a8046f4302c83de42d73b4de5eafee4bd5c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4899", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "101", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E4F6:10DC3:A22933B:A46D585:632C3154" + } + }, + "uuid": "e979c5aa-6569-498f-9aec-5352d2112cfb", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-7.json new file mode 100644 index 0000000000..785b5e6128 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3-7.json @@ -0,0 +1,48 @@ +{ + "id": "c23027d3-9e92-478f-b32b-a619c68e451a", + "name": "repos_hub4j-test-org_ghissuetest_issues_3", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_3-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"1f66f7e96d5c6af037bc31bdaaa74a8046f4302c83de42d73b4de5eafee4bd5c\"", + "Last-Modified": "Thu, 22 Sep 2022 09:56:36 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4897", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "103", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C411:9FDD:4C32FCB:4D6B985:632C3155" + } + }, + "uuid": "c23027d3-9e92-478f-b32b-a619c68e451a", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json new file mode 100644 index 0000000000..6e94116ae5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json @@ -0,0 +1,47 @@ +{ + "id": "5802b083-70a0-48d0-b7a4-6c1341a45383", + "name": "repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3/labels/removeLabels_label_name_2", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_2-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"4968a84dc7702ec30d8c43c25498af7ea29146f94a2d242d2e1b42f25fb44477\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4896", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "104", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D315:B08A:7D7FE0B:7F776A7:632C3156" + } + }, + "uuid": "5802b083-70a0-48d0-b7a4-6c1341a45383", + "persistent": true, + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-10.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-10.json new file mode 100644 index 0000000000..a02849db21 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-10.json @@ -0,0 +1,45 @@ +{ + "id": "8d05a7da-d293-4476-8964-6f04d24ed2cd", + "name": "repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3/labels/removeLabels_label_name_3", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Label does not exist\",\"documentation_url\":\"https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue\"}", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4894", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "106", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "E4FB:AA4E:97D30A2:9A0F845:632C3157" + } + }, + "uuid": "8d05a7da-d293-4476-8964-6f04d24ed2cd", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3-2", + "newScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3-3", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-11.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-11.json new file mode 100644 index 0000000000..e47b40698f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-11.json @@ -0,0 +1,44 @@ +{ + "id": "88617963-d751-477a-8062-14a372beb7fa", + "name": "repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3/labels/removeLabels_label_name_3", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Label does not exist\",\"documentation_url\":\"https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue\"}", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4893", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "107", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "Vary": "Accept-Encoding, Accept, X-Requested-With", + "X-GitHub-Request-Id": "F382:C712:A024D00:A26CAE7:632C3157" + } + }, + "uuid": "88617963-d751-477a-8062-14a372beb7fa", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3-3", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-9.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-9.json new file mode 100644 index 0000000000..2f4f874cdc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3-9.json @@ -0,0 +1,50 @@ +{ + "id": "f8725936-6466-42ec-afee-43e799ac5210", + "name": "repos_hub4j-test-org_ghissuetest_issues_3_labels_removelabels_label_name_3", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/3/labels/removeLabels_label_name_3", + "method": "DELETE", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[{\"id\":4563123625,\"node_id\":\"LA_kwDOIC5ExM8AAAABD_u9qQ\",\"url\":\"https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/removeLabels_label_name_1\",\"name\":\"removeLabels_label_name_1\",\"color\":\"ededed\",\"default\":false,\"description\":null}]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8a32c2a8982fdbf4a8ec92e7b46a97c30897c771591f8d2965fe27ba53d76aba\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4895", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "105", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D22C:5420:9409A63:96440B2:632C3156" + } + }, + "uuid": "f8725936-6466-42ec-afee-43e799ac5210", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-3-labels-removeLabels_label_name_3-2", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/user-1.json new file mode 100644 index 0000000000..3c8a0ae668 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/removeLabels/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "1c4402c0-ee54-44e8-b132-4dc4cc9c4d10", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4907", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "93", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D849:0BC9:B516602:B74B8B8:632C3151" + } + }, + "uuid": "1c4402c0-ee54-44e8-b132-4dc4cc9c4d10", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..55985e730d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTUKEA7W65R2UJZDWVDDFQZJY", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..103e4e5ee1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTRVC2WDX7DJXQDFHKDDFQZKE", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..86f19d8035 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/8", + "id": 1382171384, + "node_id": "I_kwDOIC5ExM5SYkL4", + "number": 8, + "title": "setAssignee", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:08Z", + "updated_at": "2022-09-22T09:57:08Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-5.json new file mode 100644 index 0000000000..ceba66ae01 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-5.json @@ -0,0 +1,101 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/8", + "id": 1382171384, + "node_id": "I_kwDOIC5ExM5SYkL4", + "number": 8, + "title": "setAssignee", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "assignees": [ + { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + } + ], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:08Z", + "updated_at": "2022-09-22T09:57:09Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-7.json new file mode 100644 index 0000000000..ceba66ae01 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/repos_hub4j-test-org_ghissuetest_issues_8-7.json @@ -0,0 +1,101 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/8", + "id": 1382171384, + "node_id": "I_kwDOIC5ExM5SYkL4", + "number": 8, + "title": "setAssignee", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "assignees": [ + { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + } + ], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:57:08Z", + "updated_at": "2022-09-22T09:57:09Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..ebbcc1b37f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "249a4701-eeb7-4b94-9bb3-2122e41fdaad", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:03 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4833", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "167", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CDE4:CC72:5B66CD0:5CE2B0C:632C316F" + } + }, + "uuid": "249a4701-eeb7-4b94-9bb3-2122e41fdaad", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..620db4d35c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "6ca18562-cafb-4e84-996d-0e639cf1eb97", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4832", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "168", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CDEE:5420:940FF46:964A712:632C316F" + } + }, + "uuid": "6ca18562-cafb-4e84-996d-0e639cf1eb97", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..ef4fe7ec3a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,50 @@ +{ + "id": "6c07a7c2-64ec-4669-9700-a183a8593219", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4829", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "171", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1C2:AA4E:97DB42C:9A17DA7:632C3175" + } + }, + "uuid": "6c07a7c2-64ec-4669-9700-a183a8593219", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..eb4df196fb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "0917be01-9c05-4bed-90e3-dfe117caddbc", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"setAssignee\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:09 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"e548b62ef680970273eb04380a0fde405846ce995ca2825ab0e8a90bb46b26f3\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4831", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "169", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CDF4:33AC:A6FF929:A93B087:632C3170", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/8" + } + }, + "uuid": "0917be01-9c05-4bed-90e3-dfe117caddbc", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-5.json new file mode 100644 index 0000000000..ee30645834 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-5.json @@ -0,0 +1,54 @@ +{ + "id": "3c3d3c3a-3372-42ad-9c9e-2e90cbf27009", + "name": "repos_hub4j-test-org_ghissuetest_issues_8", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/8", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[\"yrodiere\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_8-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:09 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"b01a45c762e505aa3a2e71f194dc3f782108b3120d10332df890ab269d990072\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4830", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "170", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1C0:5D3D:A23E958:A47F599:632C3175" + } + }, + "uuid": "3c3d3c3a-3372-42ad-9c9e-2e90cbf27009", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-7.json new file mode 100644 index 0000000000..1027f60e5c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/repos_hub4j-test-org_ghissuetest_issues_8-7.json @@ -0,0 +1,48 @@ +{ + "id": "8af47921-52fb-4ec9-813b-a016607ac4e4", + "name": "repos_hub4j-test-org_ghissuetest_issues_8", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/8", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_8-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:10 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"b01a45c762e505aa3a2e71f194dc3f782108b3120d10332df890ab269d990072\"", + "Last-Modified": "Thu, 22 Sep 2022 09:57:09 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4828", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "172", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E1CA:6970:9ED6967:A112194:632C3176" + } + }, + "uuid": "8af47921-52fb-4ec9-813b-a016607ac4e4", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/user-1.json new file mode 100644 index 0000000000..3a5398f9f0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setAssignee/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "c4546544-a9df-4ca0-81f3-3b69203dfe73", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:57:02 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4838", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "162", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CDDC:B08A:7D864E0:7F7DF39:632C316E" + } + }, + "uuid": "c4546544-a9df-4ca0-81f3-3b69203dfe73", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..fb24d5d8ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 39, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..142deb0be9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTSLLJZKRCRGPBKWWM3DFQZJE", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..0c1cb67a2d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,140 @@ +{ + "id": 539903172, + "node_id": "R_kgDOIC5ExA", + "name": "GHIssueTest", + "full_name": "hub4j-test-org/GHIssueTest", + "private": true, + "owner": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/hub4j-test-org/GHIssueTest", + "description": "Repository used by GHIssueTest", + "fork": false, + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "forks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/forks", + "keys_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/teams", + "hooks_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/hooks", + "issue_events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/events{/number}", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/events", + "assignees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/assignees{/user}", + "branches_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/branches{/branch}", + "tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/tags", + "blobs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/statuses/{sha}", + "languages_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/languages", + "stargazers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/stargazers", + "contributors_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contributors", + "subscribers_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscribers", + "subscription_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/subscription", + "commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/contents/{+path}", + "compare_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/merges", + "archive_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/downloads", + "issues_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues{/number}", + "pulls_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/pulls{/number}", + "milestones_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/milestones{/number}", + "notifications_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels{/name}", + "releases_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/releases{/id}", + "deployments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/deployments", + "created_at": "2022-09-22T09:33:05Z", + "updated_at": "2022-09-22T09:33:16Z", + "pushed_at": "2022-09-22T09:33:05Z", + "git_url": "git://github.com/hub4j-test-org/GHIssueTest.git", + "ssh_url": "git@github.com:hub4j-test-org/GHIssueTest.git", + "clone_url": "https://github.com/hub4j-test-org/GHIssueTest.git", + "svn_url": "https://github.com/hub4j-test-org/GHIssueTest", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AADEZTSIXTFRRJCB3EKY7PTDFQZJI", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/hub4j-test-org", + "html_url": "https://github.com/hub4j-test-org", + "followers_url": "https://api.github.com/users/hub4j-test-org/followers", + "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", + "repos_url": "https://api.github.com/users/hub4j-test-org/repos", + "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 0, + "subscribers_count": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..e852911ac6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,61 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/6", + "id": 1382171049, + "node_id": "I_kwDOIC5ExM5SYkGp", + "number": 6, + "title": "setLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:54Z", + "updated_at": "2022-09-22T09:56:54Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-5.json new file mode 100644 index 0000000000..7d7cd5f5a1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-5.json @@ -0,0 +1,71 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/6", + "id": 1382171049, + "node_id": "I_kwDOIC5ExM5SYkGp", + "number": 6, + "title": "setLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 4563124767, + "node_id": "LA_kwDOIC5ExM8AAAABD_vCHw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/setLabels_label_name", + "name": "setLabels_label_name", + "color": "ededed", + "default": false, + "description": null + } + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:54Z", + "updated_at": "2022-09-22T09:56:55Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-7.json new file mode 100644 index 0000000000..7d7cd5f5a1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/repos_hub4j-test-org_ghissuetest_issues_6-7.json @@ -0,0 +1,71 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6", + "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/6", + "id": 1382171049, + "node_id": "I_kwDOIC5ExM5SYkGp", + "number": 6, + "title": "setLabels", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 4563124767, + "node_id": "LA_kwDOIC5ExM8AAAABD_vCHw", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/labels/setLabels_label_name", + "name": "setLabels_label_name", + "color": "ededed", + "default": false, + "description": null + } + ], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 0, + "created_at": "2022-09-22T09:56:54Z", + "updated_at": "2022-09-22T09:56:55Z", + "closed_at": null, + "author_association": "NONE", + "active_lock_reason": null, + "body": "## test", + "closed_by": null, + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6/timeline", + "performed_via_github_app": null, + "state_reason": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/user-1.json new file mode 100644 index 0000000000..d7c2d82c84 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-20T13:34:03Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..e35db962a5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/orgs_hub4j-test-org-2.json @@ -0,0 +1,48 @@ +{ + "id": "9d4e6fd0-5241-4dc5-a381-353d3069edb2", + "name": "orgs_hub4j-test-org", + "request": { + "url": "/orgs/hub4j-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_hub4j-test-org-2.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:54 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"0df75ca805091aca7020aeb149b53e299f6cfffce78a580ed3deee76f28c5fa3\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4859", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "141", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EB98:644B:3C64285:3D657CA:632C3165" + } + }, + "uuid": "9d4e6fd0-5241-4dc5-a381-353d3069edb2", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json new file mode 100644 index 0000000000..cf1e2cbbb6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -0,0 +1,51 @@ +{ + "id": "dd8a9fac-ebbf-418b-932b-48d850331c2e", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:54 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4858", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "142", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DAE3:0BC9:B51BAEA:B750E93:632C3166" + } + }, + "uuid": "dd8a9fac-ebbf-418b-932b-48d850331c2e", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json new file mode 100644 index 0000000000..02db268770 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest-6.json @@ -0,0 +1,50 @@ +{ + "id": "d6fa84a1-2edd-4f98-a823-ee733572328f", + "name": "repos_hub4j-test-org_ghissuetest", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest-6.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"8e10bee2591b68b18878b39ccb1142181efd7af87933d8051a0f887f3e2d7ab4\"", + "Last-Modified": "Thu, 22 Sep 2022 09:33:16 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4855", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "145", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E2D6:0BC9:B51C145:B75151B:632C3168" + } + }, + "uuid": "d6fa84a1-2edd-4f98-a823-ee733572328f", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json new file mode 100644 index 0000000000..858574ca1d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -0,0 +1,55 @@ +{ + "id": "32ec32e7-ea49-4884-85a8-a49b54acb79b", + "name": "repos_hub4j-test-org_ghissuetest_issues", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"assignees\":[],\"title\":\"setLabels\",\"body\":\"## test\",\"labels\":[]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:55 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"ca00254956115395ccd4712bde6db8d6ac1c64ef0c0da75ed79377759b3d9e43\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4857", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "143", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D99B:5420:940D7D9:9647F1B:632C3166", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/6" + } + }, + "uuid": "32ec32e7-ea49-4884-85a8-a49b54acb79b", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-5.json new file mode 100644 index 0000000000..83ed62c935 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-5.json @@ -0,0 +1,54 @@ +{ + "id": "819e4921-8d0e-4e95-adb0-b36feed61a30", + "name": "repos_hub4j-test-org_ghissuetest_issues_6", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/6", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"labels\":[\"setLabels_label_name\"]}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_6-5.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:55 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"a7d1ab73b556cfff9b6ac51a4909187b77f27a27fbd7ec05ad88adf25acb0913\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4856", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "144", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EEB6:33AC:A6FCD37:A9383B5:632C3167" + } + }, + "uuid": "819e4921-8d0e-4e95-adb0-b36feed61a30", + "persistent": true, + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-7.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-7.json new file mode 100644 index 0000000000..a10fb1387a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/repos_hub4j-test-org_ghissuetest_issues_6-7.json @@ -0,0 +1,48 @@ +{ + "id": "e3828bc5-b4d1-4206-84f0-9e4c703db058", + "name": "repos_hub4j-test-org_ghissuetest_issues_6", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/6", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_6-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:56 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"a7d1ab73b556cfff9b6ac51a4909187b77f27a27fbd7ec05ad88adf25acb0913\"", + "Last-Modified": "Thu, 22 Sep 2022 09:56:55 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4854", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "146", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E2E0:A95E:64D6128:666912B:632C3168" + } + }, + "uuid": "e3828bc5-b4d1-4206-84f0-9e4c703db058", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/user-1.json new file mode 100644 index 0000000000..90988f0c68 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/setLabels/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "405013a8-1c60-4eec-a56d-bc95df7529eb", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 09:56:52 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"e4669ecab8bdeda8b7492722df3f08cf77ae22ef90272d5f19c438e11c436d56\"", + "Last-Modified": "Tue, 20 Sep 2022 13:34:03 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4864", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "136", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E6C8:0BC9:B51B478:B750817:632C3164" + } + }, + "uuid": "405013a8-1c60-4eec-a56d-bc95df7529eb", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file From a628b93dd5b4cf4ad5750cc80be23eb0c28c02ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 22 Sep 2022 12:51:19 +0200 Subject: [PATCH 2/2] Add GHIssue#queryComments, with a since() filter --- src/main/java/org/kohsuke/github/GHIssue.java | 14 +- .../github/GHIssueCommentQueryBuilder.java | 61 ++++ .../java/org/kohsuke/github/GHIssueTest.java | 79 +++- .../org/kohsuke/github/GHPullRequestTest.java | 76 +++- .../__files/orgs_hub4j-test-org-2.json | 0 .../repos_hub4j-test-org_ghissuetest-3.json | 4 +- ...s_hub4j-test-org_ghissuetest_issues-4.json | 24 +- ...org_ghissuetest_issues_15_comments-10.json | 46 +++ ...org_ghissuetest_issues_15_comments-12.json | 44 +++ ...org_ghissuetest_issues_15_comments-13.json | 90 +++++ ...org_ghissuetest_issues_15_comments-14.json | 90 +++++ ...org_ghissuetest_issues_15_comments-15.json | 90 +++++ ...org_ghissuetest_issues_15_comments-16.json | 46 +++ ...org_ghissuetest_issues_15_comments-17.json | 46 +++ ...org_ghissuetest_issues_15_comments-19.json | 46 +++ ...org_ghissuetest_issues_15_comments-7.json} | 18 +- ...-org_ghissuetest_issues_15_comments-8.json | 46 +++ ...-org_ghissuetest_issues_15_comments-9.json | 46 +++ .../__files/user-1.json | 0 .../mappings/orgs_hub4j-test-org-2.json | 12 +- .../repos_hub4j-test-org_ghissuetest-3.json | 12 +- ...s_hub4j-test-org_ghissuetest_issues-4.json | 16 +- ...org_ghissuetest_issues_15_comments-10.json | 50 +++ ...org_ghissuetest_issues_15_comments-11.json | 50 +++ ...org_ghissuetest_issues_15_comments-12.json | 55 +++ ...org_ghissuetest_issues_15_comments-13.json | 50 +++ ...org_ghissuetest_issues_15_comments-14.json | 49 +++ ...org_ghissuetest_issues_15_comments-15.json | 49 +++ ...org_ghissuetest_issues_15_comments-16.json | 49 +++ ...org_ghissuetest_issues_15_comments-17.json | 50 +++ ...org_ghissuetest_issues_15_comments-18.json | 47 +++ ...org_ghissuetest_issues_15_comments-19.json | 49 +++ ...-org_ghissuetest_issues_15_comments-5.json | 50 +++ ...-org_ghissuetest_issues_15_comments-6.json | 50 +++ ...org_ghissuetest_issues_15_comments-7.json} | 26 +- ...-org_ghissuetest_issues_15_comments-8.json | 50 +++ ...-org_ghissuetest_issues_15_comments-9.json | 50 +++ .../mappings/user-1.json | 12 +- .../__files/orgs_hub4j-test-org-2.json | 41 --- .../repos_hub4j-test-org_github-api-6.json | 330 ----------------- ...-org_github-api_issues_270_comments-5.json | 31 -- ...pos_hub4j-test-org_github-api_pulls-7.json | 329 ----------------- ...hub4j-test-org_github-api_pulls_270-8.json | 339 ------------------ .../__files/user-1.json | 33 -- .../repos_hub4j-test-org_github-api-3.json | 51 --- .../repos_hub4j-test-org_github-api-6.json | 50 --- ...-org_github-api_issues_270_comments-5.json | 55 --- ...pos_hub4j-test-org_github-api_pulls-7.json | 47 --- ...hub4j-test-org_github-api_pulls_270-8.json | 54 --- .../mappings/user-1.json | 48 --- .../__files/orgs_hub4j-test-org-2.json | 62 ++++ .../repos_hub4j-test-org_github-api-3.json | 118 ++++-- ...org_github-api_issues_461_comments-10.json | 46 +++ ...org_github-api_issues_461_comments-12.json | 44 +++ ...org_github-api_issues_461_comments-13.json | 90 +++++ ...org_github-api_issues_461_comments-14.json | 90 +++++ ...org_github-api_issues_461_comments-15.json | 90 +++++ ...org_github-api_issues_461_comments-16.json | 46 +++ ...org_github-api_issues_461_comments-17.json | 46 +++ ...org_github-api_issues_461_comments-19.json | 46 +++ ...-org_github-api_issues_461_comments-7.json | 44 +++ ...-org_github-api_issues_461_comments-8.json | 46 +++ ...-org_github-api_issues_461_comments-9.json | 46 +++ ...pos_hub4j-test-org_github-api_pulls-4.json | 145 ++++---- .../pullRequestComment/__files/user-1.json | 34 ++ .../mappings/orgs_hub4j-test-org-2.json | 34 +- .../repos_hub4j-test-org_github-api-3.json | 48 +++ ...org_github-api_issues_461_comments-10.json | 50 +++ ...org_github-api_issues_461_comments-11.json | 50 +++ ...org_github-api_issues_461_comments-12.json | 55 +++ ...org_github-api_issues_461_comments-13.json | 50 +++ ...org_github-api_issues_461_comments-14.json | 49 +++ ...org_github-api_issues_461_comments-15.json | 49 +++ ...org_github-api_issues_461_comments-16.json | 49 +++ ...org_github-api_issues_461_comments-17.json | 50 +++ ...org_github-api_issues_461_comments-18.json | 47 +++ ...org_github-api_issues_461_comments-19.json | 49 +++ ...-org_github-api_issues_461_comments-5.json | 50 +++ ...-org_github-api_issues_461_comments-6.json | 50 +++ ...-org_github-api_issues_461_comments-7.json | 55 +++ ...-org_github-api_issues_461_comments-8.json | 50 +++ ...-org_github-api_issues_461_comments-9.json | 50 +++ ...pos_hub4j-test-org_github-api_pulls-4.json | 50 +-- .../pullRequestComment/mappings/user-1.json | 48 +++ 84 files changed, 3355 insertions(+), 1621 deletions(-) create mode 100644 src/main/java/org/kohsuke/github/GHIssueCommentQueryBuilder.java rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/__files/orgs_hub4j-test-org-2.json (100%) rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/__files/repos_hub4j-test-org_ghissuetest-3.json (98%) rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/__files/repos_hub4j-test-org_ghissuetest_issues-4.json (86%) create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json => issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json} (84%) create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/__files/user-1.json (100%) rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/mappings/orgs_hub4j-test-org-2.json (83%) rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/mappings/repos_hub4j-test-org_ghissuetest-3.json (83%) rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json (80%) create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-11.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-18.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-6.json rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json => issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json} (65%) create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json rename src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/{createIssueComment => issueComment}/mappings/user-1.json (82%) delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/orgs_hub4j-test-org-2.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-6.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_issues_270_comments-5.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-7.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls_270-8.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/user-1.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-6.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_270_comments-5.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-7.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls_270-8.json delete mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/user-1.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/orgs_hub4j-test-org-2.json rename src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/{createPullRequestComment => pullRequestComment}/__files/repos_hub4j-test-org_github-api-3.json (87%) create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-10.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-12.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-13.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-14.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-15.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-16.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-17.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-19.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-9.json rename src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/{createPullRequestComment => pullRequestComment}/__files/repos_hub4j-test-org_github-api_pulls-4.json (84%) create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/user-1.json rename src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/{createPullRequestComment => pullRequestComment}/mappings/orgs_hub4j-test-org-2.json (53%) create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-10.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-11.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-12.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-13.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-14.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-15.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-16.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-17.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-18.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-19.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-5.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-6.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-7.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-8.json create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-9.json rename src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/{createPullRequestComment => pullRequestComment}/mappings/repos_hub4j-test-org_github-api_pulls-4.json (52%) create mode 100644 src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/user-1.json diff --git a/src/main/java/org/kohsuke/github/GHIssue.java b/src/main/java/org/kohsuke/github/GHIssue.java index 1b52c3bf9a..1bd3c6e25c 100644 --- a/src/main/java/org/kohsuke/github/GHIssue.java +++ b/src/main/java/org/kohsuke/github/GHIssue.java @@ -479,11 +479,13 @@ public List getComments() throws IOException { } /** - * Obtains all the comments associated with this issue. + * Obtains all the comments associated with this issue, witout any filter. * * @return the paged iterable * @throws IOException * the io exception + * @see List issue comments + * @see #queryComments() queryComments to apply filters. */ public PagedIterable listComments() throws IOException { return root().createRequest() @@ -491,6 +493,16 @@ public PagedIterable listComments() throws IOException { .toIterable(GHIssueComment[].class, item -> item.wrapUp(this)); } + /** + * Search comments on this issue by specifying filters through a builder pattern. + * + * @return the query builder + * @see List issue comments + */ + public GHIssueCommentQueryBuilder queryComments() { + return new GHIssueCommentQueryBuilder(this); + } + @Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException { return root().createRequest() diff --git a/src/main/java/org/kohsuke/github/GHIssueCommentQueryBuilder.java b/src/main/java/org/kohsuke/github/GHIssueCommentQueryBuilder.java new file mode 100644 index 0000000000..c9baed0b8f --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHIssueCommentQueryBuilder.java @@ -0,0 +1,61 @@ +package org.kohsuke.github; + +import java.util.Date; + +/** + * Builds a query for listing comments on an issue. + *

+ * Call various methods that set the filter criteria, then the {@link #list()} method to actually retrieve the comments. + * + *

+ * GHIssue issue = ...;
+ * for (GHIssueComment comment : issue.queryComments().since(x).list()) {
+ *     ...
+ * }
+ * 
+ * + * @author Yoann Rodiere + * @see GHIssue#queryComments() GHIssue#queryComments() + * @see List issue comments + */ +public class GHIssueCommentQueryBuilder { + private final Requester req; + private final GHIssue issue; + + GHIssueCommentQueryBuilder(GHIssue issue) { + this.issue = issue; + this.req = issue.root().createRequest().withUrlPath(issue.getIssuesApiRoute() + "/comments"); + } + + /** + * Only comments created/updated after this date will be returned. + * + * @param date + * the date + * @return the query builder + */ + public GHIssueCommentQueryBuilder since(Date date) { + req.with("since", GitHubClient.printDate(date)); + return this; + } + + /** + * Only comments created/updated after this timestamp will be returned. + * + * @param timestamp + * the timestamp + * @return the query builder + */ + public GHIssueCommentQueryBuilder since(long timestamp) { + return since(new Date(timestamp)); + } + + /** + * Lists up the comments with the criteria added so far. + * + * @return the paged iterable + */ + public PagedIterable list() { + return req.toIterable(GHIssueComment[].class, item -> item.wrapUp(issue)); + } +} diff --git a/src/test/java/org/kohsuke/github/GHIssueTest.java b/src/test/java/org/kohsuke/github/GHIssueTest.java index e2c1763c63..b1c66b07b5 100644 --- a/src/test/java/org/kohsuke/github/GHIssueTest.java +++ b/src/test/java/org/kohsuke/github/GHIssueTest.java @@ -5,13 +5,17 @@ import org.junit.Test; import java.io.IOException; +import java.time.temporal.ChronoUnit; import java.util.Collection; +import java.util.Date; import java.util.List; +import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; @@ -43,10 +47,81 @@ public void createIssue() throws Exception { } @Test - public void createIssueComment() throws Exception { + public void issueComment() throws Exception { String name = "createIssueComment"; GHIssue issue = getRepository().createIssue(name).body("## test").create(); - issue.comment("Some comment"); + + List comments; + comments = issue.listComments().toList(); + assertThat(comments, hasSize(0)); + comments = issue.queryComments().list().toList(); + assertThat(comments, hasSize(0)); + + GHIssueComment firstComment = issue.comment("First comment"); + Date firstCommentCreatedAt = firstComment.getCreatedAt(); + Date firstCommentCreatedAtPlus1Second = Date + .from(firstComment.getCreatedAt().toInstant().plus(1, ChronoUnit.SECONDS)); + + comments = issue.listComments().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + + comments = issue.queryComments().list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + + // Test "since" + comments = issue.queryComments().since(firstCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + comments = issue.queryComments().since(firstCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(0)); + + // "since" is only precise up to the second, + // so if we want to differentiate comments, we need to be completely sure they're created + // at least 1 second from each other. + // Waiting 2 seconds to avoid edge cases. + Thread.sleep(2000); + + GHIssueComment secondComment = issue.comment("Second comment"); + Date secondCommentCreatedAt = secondComment.getCreatedAt(); + Date secondCommentCreatedAtPlus1Second = Date + .from(secondComment.getCreatedAt().toInstant().plus(1, ChronoUnit.SECONDS)); + assertThat( + "There's an error in the setup of this test; please fix it." + + " The second comment should be created at least one second after the first one.", + firstCommentCreatedAtPlus1Second.getTime() <= secondCommentCreatedAt.getTime()); + + comments = issue.listComments().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + comments = issue.queryComments().list().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + + // Test "since" + comments = issue.queryComments().since(firstCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + comments = issue.queryComments().since(firstCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); + comments = issue.queryComments().since(secondCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); + comments = issue.queryComments().since(secondCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(0)); + + // Test "since" with timestamp instead of Date + comments = issue.queryComments().since(secondCommentCreatedAt.getTime()).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); } @Test diff --git a/src/test/java/org/kohsuke/github/GHPullRequestTest.java b/src/test/java/org/kohsuke/github/GHPullRequestTest.java index 4c6ae3d491..8ed8b7939c 100644 --- a/src/test/java/org/kohsuke/github/GHPullRequestTest.java +++ b/src/test/java/org/kohsuke/github/GHPullRequestTest.java @@ -6,8 +6,10 @@ import org.kohsuke.github.GHPullRequest.AutoMerge; import java.io.IOException; +import java.time.temporal.ChronoUnit; import java.util.Collection; import java.util.Collections; +import java.util.Date; import java.util.List; import java.util.Optional; @@ -73,10 +75,80 @@ public void createDraftPullRequest() throws Exception { } @Test - public void createPullRequestComment() throws Exception { + public void pullRequestComment() throws Exception { String name = "createPullRequestComment"; GHPullRequest p = getRepository().createPullRequest(name, "test/stable", "main", "## test"); - p.comment("Some comment"); + + List comments; + comments = p.listComments().toList(); + assertThat(comments, hasSize(0)); + comments = p.queryComments().list().toList(); + assertThat(comments, hasSize(0)); + + GHIssueComment firstComment = p.comment("First comment"); + Date firstCommentCreatedAt = firstComment.getCreatedAt(); + Date firstCommentCreatedAtPlus1Second = Date + .from(firstComment.getCreatedAt().toInstant().plus(1, ChronoUnit.SECONDS)); + + comments = p.listComments().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + comments = p.queryComments().list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + + // Test "since" + comments = p.queryComments().since(firstCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("First comment")))); + comments = p.queryComments().since(firstCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(0)); + + // "since" is only precise up to the second, + // so if we want to differentiate comments, we need to be completely sure they're created + // at least 1 second from each other. + // Waiting 2 seconds to avoid edge cases. + Thread.sleep(2000); + + GHIssueComment secondComment = p.comment("Second comment"); + Date secondCommentCreatedAt = secondComment.getCreatedAt(); + Date secondCommentCreatedAtPlus1Second = Date + .from(secondComment.getCreatedAt().toInstant().plus(1, ChronoUnit.SECONDS)); + assertThat( + "There's an error in the setup of this test; please fix it." + + " The second comment should be created at least one second after the first one.", + firstCommentCreatedAtPlus1Second.getTime() <= secondCommentCreatedAt.getTime()); + + comments = p.listComments().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + comments = p.queryComments().list().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + + // Test "since" + comments = p.queryComments().since(firstCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(2)); + assertThat(comments, + contains(hasProperty("body", equalTo("First comment")), + hasProperty("body", equalTo("Second comment")))); + comments = p.queryComments().since(firstCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); + comments = p.queryComments().since(secondCommentCreatedAt).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); + comments = p.queryComments().since(secondCommentCreatedAtPlus1Second).list().toList(); + assertThat(comments, hasSize(0)); + + // Test "since" with timestamp instead of Date + comments = p.queryComments().since(secondCommentCreatedAt.getTime()).list().toList(); + assertThat(comments, hasSize(1)); + assertThat(comments, contains(hasProperty("body", equalTo("Second comment")))); } @Test diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/orgs_hub4j-test-org-2.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/orgs_hub4j-test-org-2.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/orgs_hub4j-test-org-2.json diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest-3.json similarity index 98% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest-3.json index 2edca51325..84e14f3779 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest-3.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest-3.json @@ -103,7 +103,7 @@ "triage": true, "pull": true }, - "temp_clone_token": "AADEZTVSNXJAAABQRALMHX3DFQ3OK", + "temp_clone_token": "AADEZTV5AX4DWMNAEITWHQLDFQ7J2", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, @@ -136,5 +136,5 @@ "site_admin": false }, "network_count": 0, - "subscribers_count": 17 + "subscribers_count": 16 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json similarity index 86% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json index 18e0a1eeff..a23894f44a 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -1,13 +1,13 @@ { - "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", "repository_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest", - "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/labels{/name}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/comments", - "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/events", - "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/11", - "id": 1382197385, - "node_id": "I_kwDOIC5ExM5SYqiJ", - "number": 11, + "labels_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15/labels{/name}", + "comments_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "events_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15/events", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15", + "id": 1382239447, + "node_id": "I_kwDOIC5ExM5SY0zX", + "number": 15, "title": "createIssueComment", "user": { "login": "yrodiere", @@ -36,15 +36,15 @@ "assignees": [], "milestone": null, "comments": 0, - "created_at": "2022-09-22T10:15:21Z", - "updated_at": "2022-09-22T10:15:21Z", + "created_at": "2022-09-22T10:48:17Z", + "updated_at": "2022-09-22T10:48:17Z", "closed_at": null, "author_association": "NONE", "active_lock_reason": null, "body": "## test", "closed_by": null, "reactions": { - "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/reactions", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15/reactions", "total_count": 0, "+1": 0, "-1": 0, @@ -55,7 +55,7 @@ "rocket": 0, "eyes": 0 }, - "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11/timeline", + "timeline_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15/timeline", "performed_via_github_app": null, "state_reason": null } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json new file mode 100644 index 0000000000..f2c4b7c897 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json new file mode 100644 index 0000000000..cda8f2b368 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json @@ -0,0 +1,44 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?u=952a892aea58858acd1668c10aa6c36ba3dcd7b5&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json new file mode 100644 index 0000000000..91b9fa83b9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json new file mode 100644 index 0000000000..91b9fa83b9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json new file mode 100644 index 0000000000..91b9fa83b9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json new file mode 100644 index 0000000000..2ac385bcb6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json new file mode 100644 index 0000000000..2ac385bcb6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json new file mode 100644 index 0000000000..2ac385bcb6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853570", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853570, + "node_id": "IC_kwDOIC5ExM5Ky4vC", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:22Z", + "updated_at": "2022-09-22T10:48:22Z", + "author_association": "NONE", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json similarity index 84% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json index 45001afdfe..6d949872c6 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json @@ -1,9 +1,9 @@ { - "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709", - "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/11#issuecomment-1254818709", - "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11", - "id": 1254818709, - "node_id": "IC_kwDOIC5ExM5KywOV", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", "user": { "login": "yrodiere", "id": 412878, @@ -24,12 +24,12 @@ "type": "User", "site_admin": false }, - "created_at": "2022-09-22T10:15:22Z", - "updated_at": "2022-09-22T10:15:22Z", + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", "author_association": "NONE", - "body": "Some comment", + "body": "First comment", "reactions": { - "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709/reactions", + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", "total_count": 0, "+1": 0, "-1": 0, diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json new file mode 100644 index 0000000000..f2c4b7c897 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json new file mode 100644 index 0000000000..f2c4b7c897 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505", + "html_url": "https://github.com/hub4j-test-org/GHIssueTest/issues/15#issuecomment-1254853505", + "issue_url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15", + "id": 1254853505, + "node_id": "IC_kwDOIC5ExM5Ky4uB", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:18Z", + "updated_at": "2022-09-22T10:48:18Z", + "author_association": "NONE", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/user-1.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/__files/user-1.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/__files/user-1.json diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/orgs_hub4j-test-org-2.json similarity index 83% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/orgs_hub4j-test-org-2.json index 02bc07b6f4..bd0954e34c 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/orgs_hub4j-test-org-2.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/orgs_hub4j-test-org-2.json @@ -1,5 +1,5 @@ { - "id": "782fec21-40f4-4fe8-87e6-9f328d1e565d", + "id": "f512073e-55c7-4be0-8b51-140da32e749c", "name": "orgs_hub4j-test-org", "request": { "url": "/orgs/hub4j-test-org", @@ -15,7 +15,7 @@ "bodyFileName": "orgs_hub4j-test-org-2.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 22 Sep 2022 10:15:20 GMT", + "Date": "Thu, 22 Sep 2022 10:48:16 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ @@ -29,9 +29,9 @@ "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4789", + "X-RateLimit-Remaining": "4668", "X-RateLimit-Reset": "1663844087", - "X-RateLimit-Used": "211", + "X-RateLimit-Used": "332", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -39,10 +39,10 @@ "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "E2AC:9FDD:4D59731:4E961EF:632C35B8" + "X-GitHub-Request-Id": "C3E4:33AC:AA4C198:AC927EB:632C3D70" } }, - "uuid": "782fec21-40f4-4fe8-87e6-9f328d1e565d", + "uuid": "f512073e-55c7-4be0-8b51-140da32e749c", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json similarity index 83% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json index 088a1b30be..99e1adb1c1 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest-3.json @@ -1,5 +1,5 @@ { - "id": "067b933a-91dc-4e20-8b25-52bf103a1d58", + "id": "3e258f36-c6e6-45bf-95c3-c9a4efcf86a0", "name": "repos_hub4j-test-org_ghissuetest", "request": { "url": "/repos/hub4j-test-org/GHIssueTest", @@ -15,7 +15,7 @@ "bodyFileName": "repos_hub4j-test-org_ghissuetest-3.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 22 Sep 2022 10:15:21 GMT", + "Date": "Thu, 22 Sep 2022 10:48:17 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ @@ -29,9 +29,9 @@ "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4788", + "X-RateLimit-Remaining": "4667", "X-RateLimit-Reset": "1663844087", - "X-RateLimit-Used": "212", + "X-RateLimit-Used": "333", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -39,10 +39,10 @@ "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "CC66:9FDD:4D598A7:4E9637A:632C35B9" + "X-GitHub-Request-Id": "E47B:0BC9:B8797A2:BAB973D:632C3D70" } }, - "uuid": "067b933a-91dc-4e20-8b25-52bf103a1d58", + "uuid": "3e258f36-c6e6-45bf-95c3-c9a4efcf86a0", "persistent": true, "insertionIndex": 3 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json similarity index 80% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json index 9ac0e69aac..2cb00d7cfe 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues-4.json @@ -1,5 +1,5 @@ { - "id": "5102f8cf-d607-4a67-b157-bfadc243a1cc", + "id": "71c458d8-3f31-4c08-a9cf-330f58f32ea0", "name": "repos_hub4j-test-org_ghissuetest_issues", "request": { "url": "/repos/hub4j-test-org/GHIssueTest/issues", @@ -22,22 +22,22 @@ "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues-4.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 22 Sep 2022 10:15:22 GMT", + "Date": "Thu, 22 Sep 2022 10:48:17 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "\"5c6969f08d2f87426cf9b8270d60ac74e95d26a5fb5fe87a27cd6c2931129759\"", + "ETag": "\"1fa19894db981ee285d6f3109a35cdec7d3d56f4283fea75cf8c521c7d0244e1\"", "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "", "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4787", + "X-RateLimit-Remaining": "4666", "X-RateLimit-Reset": "1663844087", - "X-RateLimit-Used": "213", + "X-RateLimit-Used": "334", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -45,11 +45,11 @@ "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "E9ED:5103:9522D4B:97623E4:632C35B9", - "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/11" + "X-GitHub-Request-Id": "C5EE:B08A:80B4425:82B6CE7:632C3D71", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/15" } }, - "uuid": "5102f8cf-d607-4a67-b157-bfadc243a1cc", + "uuid": "71c458d8-3f31-4c08-a9cf-330f58f32ea0", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json new file mode 100644 index 0000000000..d730624266 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json @@ -0,0 +1,50 @@ +{ + "id": "f8695ac7-a62d-45f5-ac90-9089c4be01e8", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A18Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-10.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"70474a4be7e01cf80867162c029b2d9a23fac3d13af6e6b36d888862fc14b55c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4660", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "340", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F9A2:2C44:9A6898E:9CAB888:632C3D74" + } + }, + "uuid": "f8695ac7-a62d-45f5-ac90-9089c4be01e8", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-11.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-11.json new file mode 100644 index 0000000000..e6a68ae177 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-11.json @@ -0,0 +1,50 @@ +{ + "id": "12fea9cc-e4e4-499e-938a-5efaa1a53dec", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A19Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4659", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "341", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D93F:5103:97056F7:994BC64:632C3D74" + } + }, + "uuid": "12fea9cc-e4e4-499e-938a-5efaa1a53dec", + "persistent": true, + "scenarioName": "scenario-3-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-3-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json new file mode 100644 index 0000000000..6d01c23af1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json @@ -0,0 +1,55 @@ +{ + "id": "0de770a5-dcd2-414a-aedd-f0b0a3eb8cff", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"body\":\"Second comment\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-12.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c477d15a01aca4aeb6b0dd28e75987cd8be102a8fc780762dc8ef98b5f09843c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4658", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "342", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "CE46:644B:3F406EC:404D0FE:632C3D76", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853570" + } + }, + "uuid": "0de770a5-dcd2-414a-aedd-f0b0a3eb8cff", + "persistent": true, + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json new file mode 100644 index 0000000000..08f2e7ad5e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json @@ -0,0 +1,50 @@ +{ + "id": "53a3638d-6eee-43ed-a615-b5361d6ca7d4", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-13.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"21f7ae94ad2f37f3c6977da0c98976ba33662945f1e803bae87dab59b48e55b5\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4657", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "343", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C959:10DC3:A562347:A7B18DE:632C3D77" + } + }, + "uuid": "53a3638d-6eee-43ed-a615-b5361d6ca7d4", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-5", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-6", + "insertionIndex": 13 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json new file mode 100644 index 0000000000..02b8769bdd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json @@ -0,0 +1,49 @@ +{ + "id": "e57fc572-8339-4c39-b437-4c33b150467a", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-14.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"21f7ae94ad2f37f3c6977da0c98976ba33662945f1e803bae87dab59b48e55b5\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4656", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "344", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C5D3:DF11:9E71B16:A0BADDC:632C3D77" + } + }, + "uuid": "e57fc572-8339-4c39-b437-4c33b150467a", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-6", + "insertionIndex": 14 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json new file mode 100644 index 0000000000..e1f32d9004 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json @@ -0,0 +1,49 @@ +{ + "id": "201a9e78-8830-4ec9-a234-6f5a94f60d42", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A18Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-15.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"21f7ae94ad2f37f3c6977da0c98976ba33662945f1e803bae87dab59b48e55b5\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4655", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "345", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EF51:2C44:9A69BEA:9CACB1C:632C3D78" + } + }, + "uuid": "201a9e78-8830-4ec9-a234-6f5a94f60d42", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json new file mode 100644 index 0000000000..f9a87aca33 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json @@ -0,0 +1,49 @@ +{ + "id": "38c4aa08-39a6-4e21-9083-e4d237459091", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A19Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-16.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"d7711dab21953eacbc0e2b398b79fdb569e705dca7b66e3a4d6bba3ddcfd8f80\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4654", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "346", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E511:0BB5:93EF235:9632621:632C3D78" + } + }, + "uuid": "38c4aa08-39a6-4e21-9083-e4d237459091", + "persistent": true, + "scenarioName": "scenario-3-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-3-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 16 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json new file mode 100644 index 0000000000..34edd9367b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json @@ -0,0 +1,50 @@ +{ + "id": "40dcb1b8-7487-4380-aa28-32c47ab26c6a", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A22Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-17.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"d7711dab21953eacbc0e2b398b79fdb569e705dca7b66e3a4d6bba3ddcfd8f80\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4653", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "347", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DE79:AA4E:9AFA722:9D41F02:632C3D78" + } + }, + "uuid": "40dcb1b8-7487-4380-aa28-32c47ab26c6a", + "persistent": true, + "scenarioName": "scenario-4-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-4-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-18.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-18.json new file mode 100644 index 0000000000..bc19d0be24 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-18.json @@ -0,0 +1,47 @@ +{ + "id": "aab13b0c-0942-40ea-b101-24785f12c5b3", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A23Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4652", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "348", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C638:10DC3:A562AF2:A7B20D3:632C3D79" + } + }, + "uuid": "aab13b0c-0942-40ea-b101-24785f12c5b3", + "persistent": true, + "insertionIndex": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json new file mode 100644 index 0000000000..6428825198 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json @@ -0,0 +1,49 @@ +{ + "id": "2ea7c5a3-0759-4ea4-9cb9-d7f6909001fb", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments?since=2022-09-22T10%3A48%3A22Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-19.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"d7711dab21953eacbc0e2b398b79fdb569e705dca7b66e3a4d6bba3ddcfd8f80\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4651", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "349", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C906:5103:9706D37:994D2FC:632C3D79" + } + }, + "uuid": "2ea7c5a3-0759-4ea4-9cb9-d7f6909001fb", + "persistent": true, + "scenarioName": "scenario-4-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-4-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 19 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-5.json new file mode 100644 index 0000000000..c4a40fab08 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-5.json @@ -0,0 +1,50 @@ +{ + "id": "b9b86a2c-a0f5-48f5-87d3-0465302987b8", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:18 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4665", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "335", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C441:0BB5:93ED92D:9630CAF:632C3D71" + } + }, + "uuid": "b9b86a2c-a0f5-48f5-87d3-0465302987b8", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-6.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-6.json new file mode 100644 index 0000000000..12066cc0bf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-6.json @@ -0,0 +1,50 @@ +{ + "id": "d992e85c-347d-4984-b85a-7a89b32b7498", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:18 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4664", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "336", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "FFE1:644B:3F3F72A:404C0D5:632C3D72" + } + }, + "uuid": "d992e85c-347d-4984-b85a-7a89b32b7498", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-2", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-3", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json similarity index 65% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json index 9954f77914..a86d333b41 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json @@ -1,8 +1,8 @@ { - "id": "dfa922c7-c9fa-4c60-b76f-427ab656fb9d", - "name": "repos_hub4j-test-org_ghissuetest_issues_11_comments", + "id": "252d7786-18ad-40e2-9030-bc7f535a77ef", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", "request": { - "url": "/repos/hub4j-test-org/GHIssueTest/issues/11/comments", + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", "method": "POST", "headers": { "Accept": { @@ -11,7 +11,7 @@ }, "bodyPatterns": [ { - "equalToJson": "{\"body\":\"Some comment\"}", + "equalToJson": "{\"body\":\"First comment\"}", "ignoreArrayOrder": true, "ignoreExtraElements": false } @@ -19,25 +19,25 @@ }, "response": { "status": 201, - "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_11_comments-5.json", + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-7.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 22 Sep 2022 10:15:22 GMT", + "Date": "Thu, 22 Sep 2022 10:48:19 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "\"3fef745c8d9fe7f16dd908e6ab108846459a987ac3f1ddd528c4dc7c74aa16d2\"", + "ETag": "\"fe4b553e97fb6e05bd7963a7f1ad3c4774bbc210350b90697167c78cfc35e1c6\"", "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "", "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4786", + "X-RateLimit-Remaining": "4663", "X-RateLimit-Reset": "1663844087", - "X-RateLimit-Used": "214", + "X-RateLimit-Used": "337", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -45,11 +45,11 @@ "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "C791:5D3D:A36CC27:A5B1853:632C35BA", - "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254818709" + "X-GitHub-Request-Id": "DC91:9FDD:4F1C506:505FE5A:632C3D72", + "Location": "https://api.github.com/repos/hub4j-test-org/GHIssueTest/issues/comments/1254853505" } }, - "uuid": "dfa922c7-c9fa-4c60-b76f-427ab656fb9d", + "uuid": "252d7786-18ad-40e2-9030-bc7f535a77ef", "persistent": true, - "insertionIndex": 5 + "insertionIndex": 7 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json new file mode 100644 index 0000000000..fb727f3438 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json @@ -0,0 +1,50 @@ +{ + "id": "b117074b-f0c5-494e-8766-46a3c30c7ebf", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"70474a4be7e01cf80867162c029b2d9a23fac3d13af6e6b36d888862fc14b55c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4662", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "338", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "DCFE:9FDD:4F1C77E:50600F4:632C3D73" + } + }, + "uuid": "b117074b-f0c5-494e-8766-46a3c30c7ebf", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-3", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-4", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json new file mode 100644 index 0000000000..0f6399c0e8 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json @@ -0,0 +1,50 @@ +{ + "id": "343aa67e-aeab-4877-bedf-4840dee0c03f", + "name": "repos_hub4j-test-org_ghissuetest_issues_15_comments", + "request": { + "url": "/repos/hub4j-test-org/GHIssueTest/issues/15/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_ghissuetest_issues_15_comments-9.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"70474a4be7e01cf80867162c029b2d9a23fac3d13af6e6b36d888862fc14b55c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4661", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "339", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F2A6:10DC3:A56128B:A7B083C:632C3D73" + } + }, + "uuid": "343aa67e-aeab-4877-bedf-4840dee0c03f", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-4", + "newScenarioState": "scenario-1-repos-hub4j-test-org-GHIssueTest-issues-15-comments-5", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/user-1.json similarity index 82% rename from src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json rename to src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/user-1.json index b332d26e7e..0488e5d4d2 100644 --- a/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/createIssueComment/mappings/user-1.json +++ b/src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/issueComment/mappings/user-1.json @@ -1,5 +1,5 @@ { - "id": "d167430d-0fa6-4993-80ea-5243b8b471e0", + "id": "eeb99288-463b-4405-b109-a023727fc9c7", "name": "user", "request": { "url": "/user", @@ -15,7 +15,7 @@ "bodyFileName": "user-1.json", "headers": { "Server": "GitHub.com", - "Date": "Thu, 22 Sep 2022 10:15:19 GMT", + "Date": "Thu, 22 Sep 2022 10:48:15 GMT", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ @@ -29,9 +29,9 @@ "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", "X-GitHub-Media-Type": "github.v3; format=json", "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4794", + "X-RateLimit-Remaining": "4673", "X-RateLimit-Reset": "1663844087", - "X-RateLimit-Used": "206", + "X-RateLimit-Used": "327", "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", @@ -39,10 +39,10 @@ "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "DB8B:12B09:59D06F0:5B4A0AD:632C35B7" + "X-GitHub-Request-Id": "CB40:C712:A346B8B:A599E20:632C3D6E" } }, - "uuid": "d167430d-0fa6-4993-80ea-5243b8b471e0", + "uuid": "eeb99288-463b-4405-b109-a023727fc9c7", "persistent": true, "insertionIndex": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/orgs_hub4j-test-org-2.json deleted file mode 100644 index def8ed366a..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/orgs_hub4j-test-org-2.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "url": "https://api.github.com/orgs/hub4j-test-org", - "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", - "events_url": "https://api.github.com/orgs/hub4j-test-org/events", - "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", - "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", - "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", - "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "description": null, - "is_verified": false, - "has_organization_projects": true, - "has_repository_projects": true, - "public_repos": 9, - "public_gists": 0, - "followers": 0, - "following": 0, - "html_url": "https://github.com/hub4j-test-org", - "created_at": "2014-05-10T19:39:11Z", - "updated_at": "2015-04-20T00:42:30Z", - "type": "Organization", - "total_private_repos": 0, - "owned_private_repos": 0, - "private_gists": 0, - "disk_usage": 132, - "collaborators": 0, - "billing_email": "kk@kohsuke.org", - "default_repository_permission": "none", - "members_can_create_repositories": false, - "two_factor_requirement_enabled": false, - "plan": { - "name": "free", - "space": 976562499, - "private_repos": 0, - "filled_seats": 3, - "seats": 0 - } -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-6.json deleted file mode 100644 index 0c38ff8974..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-6.json +++ /dev/null @@ -1,330 +0,0 @@ -{ - "id": 206888201, - "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", - "name": "github-api", - "full_name": "hub4j-test-org/github-api", - "private": false, - "owner": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", - "fork": true, - "url": "https://api.github.com/repos/hub4j-test-org/github-api", - "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", - "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:25:01Z", - "git_url": "git://github.com/hub4j-test-org/github-api.git", - "ssh_url": "git@github.com:hub4j-test-org/github-api.git", - "clone_url": "https://github.com/hub4j-test-org/github-api.git", - "svn_url": "https://github.com/hub4j-test-org/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, - "language": "Java", - "has_issues": false, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 1, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 0, - "open_issues": 1, - "watchers": 0, - "default_branch": "main", - "permissions": { - "admin": true, - "push": true, - "pull": true - }, - "allow_squash_merge": true, - "allow_merge_commit": true, - "allow_rebase_merge": true, - "organization": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "parent": { - "id": 617210, - "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", - "name": "github-api", - "full_name": "hub4j/github-api", - "private": false, - "owner": { - "login": "hub4j", - "id": 54909825, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", - "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j", - "html_url": "https://github.com/hub4j", - "followers_url": "https://api.github.com/users/hub4j/followers", - "following_url": "https://api.github.com/users/hub4j/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j/orgs", - "repos_url": "https://api.github.com/users/hub4j/repos", - "events_url": "https://api.github.com/users/hub4j/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j/github-api", - "description": "Java API for GitHub", - "fork": false, - "url": "https://api.github.com/repos/hub4j/github-api", - "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", - "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2019-09-07T00:07:16Z", - "pushed_at": "2019-09-07T00:07:14Z", - "git_url": "git://github.com/hub4j/github-api.git", - "ssh_url": "git@github.com:hub4j/github-api.git", - "clone_url": "https://github.com/hub4j/github-api.git", - "svn_url": "https://github.com/hub4j/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 551, - "watchers_count": 551, - "language": "Java", - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": true, - "forks_count": 427, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 96, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 427, - "open_issues": 96, - "watchers": 551, - "default_branch": "main" - }, - "source": { - "id": 617210, - "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", - "name": "github-api", - "full_name": "hub4j/github-api", - "private": false, - "owner": { - "login": "hub4j", - "id": 54909825, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", - "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j", - "html_url": "https://github.com/hub4j", - "followers_url": "https://api.github.com/users/hub4j/followers", - "following_url": "https://api.github.com/users/hub4j/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j/orgs", - "repos_url": "https://api.github.com/users/hub4j/repos", - "events_url": "https://api.github.com/users/hub4j/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j/github-api", - "description": "Java API for GitHub", - "fork": false, - "url": "https://api.github.com/repos/hub4j/github-api", - "forks_url": "https://api.github.com/repos/hub4j/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", - "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2019-09-07T00:07:16Z", - "pushed_at": "2019-09-07T00:07:14Z", - "git_url": "git://github.com/hub4j/github-api.git", - "ssh_url": "git@github.com:hub4j/github-api.git", - "clone_url": "https://github.com/hub4j/github-api.git", - "svn_url": "https://github.com/hub4j/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 551, - "watchers_count": 551, - "language": "Java", - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": true, - "forks_count": 427, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 96, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 427, - "open_issues": 96, - "watchers": 551, - "default_branch": "main" - }, - "network_count": 427, - "subscribers_count": 0 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_issues_270_comments-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_issues_270_comments-5.json deleted file mode 100644 index 5167d2b591..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_issues_270_comments-5.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/529177612", - "html_url": "https://github.com/hub4j-test-org/github-api/pull/270#issuecomment-529177612", - "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270", - "id": 529177612, - "node_id": "MDEyOklzc3VlQ29tbWVudDUyOTE3NzYxMg==", - "user": { - "login": "bitwiseman", - "id": 1958953, - "node_id": "MDQ6VXNlcjE5NTg5NTM=", - "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/bitwiseman", - "html_url": "https://github.com/bitwiseman", - "followers_url": "https://api.github.com/users/bitwiseman/followers", - "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", - "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", - "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", - "organizations_url": "https://api.github.com/users/bitwiseman/orgs", - "repos_url": "https://api.github.com/users/bitwiseman/repos", - "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", - "received_events_url": "https://api.github.com/users/bitwiseman/received_events", - "type": "User", - "site_admin": false - }, - "created_at": "2019-09-08T07:25:01Z", - "updated_at": "2019-09-08T07:25:01Z", - "author_association": "MEMBER", - "body": "Some comment" -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-7.json deleted file mode 100644 index a8f6a8b204..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-7.json +++ /dev/null @@ -1,329 +0,0 @@ -[ - { - "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270", - "id": 315252358, - "node_id": "MDExOlB1bGxSZXF1ZXN0MzE1MjUyMzU4", - "html_url": "https://github.com/hub4j-test-org/github-api/pull/270", - "diff_url": "https://github.com/hub4j-test-org/github-api/pull/270.diff", - "patch_url": "https://github.com/hub4j-test-org/github-api/pull/270.patch", - "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270", - "number": 270, - "state": "open", - "locked": false, - "title": "createPullRequestComment", - "user": { - "login": "bitwiseman", - "id": 1958953, - "node_id": "MDQ6VXNlcjE5NTg5NTM=", - "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/bitwiseman", - "html_url": "https://github.com/bitwiseman", - "followers_url": "https://api.github.com/users/bitwiseman/followers", - "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", - "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", - "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", - "organizations_url": "https://api.github.com/users/bitwiseman/orgs", - "repos_url": "https://api.github.com/users/bitwiseman/repos", - "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", - "received_events_url": "https://api.github.com/users/bitwiseman/received_events", - "type": "User", - "site_admin": false - }, - "body": "## test", - "created_at": "2019-09-08T07:25:00Z", - "updated_at": "2019-09-08T07:25:01Z", - "closed_at": null, - "merged_at": null, - "merge_commit_sha": "cfe2edc76bbeefe5624061e17537052bddba3138", - "assignee": null, - "assignees": [], - "requested_reviewers": [], - "requested_teams": [], - "labels": [], - "milestone": null, - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits", - "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments", - "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", - "head": { - "label": "hub4j-test-org:test/stable", - "ref": "test/stable", - "sha": "2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", - "user": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "repo": { - "id": 206888201, - "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", - "name": "github-api", - "full_name": "hub4j-test-org/github-api", - "private": false, - "owner": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", - "fork": true, - "url": "https://api.github.com/repos/hub4j-test-org/github-api", - "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", - "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:25:01Z", - "git_url": "git://github.com/hub4j-test-org/github-api.git", - "ssh_url": "git@github.com:hub4j-test-org/github-api.git", - "clone_url": "https://github.com/hub4j-test-org/github-api.git", - "svn_url": "https://github.com/hub4j-test-org/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, - "language": "Java", - "has_issues": false, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 1, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 0, - "open_issues": 1, - "watchers": 0, - "default_branch": "main" - } - }, - "base": { - "label": "hub4j-test-org:main", - "ref": "main", - "sha": "ecec449372b1e8270524a35c1a5aa8fdaf0e6676", - "user": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "repo": { - "id": 206888201, - "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", - "name": "github-api", - "full_name": "hub4j-test-org/github-api", - "private": false, - "owner": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", - "fork": true, - "url": "https://api.github.com/repos/hub4j-test-org/github-api", - "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", - "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:25:01Z", - "git_url": "git://github.com/hub4j-test-org/github-api.git", - "ssh_url": "git@github.com:hub4j-test-org/github-api.git", - "clone_url": "https://github.com/hub4j-test-org/github-api.git", - "svn_url": "https://github.com/hub4j-test-org/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, - "language": "Java", - "has_issues": false, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 1, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 0, - "open_issues": 1, - "watchers": 0, - "default_branch": "main" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270" - }, - "html": { - "href": "https://github.com/hub4j-test-org/github-api/pull/270" - }, - "issue": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270" - }, - "comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments" - }, - "review_comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments" - }, - "review_comment": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" - }, - "commits": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits" - }, - "statuses": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf" - } - }, - "author_association": "MEMBER" - } -] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls_270-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls_270-8.json deleted file mode 100644 index bb3c529869..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls_270-8.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270", - "id": 315252358, - "node_id": "MDExOlB1bGxSZXF1ZXN0MzE1MjUyMzU4", - "html_url": "https://github.com/hub4j-test-org/github-api/pull/270", - "diff_url": "https://github.com/hub4j-test-org/github-api/pull/270.diff", - "patch_url": "https://github.com/hub4j-test-org/github-api/pull/270.patch", - "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270", - "number": 270, - "state": "closed", - "locked": false, - "title": "createPullRequestComment", - "user": { - "login": "bitwiseman", - "id": 1958953, - "node_id": "MDQ6VXNlcjE5NTg5NTM=", - "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/bitwiseman", - "html_url": "https://github.com/bitwiseman", - "followers_url": "https://api.github.com/users/bitwiseman/followers", - "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", - "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", - "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", - "organizations_url": "https://api.github.com/users/bitwiseman/orgs", - "repos_url": "https://api.github.com/users/bitwiseman/repos", - "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", - "received_events_url": "https://api.github.com/users/bitwiseman/received_events", - "type": "User", - "site_admin": false - }, - "body": "## test", - "created_at": "2019-09-08T07:25:00Z", - "updated_at": "2019-09-08T07:25:02Z", - "closed_at": "2019-09-08T07:25:02Z", - "merged_at": null, - "merge_commit_sha": "cfe2edc76bbeefe5624061e17537052bddba3138", - "assignee": null, - "assignees": [], - "requested_reviewers": [], - "requested_teams": [], - "labels": [], - "milestone": null, - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits", - "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments", - "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", - "head": { - "label": "hub4j-test-org:test/stable", - "ref": "test/stable", - "sha": "2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", - "user": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "repo": { - "id": 206888201, - "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", - "name": "github-api", - "full_name": "hub4j-test-org/github-api", - "private": false, - "owner": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", - "fork": true, - "url": "https://api.github.com/repos/hub4j-test-org/github-api", - "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", - "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:25:01Z", - "git_url": "git://github.com/hub4j-test-org/github-api.git", - "ssh_url": "git@github.com:hub4j-test-org/github-api.git", - "clone_url": "https://github.com/hub4j-test-org/github-api.git", - "svn_url": "https://github.com/hub4j-test-org/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, - "language": "Java", - "has_issues": false, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 0, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 0, - "open_issues": 0, - "watchers": 0, - "default_branch": "main" - } - }, - "base": { - "label": "hub4j-test-org:main", - "ref": "main", - "sha": "ecec449372b1e8270524a35c1a5aa8fdaf0e6676", - "user": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "repo": { - "id": 206888201, - "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", - "name": "github-api", - "full_name": "hub4j-test-org/github-api", - "private": false, - "owner": { - "login": "hub4j-test-org", - "id": 7544739, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/hub4j-test-org", - "html_url": "https://github.com/hub4j-test-org", - "followers_url": "https://api.github.com/users/hub4j-test-org/followers", - "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}", - "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}", - "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions", - "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs", - "repos_url": "https://api.github.com/users/hub4j-test-org/repos", - "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}", - "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", - "fork": true, - "url": "https://api.github.com/repos/hub4j-test-org/github-api", - "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", - "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams", - "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks", - "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}", - "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events", - "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}", - "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}", - "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags", - "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}", - "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages", - "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers", - "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors", - "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers", - "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription", - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}", - "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges", - "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads", - "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}", - "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}", - "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}", - "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}", - "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", - "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", - "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:25:01Z", - "git_url": "git://github.com/hub4j-test-org/github-api.git", - "ssh_url": "git@github.com:hub4j-test-org/github-api.git", - "clone_url": "https://github.com/hub4j-test-org/github-api.git", - "svn_url": "https://github.com/hub4j-test-org/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, - "language": "Java", - "has_issues": false, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 0, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "forks": 0, - "open_issues": 0, - "watchers": 0, - "default_branch": "main" - } - }, - "_links": { - "self": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270" - }, - "html": { - "href": "https://github.com/hub4j-test-org/github-api/pull/270" - }, - "issue": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270" - }, - "comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments" - }, - "review_comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments" - }, - "review_comment": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" - }, - "commits": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits" - }, - "statuses": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf" - } - }, - "author_association": "MEMBER", - "merged": false, - "mergeable": true, - "rebaseable": true, - "mergeable_state": "clean", - "merged_by": null, - "comments": 1, - "review_comments": 0, - "maintainer_can_modify": false, - "commits": 1, - "additions": 1, - "deletions": 1, - "changed_files": 1 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/user-1.json deleted file mode 100644 index b9ce24cb03..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/user-1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "login": "bitwiseman", - "id": 1958953, - "node_id": "MDQ6VXNlcjE5NTg5NTM=", - "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/bitwiseman", - "html_url": "https://github.com/bitwiseman", - "followers_url": "https://api.github.com/users/bitwiseman/followers", - "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", - "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", - "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", - "organizations_url": "https://api.github.com/users/bitwiseman/orgs", - "repos_url": "https://api.github.com/users/bitwiseman/repos", - "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", - "received_events_url": "https://api.github.com/users/bitwiseman/received_events", - "type": "User", - "site_admin": false, - "name": "Liam Newman", - "company": "Cloudbees, Inc.", - "blog": "", - "location": "Seattle, WA, USA", - "email": "bitwiseman@gmail.com", - "hireable": null, - "bio": "https://twitter.com/bitwiseman", - "public_repos": 166, - "public_gists": 4, - "followers": 133, - "following": 9, - "created_at": "2012-07-11T20:38:33Z", - "updated_at": "2019-06-03T17:47:20Z" -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json deleted file mode 100644 index f7879c82d5..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "id": "de7260bc-cad0-4eeb-ab76-129228a40fa4", - "name": "repos_hub4j-test-org_github-api", - "request": { - "url": "/repos/hub4j-test-org/github-api", - "method": "GET", - "headers": { - "Accept": { - "equalTo": "application/vnd.github.v3+json" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api-3.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:25:00 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4847", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"c7444e60baaecbb2c4b3bfb5ec0122de\"", - "Last-Modified": "Sun, 08 Sep 2019 07:24:56 GMT", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "repo", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D30882:F67052:5D74ACCB" - } - }, - "uuid": "de7260bc-cad0-4eeb-ab76-129228a40fa4", - "persistent": true, - "scenarioName": "scenario-1-repos-hub4j-test-org-github-api", - "requiredScenarioState": "Started", - "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-2", - "insertionIndex": 3 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-6.json deleted file mode 100644 index 3b5588bad8..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api-6.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id": "6e0179a4-9d47-4435-897a-ca80019c4ee1", - "name": "repos_hub4j-test-org_github-api", - "request": { - "url": "/repos/hub4j-test-org/github-api", - "method": "GET", - "headers": { - "Accept": { - "equalTo": "application/vnd.github.v3+json" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api-6.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:25:02 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4844", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"72809813df8fb60cd108f20632d0c629\"", - "Last-Modified": "Sun, 08 Sep 2019 07:24:56 GMT", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "repo", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D309B7:F67195:5D74ACCD" - } - }, - "uuid": "6e0179a4-9d47-4435-897a-ca80019c4ee1", - "persistent": true, - "scenarioName": "scenario-1-repos-hub4j-test-org-github-api", - "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-2", - "insertionIndex": 6 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_270_comments-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_270_comments-5.json deleted file mode 100644 index 26cf97e1b6..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_270_comments-5.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "2cd4dd92-58d7-4423-bbe8-babe22bd36ac", - "name": "repos_hub4j-test-org_github-api_issues_270_comments", - "request": { - "url": "/repos/hub4j-test-org/github-api/issues/270/comments", - "method": "POST", - "bodyPatterns": [ - { - "equalToJson": "{\"body\":\"Some comment\"}", - "ignoreArrayOrder": true, - "ignoreExtraElements": true - } - ], - "headers": { - "Accept": { - "equalTo": "application/vnd.github.v3+json" - } - } - }, - "response": { - "status": 201, - "bodyFileName": "repos_hub4j-test-org_github-api_issues_270_comments-5.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:25:01 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "201 Created", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4845", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "\"ef99935785f5188662f592f8999d1b8a\"", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "", - "Location": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/529177612", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D30902:F670E9:5D74ACCC" - } - }, - "uuid": "2cd4dd92-58d7-4423-bbe8-babe22bd36ac", - "persistent": true, - "insertionIndex": 5 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-7.json deleted file mode 100644 index 59d8c98094..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-7.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "id": "420dc28a-cfc8-4fbc-8cef-7123c0387966", - "name": "repos_hub4j-test-org_github-api_pulls", - "request": { - "url": "/repos/hub4j-test-org/github-api/pulls?state=open", - "method": "GET", - "headers": { - "Accept": { - "equalTo": "application/vnd.github.shadow-cat-preview+json" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api_pulls-7.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:25:02 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4843", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"02871f6e732cc23dc28a7c5b94f35624\"", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D309FE:F6720B:5D74ACCE" - } - }, - "uuid": "420dc28a-cfc8-4fbc-8cef-7123c0387966", - "persistent": true, - "insertionIndex": 7 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls_270-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls_270-8.json deleted file mode 100644 index 591c72ba79..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls_270-8.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "id": "1a6fbb20-8969-454a-94be-1e24388e7ed4", - "name": "repos_hub4j-test-org_github-api_pulls_270", - "request": { - "url": "/repos/hub4j-test-org/github-api/pulls/270", - "method": "PATCH", - "bodyPatterns": [ - { - "equalToJson": "{\"state\":\"closed\"}", - "ignoreArrayOrder": true, - "ignoreExtraElements": true - } - ], - "headers": { - "Accept": { - "equalTo": "application/vnd.github.shadow-cat-preview+json" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api_pulls_270-8.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:25:02 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4842", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"2f5b48a63cc3e7bc5f36d46808e9d52d\"", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D30A26:F67237:5D74ACCE" - } - }, - "uuid": "1a6fbb20-8969-454a-94be-1e24388e7ed4", - "persistent": true, - "insertionIndex": 8 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/user-1.json deleted file mode 100644 index d8473cc384..0000000000 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/user-1.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "id": "c4d4d68f-a141-4fad-a2c9-539e3a21fe94", - "name": "user", - "request": { - "url": "/user", - "method": "GET", - "headers": { - "Accept": { - "equalTo": "application/vnd.github.v3+json" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "user-1.json", - "headers": { - "Date": "Sun, 08 Sep 2019 07:24:59 GMT", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4849", - "X-RateLimit-Reset": "1567929276", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"3ba1de3523043df743651bd23efc7def\"", - "Last-Modified": "Mon, 03 Jun 2019 17:47:20 GMT", - "X-OAuth-Scopes": "gist, notifications, repo", - "X-Accepted-OAuth-Scopes": "", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", - "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", - "X-Frame-Options": "deny", - "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", - "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", - "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D3086F:F6703D:5D74ACCB" - } - }, - "uuid": "c4d4d68f-a141-4fad-a2c9-539e3a21fe94", - "persistent": true, - "insertionIndex": 1 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/orgs_hub4j-test-org-2.json new file mode 100644 index 0000000000..00a6eae928 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/orgs_hub4j-test-org-2.json @@ -0,0 +1,62 @@ +{ + "login": "hub4j-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/hub4j-test-org", + "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos", + "events_url": "https://api.github.com/orgs/hub4j-test-org/events", + "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks", + "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues", + "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", + "description": "Hub4j Test Org Description (this could be null or blank too)", + "name": "Hub4j Test Org Name (this could be null or blank too)", + "company": null, + "blog": "https://hub4j.url.io/could/be/null", + "location": "Hub4j Test Org Location (this could be null or blank too)", + "email": "hub4jtestorgemail@could.be.null.com", + "twitter_username": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 53, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/hub4j-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2020-06-04T05:56:10Z", + "type": "Organization", + "total_private_repos": 5, + "owned_private_repos": 5, + "private_gists": 0, + "disk_usage": 11980, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "members_can_create_public_repositories": false, + "members_can_create_private_repositories": false, + "members_can_create_internal_repositories": false, + "members_can_create_pages": true, + "members_can_fork_private_repositories": false, + "web_commit_signoff_required": false, + "members_can_create_public_pages": true, + "members_can_create_private_pages": true, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 10000, + "filled_seats": 38, + "seats": 3 + }, + "advanced_security_enabled_for_new_repositories": false, + "dependabot_alerts_enabled_for_new_repositories": false, + "dependabot_security_updates_enabled_for_new_repositories": false, + "dependency_graph_enabled_for_new_repositories": false, + "secret_scanning_enabled_for_new_repositories": false, + "secret_scanning_push_protection_enabled_for_new_repositories": false +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api-3.json similarity index 87% rename from src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-3.json rename to src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api-3.json index 34a92df5b2..2160849b57 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api-3.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api-3.json @@ -8,7 +8,7 @@ "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -25,7 +25,7 @@ "site_admin": false }, "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", + "description": "Tricky", "fork": true, "url": "https://api.github.com/repos/hub4j-test-org/github-api", "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", @@ -65,18 +65,18 @@ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:24:57Z", + "updated_at": "2022-05-23T14:23:52Z", + "pushed_at": "2022-09-22T10:46:32Z", "git_url": "git://github.com/hub4j-test-org/github-api.git", "ssh_url": "git@github.com:hub4j-test-org/github-api.git", "clone_url": "https://github.com/hub4j-test-org/github-api.git", "svn_url": "https://github.com/hub4j-test-org/github-api", "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, + "size": 19045, + "stargazers_count": 1, + "watchers_count": 1, "language": "Java", - "has_issues": false, + "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, @@ -85,7 +85,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 0, + "open_issues_count": 7, "license": { "key": "mit", "name": "MIT License", @@ -93,23 +93,39 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", "forks": 0, - "open_issues": 0, - "watchers": 0, + "open_issues": 7, + "watchers": 1, "default_branch": "main", "permissions": { "admin": true, + "maintain": true, "push": true, + "triage": true, "pull": true }, + "temp_clone_token": "", "allow_squash_merge": true, "allow_merge_commit": true, "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", "organization": { "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -135,7 +151,7 @@ "login": "hub4j", "id": 54909825, "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", - "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/54909825?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j", "html_url": "https://github.com/hub4j", @@ -192,27 +208,27 @@ "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2019-09-07T00:07:16Z", - "pushed_at": "2019-09-07T00:07:14Z", + "updated_at": "2022-09-20T21:24:35Z", + "pushed_at": "2022-09-21T16:50:54Z", "git_url": "git://github.com/hub4j/github-api.git", "ssh_url": "git@github.com:hub4j/github-api.git", "clone_url": "https://github.com/hub4j/github-api.git", "svn_url": "https://github.com/hub4j/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 551, - "watchers_count": 551, + "homepage": "https://github-api.kohsuke.org/", + "size": 40597, + "stargazers_count": 934, + "watchers_count": 934, "language": "Java", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, - "forks_count": 427, + "forks_count": 627, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 96, + "open_issues_count": 120, "license": { "key": "mit", "name": "MIT License", @@ -220,9 +236,22 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, - "forks": 427, - "open_issues": 96, - "watchers": 551, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "api", + "client-library", + "github", + "github-api", + "github-api-v3", + "java", + "java-api" + ], + "visibility": "public", + "forks": 627, + "open_issues": 120, + "watchers": 934, "default_branch": "main" }, "source": { @@ -235,7 +264,7 @@ "login": "hub4j", "id": 54909825, "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", - "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/54909825?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j", "html_url": "https://github.com/hub4j", @@ -292,27 +321,27 @@ "releases_url": "https://api.github.com/repos/hub4j/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j/github-api/deployments", "created_at": "2010-04-19T04:13:03Z", - "updated_at": "2019-09-07T00:07:16Z", - "pushed_at": "2019-09-07T00:07:14Z", + "updated_at": "2022-09-20T21:24:35Z", + "pushed_at": "2022-09-21T16:50:54Z", "git_url": "git://github.com/hub4j/github-api.git", "ssh_url": "git@github.com:hub4j/github-api.git", "clone_url": "https://github.com/hub4j/github-api.git", "svn_url": "https://github.com/hub4j/github-api", - "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 551, - "watchers_count": 551, + "homepage": "https://github-api.kohsuke.org/", + "size": 40597, + "stargazers_count": 934, + "watchers_count": 934, "language": "Java", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, - "forks_count": 427, + "forks_count": 627, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 96, + "open_issues_count": 120, "license": { "key": "mit", "name": "MIT License", @@ -320,11 +349,24 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, - "forks": 427, - "open_issues": 96, - "watchers": 551, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "api", + "client-library", + "github", + "github-api", + "github-api-v3", + "java", + "java-api" + ], + "visibility": "public", + "forks": 627, + "open_issues": 120, + "watchers": 934, "default_branch": "main" }, - "network_count": 427, - "subscribers_count": 0 + "network_count": 627, + "subscribers_count": 1 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-10.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-10.json new file mode 100644 index 0000000000..d6db046328 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-10.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-12.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-12.json new file mode 100644 index 0000000000..66a4fd37a2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-12.json @@ -0,0 +1,44 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?u=952a892aea58858acd1668c10aa6c36ba3dcd7b5&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-13.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-13.json new file mode 100644 index 0000000000..ca19491650 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-13.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-14.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-14.json new file mode 100644 index 0000000000..ca19491650 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-14.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-15.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-15.json new file mode 100644 index 0000000000..ca19491650 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-15.json @@ -0,0 +1,90 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-16.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-16.json new file mode 100644 index 0000000000..01718993b6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-16.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-17.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-17.json new file mode 100644 index 0000000000..01718993b6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-17.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-19.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-19.json new file mode 100644 index 0000000000..01718993b6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-19.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853752", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853752, + "node_id": "IC_kwDODFTdCc5Ky4x4", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:35Z", + "updated_at": "2022-09-22T10:48:35Z", + "author_association": "MEMBER", + "body": "Second comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-7.json new file mode 100644 index 0000000000..393981cd2a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-7.json @@ -0,0 +1,44 @@ +{ + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?u=952a892aea58858acd1668c10aa6c36ba3dcd7b5&v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-8.json new file mode 100644 index 0000000000..d6db046328 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-8.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-9.json new file mode 100644 index 0000000000..d6db046328 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_issues_461_comments-9.json @@ -0,0 +1,46 @@ +[ + { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461#issuecomment-1254853699", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "id": 1254853699, + "node_id": "IC_kwDODFTdCc5Ky4xD", + "user": { + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2022-09-22T10:48:31Z", + "updated_at": "2022-09-22T10:48:31Z", + "author_association": "MEMBER", + "body": "First comment", + "reactions": { + "url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json similarity index 84% rename from src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json rename to src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json index ebb919c913..64c7e8d4c2 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/repos_hub4j-test-org_github-api_pulls-4.json @@ -1,38 +1,38 @@ { - "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270", - "id": 315252358, - "node_id": "MDExOlB1bGxSZXF1ZXN0MzE1MjUyMzU4", - "html_url": "https://github.com/hub4j-test-org/github-api/pull/270", - "diff_url": "https://github.com/hub4j-test-org/github-api/pull/270.diff", - "patch_url": "https://github.com/hub4j-test-org/github-api/pull/270.patch", - "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270", - "number": 270, + "url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461", + "id": 1063990098, + "node_id": "PR_kwDODFTdCc4_azNS", + "html_url": "https://github.com/hub4j-test-org/github-api/pull/461", + "diff_url": "https://github.com/hub4j-test-org/github-api/pull/461.diff", + "patch_url": "https://github.com/hub4j-test-org/github-api/pull/461.patch", + "issue_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461", + "number": 461, "state": "open", "locked": false, "title": "createPullRequestComment", "user": { - "login": "bitwiseman", - "id": 1958953, - "node_id": "MDQ6VXNlcjE5NTg5NTM=", - "avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/bitwiseman", - "html_url": "https://github.com/bitwiseman", - "followers_url": "https://api.github.com/users/bitwiseman/followers", - "following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", - "gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", - "starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", - "organizations_url": "https://api.github.com/users/bitwiseman/orgs", - "repos_url": "https://api.github.com/users/bitwiseman/repos", - "events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", - "received_events_url": "https://api.github.com/users/bitwiseman/received_events", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", "type": "User", "site_admin": false }, "body": "## test", - "created_at": "2019-09-08T07:25:00Z", - "updated_at": "2019-09-08T07:25:00Z", + "created_at": "2022-09-22T10:48:29Z", + "updated_at": "2022-09-22T10:48:29Z", "closed_at": null, "merged_at": null, "merge_commit_sha": null, @@ -42,20 +42,21 @@ "requested_teams": [], "labels": [], "milestone": null, - "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits", - "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments", + "draft": false, + "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461/commits", + "review_comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461/comments", "review_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}", - "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments", - "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", + "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461/comments", + "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/07374fe73aff1c2024a8d4114b32406c7a8e89b7", "head": { "label": "hub4j-test-org:test/stable", "ref": "test/stable", - "sha": "2d29c787b46ce61b98a1c13e05e21ebc21f49dbf", + "sha": "07374fe73aff1c2024a8d4114b32406c7a8e89b7", "user": { "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -81,7 +82,7 @@ "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -98,7 +99,7 @@ "site_admin": false }, "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", + "description": "Tricky", "fork": true, "url": "https://api.github.com/repos/hub4j-test-org/github-api", "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", @@ -138,18 +139,18 @@ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:24:57Z", + "updated_at": "2022-05-23T14:23:52Z", + "pushed_at": "2022-09-22T10:46:32Z", "git_url": "git://github.com/hub4j-test-org/github-api.git", "ssh_url": "git@github.com:hub4j-test-org/github-api.git", "clone_url": "https://github.com/hub4j-test-org/github-api.git", "svn_url": "https://github.com/hub4j-test-org/github-api", "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, + "size": 19045, + "stargazers_count": 1, + "watchers_count": 1, "language": "Java", - "has_issues": false, + "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, @@ -158,7 +159,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 1, + "open_issues_count": 8, "license": { "key": "mit", "name": "MIT License", @@ -166,21 +167,26 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", "forks": 0, - "open_issues": 1, - "watchers": 0, + "open_issues": 8, + "watchers": 1, "default_branch": "main" } }, "base": { "label": "hub4j-test-org:main", "ref": "main", - "sha": "ecec449372b1e8270524a35c1a5aa8fdaf0e6676", + "sha": "8051615eff597f4e49f4f47625e6fc2b49f26bfc", "user": { "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -206,7 +212,7 @@ "login": "hub4j-test-org", "id": 7544739, "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", - "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "avatar_url": "https://avatars.githubusercontent.com/u/7544739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hub4j-test-org", "html_url": "https://github.com/hub4j-test-org", @@ -223,7 +229,7 @@ "site_admin": false }, "html_url": "https://github.com/hub4j-test-org/github-api", - "description": "Java API for GitHub", + "description": "Tricky", "fork": true, "url": "https://api.github.com/repos/hub4j-test-org/github-api", "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks", @@ -263,18 +269,18 @@ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}", "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments", "created_at": "2019-09-06T23:26:04Z", - "updated_at": "2019-09-08T07:24:56Z", - "pushed_at": "2019-09-08T07:24:57Z", + "updated_at": "2022-05-23T14:23:52Z", + "pushed_at": "2022-09-22T10:46:32Z", "git_url": "git://github.com/hub4j-test-org/github-api.git", "ssh_url": "git@github.com:hub4j-test-org/github-api.git", "clone_url": "https://github.com/hub4j-test-org/github-api.git", "svn_url": "https://github.com/hub4j-test-org/github-api", "homepage": "http://github-api.kohsuke.org/", - "size": 11386, - "stargazers_count": 0, - "watchers_count": 0, + "size": 19045, + "stargazers_count": 1, + "watchers_count": 1, "language": "Java", - "has_issues": false, + "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, @@ -283,7 +289,7 @@ "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 1, + "open_issues_count": 8, "license": { "key": "mit", "name": "MIT License", @@ -291,39 +297,46 @@ "url": "https://api.github.com/licenses/mit", "node_id": "MDc6TGljZW5zZTEz" }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public", "forks": 0, - "open_issues": 1, - "watchers": 0, + "open_issues": 8, + "watchers": 1, "default_branch": "main" } }, "_links": { "self": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461" }, "html": { - "href": "https://github.com/hub4j-test-org/github-api/pull/270" + "href": "https://github.com/hub4j-test-org/github-api/pull/461" }, "issue": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461" }, "comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/270/comments" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/issues/461/comments" }, "review_comments": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/comments" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461/comments" }, "review_comment": { "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/comments{/number}" }, "commits": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270/commits" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461/commits" }, "statuses": { - "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/2d29c787b46ce61b98a1c13e05e21ebc21f49dbf" + "href": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/07374fe73aff1c2024a8d4114b32406c7a8e89b7" } }, "author_association": "MEMBER", + "auto_merge": null, + "active_lock_reason": null, "merged": false, "mergeable": null, "rebaseable": null, @@ -332,8 +345,8 @@ "comments": 0, "review_comments": 0, "maintainer_can_modify": false, - "commits": 1, - "additions": 1, - "deletions": 1, - "changed_files": 1 + "commits": 3, + "additions": 3, + "deletions": 2, + "changed_files": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/user-1.json new file mode 100644 index 0000000000..6cbb51aae1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/__files/user-1.json @@ -0,0 +1,34 @@ +{ + "login": "yrodiere", + "id": 412878, + "node_id": "MDQ6VXNlcjQxMjg3OA==", + "avatar_url": "https://avatars.githubusercontent.com/u/412878?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/yrodiere", + "html_url": "https://github.com/yrodiere", + "followers_url": "https://api.github.com/users/yrodiere/followers", + "following_url": "https://api.github.com/users/yrodiere/following{/other_user}", + "gists_url": "https://api.github.com/users/yrodiere/gists{/gist_id}", + "starred_url": "https://api.github.com/users/yrodiere/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/yrodiere/subscriptions", + "organizations_url": "https://api.github.com/users/yrodiere/orgs", + "repos_url": "https://api.github.com/users/yrodiere/repos", + "events_url": "https://api.github.com/users/yrodiere/events{/privacy}", + "received_events_url": "https://api.github.com/users/yrodiere/received_events", + "type": "User", + "site_admin": false, + "name": "Yoann Rodière", + "company": "Red Hat - @hibernate", + "blog": "", + "location": null, + "email": "yoann@hibernate.org", + "hireable": null, + "bio": "Hibernate Search lead developer", + "twitter_username": "yoannrodiere", + "public_repos": 132, + "public_gists": 16, + "followers": 41, + "following": 4, + "created_at": "2010-09-23T12:31:20Z", + "updated_at": "2022-09-22T10:12:47Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/orgs_hub4j-test-org-2.json similarity index 53% rename from src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/orgs_hub4j-test-org-2.json rename to src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/orgs_hub4j-test-org-2.json index 485a7e2271..5481d8b6d1 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/orgs_hub4j-test-org-2.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/orgs_hub4j-test-org-2.json @@ -1,5 +1,5 @@ { - "id": "ad4f3477-141d-413d-aae6-d8d877f4359c", + "id": "1b28adc1-99dd-4600-9786-b4571b6c9222", "name": "orgs_hub4j-test-org", "request": { "url": "/orgs/hub4j-test-org", @@ -14,35 +14,35 @@ "status": 200, "bodyFileName": "orgs_hub4j-test-org-2.json", "headers": { - "Date": "Sun, 08 Sep 2019 07:24:59 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4848", - "X-RateLimit-Reset": "1567929276", + "Date": "Thu, 22 Sep 2022 10:48:28 GMT", + "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "W/\"d36965e157281b2a309c39e4c2343a55\"", - "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", - "X-OAuth-Scopes": "gist, notifications, repo", + "ETag": "W/\"fd5df5bd73106f275e6fe9f78f0d8acc4551774eae3e2e391588d01d0bc6d21f\"", + "Last-Modified": "Thu, 04 Jun 2020 05:56:10 GMT", + "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4642", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "358", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D30877:F67045:5D74ACCB" + "X-GitHub-Request-Id": "C91C:8EE4:1080B77:10C76A0:632C3D7C" } }, - "uuid": "ad4f3477-141d-413d-aae6-d8d877f4359c", + "uuid": "1b28adc1-99dd-4600-9786-b4571b6c9222", "persistent": true, "insertionIndex": 2 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json new file mode 100644 index 0000000000..e6ac02de4e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api-3.json @@ -0,0 +1,48 @@ +{ + "id": "8a8f6516-07ca-4a5c-a55e-f8f1f44f32bb", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-3.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"6f88fa938af080ce16f0bb3b78a3deb9532df3650fcaec6198f00d858a32be62\"", + "Last-Modified": "Mon, 23 May 2022 14:23:52 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "repo", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4641", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "359", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C92C:2C44:9A6AF38:9CADE9A:632C3D7C" + } + }, + "uuid": "8a8f6516-07ca-4a5c-a55e-f8f1f44f32bb", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-10.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-10.json new file mode 100644 index 0000000000..a68c2141ed --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-10.json @@ -0,0 +1,50 @@ +{ + "id": "1078bd28-5c95-4d53-a177-458f842ef231", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A31Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-10.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"ed52590726ad6d54eec0ce4709383619350e680fe98bf57e348989c02c6ad71a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4634", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "366", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C95A:A95E:67D2064:6970462:632C3D80" + } + }, + "uuid": "1078bd28-5c95-4d53-a177-458f842ef231", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-11.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-11.json new file mode 100644 index 0000000000..006bdc8147 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-11.json @@ -0,0 +1,50 @@ +{ + "id": "dd47ce05-2948-4c9d-a74c-ab657486b05d", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A32Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4633", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "367", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C966:10DC3:A565024:A7B465C:632C3D81" + } + }, + "uuid": "dd47ce05-2948-4c9d-a74c-ab657486b05d", + "persistent": true, + "scenarioName": "scenario-3-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-3-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-12.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-12.json new file mode 100644 index 0000000000..5825798460 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-12.json @@ -0,0 +1,55 @@ +{ + "id": "7b1d08ce-a2d7-41ab-9771-b20d774d7257", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"body\":\"Second comment\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-12.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"b18faca4696eb1d7373a1350e5948c2f70d3231c331e7976d408c12ac106ddfc\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4632", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "368", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C972:DF11:9E74813:A0BDB5C:632C3D83", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853752" + } + }, + "uuid": "7b1d08ce-a2d7-41ab-9771-b20d774d7257", + "persistent": true, + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-13.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-13.json new file mode 100644 index 0000000000..ce34afffed --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-13.json @@ -0,0 +1,50 @@ +{ + "id": "ac2ede1e-49ac-4d19-ac26-d89d05e86142", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-13.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"17bd19bcda00ee91af3bf82e0b425578cf009bf9ef87bab28b2685586cb36b51\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4631", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "369", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "EE93:644B:3F43845:405030B:632C3D84" + } + }, + "uuid": "ac2ede1e-49ac-4d19-ac26-d89d05e86142", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-5", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-6", + "insertionIndex": 13 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-14.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-14.json new file mode 100644 index 0000000000..6f8156c5e6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-14.json @@ -0,0 +1,49 @@ +{ + "id": "61a7b784-0830-4431-89f3-f084ad15ebef", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-14.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"17bd19bcda00ee91af3bf82e0b425578cf009bf9ef87bab28b2685586cb36b51\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4630", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "370", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F46A:CC72:5E50F7C:5FD7A8A:632C3D84" + } + }, + "uuid": "61a7b784-0830-4431-89f3-f084ad15ebef", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-6", + "insertionIndex": 14 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-15.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-15.json new file mode 100644 index 0000000000..0460219a1b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-15.json @@ -0,0 +1,49 @@ +{ + "id": "30b7a9da-052d-4483-8069-6b52992ee393", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A31Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-15.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"17bd19bcda00ee91af3bf82e0b425578cf009bf9ef87bab28b2685586cb36b51\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4629", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "371", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F723:5103:9709C33:9950295:632C3D85" + } + }, + "uuid": "30b7a9da-052d-4483-8069-6b52992ee393", + "persistent": true, + "scenarioName": "scenario-2-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-2-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-16.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-16.json new file mode 100644 index 0000000000..b3a1682af0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-16.json @@ -0,0 +1,49 @@ +{ + "id": "f2bb23a4-76a1-4ac2-aac7-428c2e231d01", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A32Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-16.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"218b6762c12567bc84771830580d82ba55b200ae3e0b1148717c9b213157005a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4628", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "372", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "E89D:5420:96FDD6A:9943491:632C3D85" + } + }, + "uuid": "f2bb23a4-76a1-4ac2-aac7-428c2e231d01", + "persistent": true, + "scenarioName": "scenario-3-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-3-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 16 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-17.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-17.json new file mode 100644 index 0000000000..dcd4a2f84d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-17.json @@ -0,0 +1,50 @@ +{ + "id": "78fb3efb-7ff7-4385-9609-3053b86b2162", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A35Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-17.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"218b6762c12567bc84771830580d82ba55b200ae3e0b1148717c9b213157005a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4627", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "373", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F5B9:5420:96FDEA8:99435F5:632C3D85" + } + }, + "uuid": "78fb3efb-7ff7-4385-9609-3053b86b2162", + "persistent": true, + "scenarioName": "scenario-4-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-4-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-18.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-18.json new file mode 100644 index 0000000000..65738c57a5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-18.json @@ -0,0 +1,47 @@ +{ + "id": "f8929dfd-1a19-498c-8e59-7ad284942eb6", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A36Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4626", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "374", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "F5B8:082A:99AEBE5:9BF1873:632C3D86" + } + }, + "uuid": "f8929dfd-1a19-498c-8e59-7ad284942eb6", + "persistent": true, + "insertionIndex": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-19.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-19.json new file mode 100644 index 0000000000..6f9e84c76d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-19.json @@ -0,0 +1,49 @@ +{ + "id": "bdc5de29-aaa2-4c9b-9f1e-1b86096dee5f", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments?since=2022-09-22T10%3A48%3A35Z", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-19.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"218b6762c12567bc84771830580d82ba55b200ae3e0b1148717c9b213157005a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4625", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "375", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "D3D9:AA4E:9AFDD8C:9D455FC:632C3D86" + } + }, + "uuid": "bdc5de29-aaa2-4c9b-9f1e-1b86096dee5f", + "persistent": true, + "scenarioName": "scenario-4-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-4-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 19 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-5.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-5.json new file mode 100644 index 0000000000..6cfbde4bc6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-5.json @@ -0,0 +1,50 @@ +{ + "id": "5c6ed0e7-4323-448e-aeb8-6c68699c878d", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4639", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "361", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C93A:2C44:9A6B592:9CAE52D:632C3D7E" + } + }, + "uuid": "5c6ed0e7-4323-448e-aeb8-6c68699c878d", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-2", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-6.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-6.json new file mode 100644 index 0000000000..63ad6f6106 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-6.json @@ -0,0 +1,50 @@ +{ + "id": "2ff304cd-4fad-4b26-a731-7442439885d6", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "body": "[]", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"c7c7a1326a6586429fa5ef476d91dfe7d34a7d1ecb5445f44e56c33f5bba405e\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4638", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "362", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C93C:0BB5:93F0A3E:9633E72:632C3D7E" + } + }, + "uuid": "2ff304cd-4fad-4b26-a731-7442439885d6", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-2", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-3", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-7.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-7.json new file mode 100644 index 0000000000..99fa355dc7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-7.json @@ -0,0 +1,55 @@ +{ + "id": "1b678530-b21b-4345-bc47-c56bf8585072", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"body\":\"First comment\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-7.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "\"180bd24cb77ed8ded012d03f3c0d8ebc7a8d9330d5b9c0d89ec50af98d61b54c\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4637", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "363", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C94C:AA4E:9AFC073:9D438A0:632C3D7F", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments/1254853699" + } + }, + "uuid": "1b678530-b21b-4345-bc47-c56bf8585072", + "persistent": true, + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-8.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-8.json new file mode 100644 index 0000000000..cb068b474b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-8.json @@ -0,0 +1,50 @@ +{ + "id": "761f43ec-6e00-49b0-91bd-3572081a139f", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-8.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"ed52590726ad6d54eec0ce4709383619350e680fe98bf57e348989c02c6ad71a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4636", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "364", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C94E:A95E:67D1E09:6970214:632C3D80" + } + }, + "uuid": "761f43ec-6e00-49b0-91bd-3572081a139f", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-3", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-4", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-9.json new file mode 100644 index 0000000000..97acfb68af --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_issues_461_comments-9.json @@ -0,0 +1,50 @@ +{ + "id": "0701e5c5-bcf3-4a5d-b8ea-d40b7061f278", + "name": "repos_hub4j-test-org_github-api_issues_461_comments", + "request": { + "url": "/repos/hub4j-test-org/github-api/issues/461/comments", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api_issues_461_comments-9.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"ed52590726ad6d54eec0ce4709383619350e680fe98bf57e348989c02c6ad71a\"", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4635", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "365", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C952:33AC:AA5048F:AC96BAC:632C3D80" + } + }, + "uuid": "0701e5c5-bcf3-4a5d-b8ea-d40b7061f278", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-4", + "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-issues-461-comments-5", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json similarity index 52% rename from src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json rename to src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json index 07f10e25c7..ef81f91642 100644 --- a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/createPullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/repos_hub4j-test-org_github-api_pulls-4.json @@ -1,55 +1,55 @@ { - "id": "4e9dadbb-e2ac-410b-9a7e-8731ed5c86cf", + "id": "8e22df22-c49d-4196-a2f3-d8fefd86b2b0", "name": "repos_hub4j-test-org_github-api_pulls", "request": { "url": "/repos/hub4j-test-org/github-api/pulls", "method": "POST", - "bodyPatterns": [ - { - "equalToJson": "{\"head\":\"test/stable\",\"maintainer_can_modify\":true,\"title\":\"createPullRequestComment\",\"body\":\"## test\",\"base\":\"main\"}", - "ignoreArrayOrder": true, - "ignoreExtraElements": true - } - ], "headers": { "Accept": { "equalTo": "application/vnd.github.shadow-cat-preview+json" } - } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"head\":\"test/stable\",\"draft\":false,\"maintainer_can_modify\":true,\"title\":\"createPullRequestComment\",\"body\":\"## test\",\"base\":\"main\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": false + } + ] }, "response": { "status": 201, "bodyFileName": "repos_hub4j-test-org_github-api_pulls-4.json", "headers": { - "Date": "Sun, 08 Sep 2019 07:25:00 GMT", - "Content-Type": "application/json; charset=utf-8", "Server": "GitHub.com", - "Status": "201 Created", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4846", - "X-RateLimit-Reset": "1567929276", + "Date": "Thu, 22 Sep 2022 10:48:30 GMT", + "Content-Type": "application/json; charset=utf-8", "Cache-Control": "private, max-age=60, s-maxage=60", "Vary": [ "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" + "Accept-Encoding, Accept, X-Requested-With" ], - "ETag": "\"cb9585955cc58789f91fe57ed42a9e6a\"", - "X-OAuth-Scopes": "gist, notifications, repo", + "ETag": "\"0ee9b14cd1b5bd8fd91bd92e071c580641d49050584d1dec40a62170590f3f80\"", + "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "", - "Location": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/270", - "X-GitHub-Media-Type": "unknown, github.v3", - "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", - "Access-Control-Allow-Origin": "*", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; param=shadow-cat-preview; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4640", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "360", + "X-RateLimit-Resource": "core", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "X-Frame-Options": "deny", "X-Content-Type-Options": "nosniff", - "X-XSS-Protection": "1; mode=block", + "X-XSS-Protection": "0", "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", "Content-Security-Policy": "default-src 'none'", - "X-GitHub-Request-Id": "FF9A:15CE:D30895:F67066:5D74ACCC" + "X-GitHub-Request-Id": "C936:AA4E:9AFB941:9D4314A:632C3D7D", + "Location": "https://api.github.com/repos/hub4j-test-org/github-api/pulls/461" } }, - "uuid": "4e9dadbb-e2ac-410b-9a7e-8731ed5c86cf", + "uuid": "8e22df22-c49d-4196-a2f3-d8fefd86b2b0", "persistent": true, "insertionIndex": 4 } \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/user-1.json new file mode 100644 index 0000000000..55183e376d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/pullRequestComment/mappings/user-1.json @@ -0,0 +1,48 @@ +{ + "id": "d3868b84-d8ad-41dd-b6f4-d29a71c9ae0d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "application/vnd.github.v3+json" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-1.json", + "headers": { + "Server": "GitHub.com", + "Date": "Thu, 22 Sep 2022 10:48:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "ETag": "W/\"32b033573dc38d4e52ca1ad7c3f276480abd6cc661590bac0e37e012d54b0aa6\"", + "Last-Modified": "Thu, 22 Sep 2022 10:12:47 GMT", + "X-OAuth-Scopes": "repo", + "X-Accepted-OAuth-Scopes": "", + "github-authentication-token-expiration": "2022-09-29 09:53:54 UTC", + "X-GitHub-Media-Type": "github.v3; format=json", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4647", + "X-RateLimit-Reset": "1663844087", + "X-RateLimit-Used": "353", + "X-RateLimit-Resource": "core", + "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", + "X-Frame-Options": "deny", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "0", + "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", + "Content-Security-Policy": "default-src 'none'", + "X-GitHub-Request-Id": "C91A:6970:A1EC6E0:A432E4D:632C3D7B" + } + }, + "uuid": "d3868b84-d8ad-41dd-b6f4-d29a71c9ae0d", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file