├── .env.example ├── .eslintignore ├── .eslintrc ├── .github └── workflows │ └── CI.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── app.yml ├── docs └── screenshot.png ├── index.js ├── lib ├── bot.js ├── core.js ├── recorder.js └── types.d.ts ├── package-lock.json ├── package.json ├── test ├── fixtures │ ├── config_errors │ │ ├── 001_pull_request.synchronize.json │ │ ├── 002b_config.get.json │ │ ├── 004_pull_request.synchronize.json │ │ └── 005b_config.get.json │ ├── merge_error │ │ ├── 004_status.json │ │ ├── 005_pulls.list.json │ │ ├── 005a_pulls.get.json │ │ ├── 005b_config.get.json │ │ ├── 006_repos.getBranchProtection.json │ │ ├── 007_pulls.merge.json │ │ └── 008_status.json │ ├── merge_method_merge │ │ ├── 012_pull_request_review.submitted.json │ │ ├── 012a_pulls.get.json │ │ ├── 012b_config.get.json │ │ ├── 013_repos.getBranchProtection.json │ │ ├── 014_repos.getCombinedStatusForRef.json │ │ ├── 015_checks.listSuitesForRef.json │ │ ├── 0170_pulls.listReviews.json │ │ ├── 0171_repos.checkCollaborator.json │ │ ├── 018_pulls.merge.json │ │ └── 019_pull_request.closed.json │ ├── no_branch │ │ ├── 000_status.json │ │ ├── 001_status.json │ │ ├── 002_status.json │ │ └── 003_pulls.list.json │ ├── non_pull_request_failed_checks │ │ ├── 001_pull_request.synchronize.json │ │ ├── 001a_config.get.json │ │ ├── 002_repos.getBranchProtection.json │ │ ├── 003_repos.getCombinedStatusForRef.json │ │ └── 004_checks.listSuitesForRef.json │ ├── non_pull_request_queued_checks │ │ ├── 001_pull_request.synchronize.json │ │ ├── 001a_config.get.json │ │ ├── 002_repos.getBranchProtection.json │ │ ├── 003_repos.getCombinedStatusForRef.json │ │ └── 004_checks.listSuitesForRef.json │ ├── protected │ │ ├── 001_status.json │ │ ├── 002_status.json │ │ ├── 003_status.json │ │ ├── 004_pulls.list.json │ │ ├── 005_check_suite.completed.json │ │ ├── 006_pull_request.opened.json │ │ ├── 006a_config.get.json │ │ ├── 007_repos.getBranchProtection.json │ │ ├── 008_pulls.merge.json │ │ ├── 009_status.json │ │ ├── 010_status.json │ │ ├── 011_status.json │ │ ├── 012_pulls.list.json │ │ ├── 012a_pulls.get.json │ │ ├── 012b_config.get.json │ │ ├── 013_repos.getBranchProtection.json │ │ ├── 014_pulls.merge.json │ │ ├── 015_pull_request.review_requested.json │ │ ├── 016_pull_request_review.submitted.json │ │ ├── 017_pull_request_review.submitted.json │ │ ├── 018_pull_request_review.submitted.json │ │ ├── 018a_pulls.get.json │ │ ├── 018b_config.get.json │ │ ├── 019_repos.getBranchProtection.json │ │ ├── 020_pulls.merge.json │ │ ├── 021_pull_request.closed.json │ │ └── 022_status.json │ ├── protected_check_suite │ │ ├── 000_pull_request.opened.json │ │ ├── 000a_config.get.json │ │ ├── 001_repos.getBranchProtection.json │ │ ├── 002_pulls.merge.json │ │ ├── 003_pull_request.review_requested.json │ │ ├── 004_pull_request_review.submitted.json │ │ ├── 004a_pulls.get.json │ │ ├── 004b_config.get.json │ │ ├── 005_repos.getBranchProtection.json │ │ ├── 006_pulls.merge.json │ │ ├── 007_check_suite.completed.json │ │ ├── 007a_pulls.get.json │ │ ├── 007b_config.get.json │ │ ├── 008_repos.getBranchProtection.json │ │ ├── 009_pulls.merge.json │ │ ├── 010_pull_request.closed.json │ │ └── 011_check_suite.completed.json │ ├── queued_checks │ │ ├── 001_pull_request.synchronize.json │ │ ├── 001a_config.get.json │ │ ├── 002_repos.getBranchProtection.json │ │ ├── 003_repos.getCombinedStatusForRef.json │ │ ├── 004_checks.listSuitesForRef.json │ │ ├── 005_pulls.get.json │ │ ├── 005a_config.get.json │ │ ├── 006_repos.getBranchProtection.json │ │ ├── 007_repos.getCombinedStatusForRef.json │ │ └── 008_checks.listSuitesForRef.json │ ├── ready_for_review │ │ ├── 009_pull_request.ready_for_review.json │ │ ├── 013_config.get.json │ │ ├── 014_repos.getBranchProtection.json │ │ ├── 015_repos.getCombinedStatusForRef.json │ │ ├── 016_checks.listSuitesForRef.json │ │ └── 0180_pulls.listReviews.json │ ├── requested_teams │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 0340_pulls.listReviews.json │ │ ├── 0341_repos.checkCollaborator.json │ │ ├── 034a_00_teams.listMembersInOrg.json │ │ ├── 034a_01_teams.listMembersInOrg.json │ │ ├── 034a_02_teams.listMembersInOrg.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ ├── 041_teams.listMembersInOrg.json │ │ ├── 042_teams.listMembersInOrg.json │ │ ├── 043_teams.listMembersInOrg.json │ │ ├── 053_pulls.merge.json │ │ └── 054_pull_request.closed.json │ ├── requested_teams_no_review_teams │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 0340_pulls.listReviews.json │ │ ├── 0341_repos.checkCollaborator.json │ │ └── 034a_00_teams.listMembersInOrg.json │ ├── requested_teams_review_teams_clash │ │ ├── 000_pull_request_review.submitted.json │ │ ├── 000a_pulls.get.json │ │ ├── 000b_config.get.json │ │ ├── 001_repos.getBranchProtection.json │ │ ├── 002_repos.getCombinedStatusForRef.json │ │ ├── 003_checks.listSuitesForRef.json │ │ ├── 0050_pulls.listReviews.json │ │ ├── 0051_repos.checkCollaborator.json │ │ ├── 006_teams.listMembersInOrg.json │ │ └── 007_teams.listMembersInOrg.json │ ├── response_errors │ │ ├── 001_status.json │ │ ├── 002_pulls.list.json │ │ ├── 002a_pulls.get.json │ │ ├── 002b_config.get.json │ │ ├── 003_repos.getBranchProtection.json │ │ ├── 004_status.json │ │ ├── 005_pulls.list.json │ │ ├── 005a_pulls.get.json │ │ ├── 005b_config.get.json │ │ ├── 006_repos.getBranchProtection.json │ │ ├── 007_pulls.merge.json │ │ └── 008_status.json │ ├── review_teams_approval_missing │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ ├── 0403_repos.checkCollaborator.json │ │ ├── 042_teams.listMembersInOrg.json │ │ └── 043_teams.listMembersInOrg.json │ ├── review_teams_ignore_unmentioned │ │ ├── 020_pull_request_review.submitted.json │ │ ├── 020a_pulls.get.json │ │ ├── 020b_config.get.json │ │ ├── 021_repos.getBranchProtection.json │ │ ├── 022_repos.getCombinedStatusForRef.json │ │ ├── 023_checks.listSuitesForRef.json │ │ ├── 0250_pulls.listReviews.json │ │ ├── 0251_repos.checkCollaborator.json │ │ ├── 027_teams.listMembersInOrg.json │ │ ├── 028_teams.listMembersInOrg.json │ │ ├── 029_teams.listMembersInOrg.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ ├── 042_teams.listMembersInOrg.json │ │ ├── 043_teams.listMembersInOrg.json │ │ ├── 044_teams.listMembersInOrg.json │ │ ├── 053_pulls.merge.json │ │ └── 054_pull_request.closed.json │ ├── review_teams_not_an_organization │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ └── 040_teams.listMembersInOrg.json │ ├── review_teams_simple │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 0340_pulls.listReviews.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ ├── 042_teams.listMembersInOrg.json │ │ ├── 043_teams.listMembersInOrg.json │ │ ├── 053_pulls.merge.json │ │ └── 054_pull_request.closed.json │ ├── review_teams_user_in_multiple_teams │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 0340_pulls.listReviews.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ ├── 042_teams.listMembersInOrg.json │ │ ├── 043_teams.listMembersInOrg.json │ │ ├── 053_pulls.merge.json │ │ └── 054_pull_request.closed.json │ ├── review_teams_with_rejects │ │ ├── 028_pull_request.synchronize.json │ │ ├── 029_config.get.json │ │ ├── 030_repos.getBranchProtection.json │ │ ├── 031_repos.getCombinedStatusForRef.json │ │ ├── 032_checks.listSuitesForRef.json │ │ ├── 0340_pulls.listReviews.json │ │ ├── 035_pull_request_review.submitted.json │ │ ├── 035a_pulls.get.json │ │ ├── 035b_config.get.json │ │ ├── 036_repos.getBranchProtection.json │ │ ├── 037_repos.getCombinedStatusForRef.json │ │ ├── 038_checks.listSuitesForRef.json │ │ ├── 0400_pulls.listReviews.json │ │ ├── 0401_repos.checkCollaborator.json │ │ ├── 0402_repos.checkCollaborator.json │ │ └── 0403_repos.checkCollaborator.json │ ├── skip_draft │ │ └── 000_pull_request.synchronize.json │ ├── skip_merged │ │ └── 000_pull_request.synchronize.json │ ├── skip_non_mergeable │ │ ├── 000_pull_request.synchronize.json │ │ └── 001_config.get.json │ ├── skip_non_rebaseable │ │ ├── 000_pull_request.synchronize.json │ │ └── 001_config.get.json │ ├── unprotected_check_conclusions │ │ ├── 001_check_suite.completed.json │ │ ├── 002_check_suite.completed.json │ │ ├── 002a_pulls.get.json │ │ ├── 002b_config.get.json │ │ ├── 003_repos.getBranchProtection.json │ │ ├── 004_repos.getCombinedStatusForRef.json │ │ ├── 005_checks.listSuitesForRef.json │ │ ├── 006_check_suite.completed.json │ │ ├── 006a_check_suite.completed.json │ │ ├── 006a_pulls.get.json │ │ ├── 006b_config.get.json │ │ ├── 007_repos.getBranchProtection.json │ │ ├── 008_repos.getCombinedStatusForRef.json │ │ ├── 009_checks.listSuitesForRef.json │ │ ├── 010_check_suite.completed.json │ │ ├── 010a_pulls.get.json │ │ ├── 010b_config.get.json │ │ ├── 011_repos.getBranchProtection.json │ │ ├── 012_repos.getCombinedStatusForRef.json │ │ ├── 013_checks.listSuitesForRef.json │ │ ├── 0170_pulls.listReviews.json │ │ ├── 0171_repos.checkCollaborator.json │ │ ├── 018_pulls.merge.json │ │ └── 019_pull_request.closed.json │ ├── unprotected_check_ignore_dependabot │ │ ├── 010_check_suite.completed.json │ │ ├── 010a_pulls.get.json │ │ ├── 010b_config.get.json │ │ ├── 011_repos.getBranchProtection.json │ │ ├── 012_repos.getCombinedStatusForRef.json │ │ ├── 013_checks.listSuitesForRef.json │ │ ├── 0170_pulls.listReviews.json │ │ ├── 0171_repos.checkCollaborator.json │ │ └── 018_pulls.merge.json │ ├── unprotected_checks_only │ │ ├── 002_pull_request.synchronize.json │ │ ├── 002a_config.get.json │ │ ├── 003_repos.getBranchProtection.json │ │ ├── 004_repos.getCombinedStatusForRef.json │ │ ├── 005_checks.listSuitesForRef.json │ │ ├── 006_check_suite.completed.json │ │ ├── 006a_pulls.get.json │ │ ├── 006b_config.get.json │ │ ├── 007_repos.getBranchProtection.json │ │ ├── 008_repos.getCombinedStatusForRef.json │ │ ├── 009_checks.listSuitesForRef.json │ │ ├── 0110_pulls.listReviews.json │ │ ├── 012_pull_request_review.submitted.json │ │ ├── 012a_pulls.get.json │ │ ├── 012b_config.get.json │ │ ├── 013_repos.getBranchProtection.json │ │ ├── 014_repos.getCombinedStatusForRef.json │ │ ├── 015_checks.listSuitesForRef.json │ │ ├── 0170_pulls.listReviews.json │ │ ├── 0171_repos.checkCollaborator.json │ │ ├── 018_pulls.merge.json │ │ └── 019_pull_request.closed.json │ ├── unprotected_no_status_checks │ │ ├── 001_pull_request_review.submitted.json │ │ ├── 001a_pulls.get.json │ │ ├── 001b_config.get.json │ │ ├── 002_repos.getBranchProtection.json │ │ ├── 003_repos.getCombinedStatusForRef.json │ │ ├── 004_checks.listSuitesForRef.json │ │ └── 005_check_suite.completed.json │ ├── unprotected_non_collaborator_review │ │ ├── 000_pull_request_review.submitted.json │ │ ├── 000a_pulls.get.json │ │ ├── 000b_config.get.json │ │ ├── 001_repos.getBranchProtection.json │ │ ├── 002_repos.getCombinedStatusForRef.json │ │ ├── 003_checks.listSuitesForRef.json │ │ ├── 0050_pulls.listReviews.json │ │ └── 0051_repos.checkCollaborator.json │ ├── unprotected_rejected_reviews │ │ ├── 000_pull_request_review.submitted.json │ │ ├── 000a_pulls.get.json │ │ ├── 000b_config.get.json │ │ ├── 001_repos.getBranchProtection.json │ │ ├── 002_repos.getCombinedStatusForRef.json │ │ ├── 003_checks.listSuitesForRef.json │ │ ├── 0050_pulls.listReviews.json │ │ ├── 0051_repos.checkCollaborator.json │ │ ├── 0052_repos.checkCollaborator.json │ │ ├── 006_pull_request_review.submitted.json │ │ ├── 006a_pulls.get.json │ │ ├── 006b_config.get.json │ │ ├── 007_repos.getBranchProtection.json │ │ ├── 008_repos.getCombinedStatusForRef.json │ │ ├── 009_checks.listSuitesForRef.json │ │ ├── 0110_pulls.listReviews.json │ │ ├── 0111_repos.checkCollaborator.json │ │ ├── 0112_repos.checkCollaborator.json │ │ ├── 012_pulls.merge.json │ │ └── 013_pull_request.closed.json │ ├── unprotected_status_failed │ │ ├── 001_status.json │ │ ├── 002_pulls.list.json │ │ ├── 002a_pulls.get.json │ │ ├── 002b_config.get.json │ │ ├── 003_repos.getBranchProtection.json │ │ ├── 004_repos.getCombinedStatusForRef.json │ │ └── 005_status.json │ ├── unprotected_status_only │ │ ├── 000_pull_request.opened.json │ │ ├── 000a_config.get.json │ │ ├── 001_repos.getBranchProtection.json │ │ ├── 002_repos.getCombinedStatusForRef.json │ │ ├── 003_pull_request.review_requested.json │ │ ├── 004_status.json │ │ ├── 005_status.json │ │ ├── 006_status.json │ │ ├── 007_pull_request_review.submitted.json │ │ ├── 008_status.json │ │ ├── 009_pulls.list.json │ │ ├── 009a_pulls.get.json │ │ ├── 009b_config.get.json │ │ ├── 010_repos.getBranchProtection.json │ │ ├── 011_repos.getCombinedStatusForRef.json │ │ ├── 012_status.json │ │ ├── 013_pulls.list.json │ │ ├── 013a_pulls.get.json │ │ ├── 013b_config.get.json │ │ ├── 014_repos.getBranchProtection.json │ │ ├── 015_repos.getCombinedStatusForRef.json │ │ ├── 016_checks.listSuitesForRef.json │ │ ├── 0180_pulls.listReviews.json │ │ ├── 0181_repos.checkCollaborator.json │ │ ├── 019_pull_request_review.submitted.json │ │ ├── 020_pull_request_review.submitted.json │ │ ├── 020a_pulls.get.json │ │ ├── 020b_config.get.json │ │ ├── 021_repos.getBranchProtection.json │ │ ├── 022_repos.getCombinedStatusForRef.json │ │ ├── 023_checks.listSuitesForRef.json │ │ ├── 0250_pulls.listReviews.json │ │ ├── 0251_repos.checkCollaborator.json │ │ ├── 026_pulls.merge.json │ │ ├── 027_pull_request.closed.json │ │ └── 028_status.json │ └── with_minapprovals_config │ │ ├── 002_pull_request.synchronize.json │ │ ├── 003_config.get.json │ │ ├── 007_repos.getBranchProtection.json │ │ ├── 008_repos.getCombinedStatusForRef.json │ │ ├── 009_checks.listSuitesForRef.json │ │ ├── 0110_pulls.listReviews.json │ │ ├── 012_pull_request_review.submitted.json │ │ ├── 012a_pulls.get.json │ │ ├── 012b_config.get.json │ │ ├── 013_repos.getBranchProtection.json │ │ ├── 014_repos.getCombinedStatusForRef.json │ │ ├── 015_checks.listSuitesForRef.json │ │ ├── 0170_pulls.listReviews.json │ │ ├── 0171_repos.checkCollaborator.json │ │ ├── 0172_repos.checkCollaborator.json │ │ ├── 018_pulls.merge.json │ │ └── 019_pull_request.closed.json ├── index.test.js └── recording.js └── tsconfig.json /.env.example: -------------------------------------------------------------------------------- 1 | # The ID of your GitHub App 2 | APP_ID= 3 | WEBHOOK_SECRET=development 4 | 5 | # Use `trace` to get verbose logging or `info` to show less 6 | LOG_LEVEL=debug 7 | 8 | # Go to https://smee.io/new set this to the URL that you are redirected to. 9 | WEBHOOK_PROXY_URL= 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "plugin:bpmn-io/es6", 4 | "plugin:bpmn-io/mocha" 5 | ], 6 | "env": { 7 | "node": true, 8 | "es6": true 9 | } 10 | } -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [ push, pull_request ] 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | 7 | steps: 8 | - name: Checkout 9 | uses: actions/checkout@v2 10 | - name: Use Node.js 11 | uses: actions/setup-node@v1 12 | with: 13 | node-version: '10.x' 14 | - name: Cache Node.js modules 15 | uses: actions/cache@v2 16 | with: 17 | # npm cache files are stored in `~/.npm` on Linux/macOS 18 | path: ~/.npm 19 | key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} 20 | restore-keys: | 21 | ${{ runner.OS }}-node- 22 | ${{ runner.OS }}- 23 | - name: Install dependencies 24 | run: npm ci 25 | - name: Build 26 | run: LOG_LEVEL=trace npm run all 27 | - name: Upload coverage 28 | run: npx codecov 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .nyc_output 2 | coverage 3 | node_modules 4 | tasks 5 | tmp 6 | npm-debug.log 7 | *.pem 8 | .env 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Nico Rehwaldt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nikku/merge-me/3c2e03cfa7c756368a2afb71476cd52eb436a062/docs/screenshot.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/bot'); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nikku/merge-me", 3 | "version": "0.14.2", 4 | "description": "Automatically merges your GitHub pull requests once all checks pass", 5 | "author": "Nico Rehwaldt ", 6 | "license": "MIT", 7 | "repository": "https://github.com/nikku/merge-me.git", 8 | "publishConfig": { 9 | "access": "public" 10 | }, 11 | "keywords": [ 12 | "probot", 13 | "github", 14 | "probot-app" 15 | ], 16 | "scripts": { 17 | "all": "run-s lint lint:types test-coverage", 18 | "dev": "nodemon", 19 | "start": "probot run ./index.js", 20 | "lint": "eslint .", 21 | "lint:types": "tsc --pretty", 22 | "test": "mocha test/*", 23 | "test-coverage": "nyc -x=lib/recorder.js -x=test/recording.js --reporter=lcov --reporter=html --reporter=text mocha test/*", 24 | "auto-test": "nodemon --exec npm test" 25 | }, 26 | "dependencies": { 27 | "probot": "^10.19.0" 28 | }, 29 | "devDependencies": { 30 | "chai": "^4.3.4", 31 | "eslint": "^7.32.0", 32 | "eslint-plugin-bpmn-io": "^0.12.0", 33 | "mocha": "^9.1.3", 34 | "nodemon": "^2.0.14", 35 | "npm-run-all": "^4.1.3", 36 | "nyc": "^15.1.0", 37 | "smee-client": "^1.2.2", 38 | "typescript": "^4.4.4" 39 | }, 40 | "engines": { 41 | "node": ">= 10.21.0" 42 | }, 43 | "nodemonConfig": { 44 | "exec": "npm start", 45 | "watch": [ 46 | ".env", 47 | "**/*.js" 48 | ] 49 | }, 50 | "files": [ 51 | "lib", 52 | "app.yml", 53 | "index.js" 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /test/fixtures/config_errors/002b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "minApprovals": "YEA!" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/config_errors/005b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "mergeMethod": "dont-care" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/004_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/005a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku", 20 | "type": "User" 21 | }, 22 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 23 | "assignees": [], 24 | "requested_reviewers": [], 25 | "requested_teams": [], 26 | "labels": [], 27 | "head": { 28 | "label": "nikku:nikku-patch-1", 29 | "ref": "nikku-patch-1", 30 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 31 | "user": { 32 | "login": "nikku", 33 | "type": "User" 34 | }, 35 | "repo": { 36 | "name": "testtest", 37 | "full_name": "nikku/testtest", 38 | "owner": { 39 | "login": "nikku", 40 | "type": "User" 41 | }, 42 | "default_branch": "master" 43 | } 44 | }, 45 | "base": { 46 | "label": "nikku:master", 47 | "ref": "master", 48 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 49 | "user": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "repo": { 54 | "name": "testtest", 55 | "full_name": "nikku/testtest", 56 | "owner": { 57 | "login": "nikku", 58 | "type": "User" 59 | }, 60 | "default_branch": "master" 61 | } 62 | }, 63 | "author_association": "OWNER" 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/005b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { } 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/006_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/007_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "message": "intended failure" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/merge_error/008_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/012b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "mergeMethod": "merge" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/013_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/014_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/0170_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "nikku", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "OWNER", 19 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/0171_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "nikku" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/merge_method_merge/018_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "merge_method": "merge" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "18bf62ff9ce3b89190dd4b15ddcfcd77dd4b4fef", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/no_branch/000_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "a1c01f92ec298a7d4801972188d6f33e4be0a8ce" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "master", 41 | "commit": { 42 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/no_branch/001_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "a1c01f92ec298a7d4801972188d6f33e4be0a8ce" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "master", 41 | "commit": { 42 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/no_branch/002_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "a1c01f92ec298a7d4801972188d6f33e4be0a8ce" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "master", 41 | "commit": { 42 | "sha": "180db1c935e6fa000d1b88660a77f7a61fab5e49" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/no_branch/003_pulls.list.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.list", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "state": "open", 8 | "head": "nikku:master" 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_failed_checks/001a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_failed_checks/002_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_failed_checks/003_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_failed_checks/004_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "completed", 17 | "conclusion": "failure", 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [], 20 | "app": { 21 | "name": "GitHub Actions" 22 | } 23 | } 24 | ] 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_queued_checks/001a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_queued_checks/002_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_queued_checks/003_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/non_pull_request_queued_checks/004_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "queued", 17 | "latest_check_runs_count": 0, 18 | "pull_requests": [], 19 | "app": { 20 | "name": "GitHub Actions" 21 | } 22 | } 23 | ] 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /test/fixtures/protected/001_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/002_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/003_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/004_pulls.list.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.list", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "state": "open", 8 | "head": "nikku:waltaaa-patch-1" 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/protected/005_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "before": "0000000000000000000000000000000000000000", 12 | "after": "329dc8801f6da722d6ac9420e142f59aa610916f", 13 | "pull_requests": [], 14 | "app": { 15 | "owner": { 16 | "login": "travis-ci", 17 | "type": "Organization" 18 | }, 19 | "name": "Travis CI" 20 | }, 21 | "latest_check_runs_count": 1, 22 | "head_commit": { 23 | "tree_id": "911f57504612def9e96f0991fc84d59e078ec674", 24 | "message": "Update test.txt", 25 | "timestamp": "2018-11-28T12:25:01Z", 26 | "author": { 27 | "name": "waltaaa" 28 | }, 29 | "committer": { 30 | "name": "GitHub" 31 | } 32 | } 33 | }, 34 | "repository": { 35 | "name": "testtest", 36 | "full_name": "nikku/testtest", 37 | "owner": { 38 | "login": "nikku", 39 | "type": "User" 40 | }, 41 | "default_branch": "master" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /test/fixtures/protected/006a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected/007_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected/008_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 23, 8 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "status": 405 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/protected/009_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/010_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/011_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "success", 9 | "commit": { 10 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "waltaaa-patch-1", 41 | "commit": { 42 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected/012a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 23 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 23, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "waltaaa", 20 | "type": "User" 21 | }, 22 | "merge_commit_sha": "6de9a830f0710f1bdf62517d55772b8d93d6e91b", 23 | "assignees": [], 24 | "requested_reviewers": [], 25 | "requested_teams": [], 26 | "labels": [], 27 | "head": { 28 | "label": "nikku:waltaaa-patch-1", 29 | "ref": "waltaaa-patch-1", 30 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 31 | "user": { 32 | "login": "nikku", 33 | "type": "User" 34 | }, 35 | "repo": { 36 | "name": "testtest", 37 | "full_name": "nikku/testtest", 38 | "owner": { 39 | "login": "nikku", 40 | "type": "User" 41 | }, 42 | "default_branch": "master" 43 | } 44 | }, 45 | "base": { 46 | "label": "nikku:master", 47 | "ref": "master", 48 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7", 49 | "user": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "repo": { 54 | "name": "testtest", 55 | "full_name": "nikku/testtest", 56 | "owner": { 57 | "login": "nikku", 58 | "type": "User" 59 | }, 60 | "default_branch": "master" 61 | } 62 | }, 63 | "author_association": "COLLABORATOR" 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /test/fixtures/protected/012b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected/013_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected/014_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 23, 8 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "status": 405 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/protected/018b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected/019_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected/020_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 23, 8 | "sha": "329dc8801f6da722d6ac9420e142f59aa610916f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "4f7b58a550a45d7a807f2cb0095946b03dc3d3f7", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/protected/022_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "4f7b58a550a45d7a807f2cb0095946b03dc3d3f7", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "4f7b58a550a45d7a807f2cb0095946b03dc3d3f7", 11 | "commit": { 12 | "author": { 13 | "name": "waltaaa" 14 | }, 15 | "committer": { 16 | "name": "merge-me-test[bot]" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "waltaaa", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "merge-me-test[bot]", 30 | "type": "Bot" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "15966515740adcdc8999d1c98a7ead8136cb55a7" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "master", 41 | "commit": { 42 | "sha": "4f7b58a550a45d7a807f2cb0095946b03dc3d3f7" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/000a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/001_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/002_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 24, 8 | "sha": "4b10a44fa7652f05c61bd18f7e5a7c7e451e093f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "status": 405 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/004b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/005_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/006_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 24, 8 | "sha": "4b10a44fa7652f05c61bd18f7e5a7c7e451e093f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "status": 405 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/007b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/008_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/009_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 24, 8 | "sha": "4b10a44fa7652f05c61bd18f7e5a7c7e451e093f", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "555a9a96c5474b3f779a3799d9652b4b636d7210", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/protected_check_suite/011_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "master", 8 | "head_sha": "555a9a96c5474b3f779a3799d9652b4b636d7210", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "before": "4f7b58a550a45d7a807f2cb0095946b03dc3d3f7", 12 | "after": "555a9a96c5474b3f779a3799d9652b4b636d7210", 13 | "pull_requests": [], 14 | "app": { 15 | "owner": { 16 | "login": "travis-ci", 17 | "type": "Organization" 18 | }, 19 | "name": "Travis CI" 20 | }, 21 | "latest_check_runs_count": 1, 22 | "head_commit": { 23 | "tree_id": "a1c01f92ec298a7d4801972188d6f33e4be0a8ce", 24 | "message": "Update test.txt", 25 | "timestamp": "2018-11-28T18:22:14Z", 26 | "author": { 27 | "name": "waltaaa" 28 | }, 29 | "committer": { 30 | "name": "merge-me-test[bot]" 31 | } 32 | } 33 | }, 34 | "repository": { 35 | "name": "testtest", 36 | "full_name": "nikku/testtest", 37 | "owner": { 38 | "login": "nikku", 39 | "type": "User" 40 | }, 41 | "default_branch": "master" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/001a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/002_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/003_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/005a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/006_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/007_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/queued_checks/008_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "completed", 17 | "conclusion": "success", 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [ 20 | { 21 | "number": 1 22 | } 23 | ], 24 | "app": { 25 | "name": "GitHub Actions" 26 | } 27 | }, 28 | { 29 | "head_branch": "waltaaa-patch-1", 30 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 31 | "status": "completed", 32 | "conclusion": "neutral", 33 | "latest_check_runs_count": 0, 34 | "pull_requests": [ 35 | { 36 | "number": 1 37 | } 38 | ], 39 | "app": { 40 | "name": "GitHub Actions" 41 | } 42 | }, 43 | { 44 | "head_branch": "waltaaa-patch-1", 45 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 46 | "status": "queued", 47 | "latest_check_runs_count": 0, 48 | "pull_requests": [ 49 | { 50 | "number": 1 51 | } 52 | ], 53 | "app": { 54 | "name": "GitHub Actions" 55 | } 56 | } 57 | ] 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /test/fixtures/ready_for_review/013_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/ready_for_review/014_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/ready_for_review/015_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "ref": "2d76a42c926d2ff519235b8b5bdd73eab65a29c4" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "2d76a42c926d2ff519235b8b5bdd73eab65a29c4", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-org", 17 | "full_name": "merge-me-test-org/testtest-org", 18 | "owner": { 19 | "login": "merge-me-test-org", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/ready_for_review/0180_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "pull_number": 2, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/0340_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/0341_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/034a_00_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "outside" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "outsider", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/034a_01_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/034a_02_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "outsider", 24 | "type": "User" 25 | }, 26 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 27 | "state": "APPROVED", 28 | "author_association": "NONE" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "outsider" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/041_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "outside" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "outsider", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/042_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/043_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams/053_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "de6823ae07b63a7ba4e263f3f9cba7ce015ae650", 14 | "merged": true, 15 | "message": "Pull Request successfully merged" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/0340_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/0341_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_no_review_teams/034a_00_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "outside" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "outsider", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/000b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/001_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/002_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "ref": "a6e7a70e3150b7c6f87a7ec47da918eafd72b5ec" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "a6e7a70e3150b7c6f87a7ec47da918eafd72b5ec", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-org", 17 | "full_name": "merge-me-test-org/testtest-org", 18 | "owner": { 19 | "login": "merge-me-test-org", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/0050_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "michaaaaaaaaa", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "a6e7a70e3150b7c6f87a7ec47da918eafd72b5ec" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/0051_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "merge-me-test-org", 6 | "repo": "testtest-org", 7 | "username": "michaaaaaaaaa" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/006_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "merge-me-test-org", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "nikku", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "waltaaa", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/requested_teams_review_teams_clash/007_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "merge-me-test-org", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "nikku", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "michaaaaaaaaa", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/001_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/002a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku", 20 | "type": "User" 21 | }, 22 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 23 | "assignees": [], 24 | "requested_reviewers": [], 25 | "requested_teams": [], 26 | "labels": [], 27 | "head": { 28 | "label": "nikku:nikku-patch-1", 29 | "ref": "nikku-patch-1", 30 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 31 | "user": { 32 | "login": "nikku", 33 | "type": "User" 34 | }, 35 | "repo": { 36 | "name": "testtest", 37 | "full_name": "nikku/testtest", 38 | "owner": { 39 | "login": "nikku", 40 | "type": "User" 41 | }, 42 | "default_branch": "master" 43 | } 44 | }, 45 | "base": { 46 | "label": "nikku:master", 47 | "ref": "master", 48 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 49 | "user": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "repo": { 54 | "name": "testtest", 55 | "full_name": "nikku/testtest", 56 | "owner": { 57 | "login": "nikku", 58 | "type": "User" 59 | }, 60 | "default_branch": "master" 61 | } 62 | }, 63 | "author_association": "OWNER" 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/002b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { } 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/003_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 500 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/004_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/005a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku", 20 | "type": "User" 21 | }, 22 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 23 | "assignees": [], 24 | "requested_reviewers": [], 25 | "requested_teams": [], 26 | "labels": [], 27 | "head": { 28 | "label": "nikku:nikku-patch-1", 29 | "ref": "nikku-patch-1", 30 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 31 | "user": { 32 | "login": "nikku", 33 | "type": "User" 34 | }, 35 | "repo": { 36 | "name": "testtest", 37 | "full_name": "nikku/testtest", 38 | "owner": { 39 | "login": "nikku", 40 | "type": "User" 41 | }, 42 | "default_branch": "master" 43 | } 44 | }, 45 | "base": { 46 | "label": "nikku:master", 47 | "ref": "master", 48 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 49 | "user": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "repo": { 54 | "name": "testtest", 55 | "full_name": "nikku/testtest", 56 | "owner": { 57 | "login": "nikku", 58 | "type": "User" 59 | }, 60 | "default_branch": "master" 61 | } 62 | }, 63 | "author_association": "OWNER" 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/005b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { } 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/006_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "data": { 11 | "required_status_checks": { 12 | "contexts": [ 13 | "Travis CI - Pull Request" 14 | ] 15 | }, 16 | "required_pull_request_reviews": {}, 17 | "enforce_admins": {} 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/007_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "error": { 13 | "status": 500 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/response_errors/008_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz2", 24 | "type": "User" 25 | }, 26 | "state": "PENDING", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | }, 30 | { 31 | "user": { 32 | "login": "notoguz3", 33 | "type": "User" 34 | }, 35 | "state": "APPROVED", 36 | "author_association": "MEMBER", 37 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/0403_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz3" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/042_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz", 16 | "type": "User" 17 | }, 18 | { 19 | "login": "notoguz3", 20 | "type": "User" 21 | } 22 | ] 23 | } 24 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_approval_missing/043_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/020b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design", 14 | "other" 15 | ] 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/021_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/022_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/0250_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/0251_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/027_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "notoguz", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/028_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/029_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "other" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "freddy", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design", 14 | "other" 15 | ] 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/042_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "notoguz", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/043_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/044_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "other" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "freddy", 12 | "type": "User" 13 | } 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_ignore_unmentioned/053_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "de6823ae07b63a7ba4e263f3f9cba7ce015ae650", 14 | "merged": true, 15 | "message": "Pull Request successfully merged" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-User/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-User", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-User", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_not_an_organization/040_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-User", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "error": { 10 | "name": "HttpError", 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/0340_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/042_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/043_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_simple/053_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "de6823ae07b63a7ba4e263f3f9cba7ce015ae650", 14 | "merged": true, 15 | "message": "Pull Request successfully merged" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/0340_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz2", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/042_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "dev" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz2", 16 | "type": "User" 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/043_teams.listMembersInOrg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teams.listMembersInOrg", 3 | "type": "api-call", 4 | "args": { 5 | "org": "Merge-Me-Test-Organisation", 6 | "team_slug": "design" 7 | }, 8 | "result": { 9 | "data": [ 10 | { 11 | "login": "oguzeroglu", 12 | "type": "User" 13 | }, 14 | { 15 | "login": "notoguz", 16 | "type": "User" 17 | }, 18 | { 19 | "login": "notoguz2", 20 | "type": "User" 21 | } 22 | ] 23 | } 24 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_user_in_multiple_teams/053_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "de6823ae07b63a7ba4e263f3f9cba7ce015ae650", 14 | "merged": true, 15 | "message": "Pull Request successfully merged" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/029_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/030_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/031_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/0340_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/035b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "reviewTeams": [ 12 | "dev", 13 | "design" 14 | ] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/036_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "name": "HttpError", 12 | "status": 404 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/037_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "ref": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "merge-me-test", 17 | "full_name": "Merge-Me-Test-Organisation/merge-me-test", 18 | "owner": { 19 | "login": "Merge-Me-Test-Organisation", 20 | "type": "Organization" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/0400_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "pull_number": 12, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "notoguz", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "MEMBER", 19 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 20 | }, 21 | { 22 | "user": { 23 | "login": "notoguz2", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 29 | }, 30 | { 31 | "user": { 32 | "login": "notoguz3", 33 | "type": "User" 34 | }, 35 | "state": "CHANGES_REQUESTED", 36 | "author_association": "MEMBER", 37 | "commit_id": "f9d55a5bff002d1e17967c5edc1fa979b9c243d6" 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/0401_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/0402_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz2" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/review_teams_with_rejects/0403_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "Merge-Me-Test-Organisation", 6 | "repo": "merge-me-test", 7 | "username": "notoguz3" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/skip_non_mergeable/001_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "mergeMethod": "merge" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/skip_non_rebaseable/001_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/001_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "failure", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/002_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/002b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/003_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/004_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/005_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "completed", 17 | "conclusion": "failed", 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [ 20 | { 21 | "number": 1 22 | } 23 | ], 24 | "app": { 25 | "name": "GitHub Actions" 26 | } 27 | }, 28 | { 29 | "head_branch": "waltaaa-patch-1", 30 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 31 | "status": "completed", 32 | "conclusion": "success", 33 | "latest_check_runs_count": 1, 34 | "pull_requests": [ 35 | { 36 | "number": 1 37 | } 38 | ], 39 | "app": { 40 | "name": "GitHub Actions" 41 | } 42 | } 43 | ] 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/006_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "neutral", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/006a_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/006b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/007_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/008_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/009_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "completed", 17 | "conclusion": "neutral", 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [ 20 | { 21 | "number": 1 22 | } 23 | ], 24 | "app": { 25 | "name": "GitHub Actions" 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/010_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/010b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/011_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/012_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/013_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "completed", 17 | "conclusion": "neutral", 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [ 20 | { 21 | "number": 1 22 | } 23 | ], 24 | "app": { 25 | "name": "GitHub Actions" 26 | } 27 | }, 28 | { 29 | "head_branch": "waltaaa-patch-1", 30 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 31 | "status": "completed", 32 | "conclusion": "success", 33 | "latest_check_runs_count": 1, 34 | "pull_requests": [ 35 | { 36 | "number": 1 37 | } 38 | ], 39 | "app": { 40 | "name": "GitHub Actions" 41 | } 42 | } 43 | ] 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/0170_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "nikku" 15 | }, 16 | "state": "APPROVED", 17 | "author_association": "OWNER", 18 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 19 | } 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/0171_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "nikku" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_conclusions/018_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "18bf62ff9ce3b89190dd4b15ddcfcd77dd4b4fef", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/010_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "success", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/010b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/011_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/012_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/013_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 1, 12 | "check_suites": [ 13 | { 14 | "head_branch": "waltaaa-patch-1", 15 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 16 | "status": "queued", 17 | "conclusion": null, 18 | "latest_check_runs_count": 1, 19 | "pull_requests": [ 20 | { 21 | "number": 1 22 | } 23 | ], 24 | "app": { 25 | "name": "Dependabot" 26 | } 27 | }, 28 | { 29 | "head_branch": "waltaaa-patch-1", 30 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 31 | "status": "completed", 32 | "conclusion": "neutral", 33 | "latest_check_runs_count": 1, 34 | "pull_requests": [ 35 | { 36 | "number": 1 37 | } 38 | ], 39 | "app": { 40 | "name": "GitHub Actions" 41 | } 42 | }, 43 | { 44 | "head_branch": "waltaaa-patch-1", 45 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 46 | "status": "completed", 47 | "conclusion": "success", 48 | "latest_check_runs_count": 1, 49 | "pull_requests": [ 50 | { 51 | "number": 1 52 | } 53 | ], 54 | "app": { 55 | "name": "GitHub Actions" 56 | } 57 | } 58 | ] 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/0170_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "nikku" 15 | }, 16 | "state": "APPROVED", 17 | "author_association": "OWNER", 18 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 19 | } 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/0171_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "nikku" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_check_ignore_dependabot/018_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "18bf62ff9ce3b89190dd4b15ddcfcd77dd4b4fef", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/002a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/003_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/004_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/006b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/007_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/008_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/0110_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/012b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/013_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/014_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/0170_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "nikku", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "OWNER", 19 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/0171_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "nikku" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_checks_only/018_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "18bf62ff9ce3b89190dd4b15ddcfcd77dd4b4fef", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/001_pull_request_review.submitted.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pull_request_review.submitted", 3 | "type": "event", 4 | "payload": { 5 | "action": "submitted", 6 | "review": { 7 | "user": { 8 | "login": "waltaaa" 9 | }, 10 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 11 | "state": "approved" 12 | }, 13 | "pull_request": { 14 | "number": 29, 15 | "state": "open", 16 | "title": "Update test.txt", 17 | "author_association": "OWNER", 18 | "head": { 19 | "label": "nikku:nikku-patch-1", 20 | "ref": "nikku-patch-1", 21 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 22 | "repo": { 23 | "name": "testtest-checks", 24 | "full_name": "nikku/testtest-checks" 25 | } 26 | }, 27 | "base": { 28 | "label": "nikku:master", 29 | "ref": "master", 30 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 31 | "repo": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest" 34 | } 35 | } 36 | }, 37 | "repository": { 38 | "name": "testtest-checks", 39 | "full_name": "nikku/testtest-checks", 40 | "owner": { 41 | "login": "nikku" 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/001a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "author_association": "OWNER", 19 | "head": { 20 | "label": "nikku:nikku-patch-1", 21 | "ref": "nikku-patch-1", 22 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 23 | "repo": { 24 | "name": "testtest-checks", 25 | "full_name": "nikku/testtest-checks" 26 | } 27 | }, 28 | "base": { 29 | "label": "nikku:master", 30 | "ref": "master", 31 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 32 | "repo": { 33 | "name": "testtest-checks", 34 | "full_name": "nikku/testtest" 35 | } 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/001b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/002_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/003_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/004_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_no_status_checks/005_check_suite.completed.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "check_suite.completed", 3 | "type": "event", 4 | "payload": { 5 | "action": "completed", 6 | "check_suite": { 7 | "head_branch": "waltaaa-patch-1", 8 | "head_sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "status": "completed", 10 | "conclusion": "neutral", 11 | "pull_requests": [ 12 | { 13 | "number": 1, 14 | "head": { 15 | "ref": "waltaaa-patch-1", 16 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 17 | "repo": { 18 | "name": "testtest-checks" 19 | } 20 | }, 21 | "base": { 22 | "ref": "master", 23 | "sha": "ee640dc5872b064a1b48c24f823099fe6882d69e", 24 | "repo": { 25 | "name": "testtest-checks" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "repository": { 32 | "name": "testtest-checks", 33 | "full_name": "nikku/testtest-checks", 34 | "owner": { 35 | "login": "nikku" 36 | }, 37 | "default_branch": "master" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/000_pull_request_review.submitted.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pull_request_review.submitted", 3 | "type": "event", 4 | "payload": { 5 | "action": "submitted", 6 | "review": { 7 | "user": { 8 | "login": "waltaaa" 9 | }, 10 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "state": "approved", 12 | "author_association": "COLLABORATOR" 13 | }, 14 | "pull_request": { 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku" 20 | }, 21 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 22 | "assignees": [], 23 | "requested_reviewers": [], 24 | "requested_teams": [], 25 | "labels": [], 26 | "head": { 27 | "label": "nikku:nikku-patch-1", 28 | "ref": "nikku-patch-1", 29 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 30 | "repo": { 31 | "name": "testtest", 32 | "full_name": "nikku/testtest" 33 | } 34 | }, 35 | "base": { 36 | "label": "nikku:master", 37 | "ref": "master", 38 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 39 | "repo": { 40 | "name": "testtest", 41 | "full_name": "nikku/testtest" 42 | } 43 | }, 44 | "author_association": "OWNER" 45 | }, 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/000a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku" 20 | }, 21 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 22 | "assignees": [], 23 | "requested_reviewers": [], 24 | "requested_teams": [], 25 | "labels": [], 26 | "head": { 27 | "label": "nikku:nikku-patch-1", 28 | "ref": "nikku-patch-1", 29 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 30 | "repo": { 31 | "name": "testtest", 32 | "full_name": "nikku/testtest" 33 | } 34 | }, 35 | "base": { 36 | "label": "nikku:master", 37 | "ref": "master", 38 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 39 | "repo": { 40 | "name": "testtest", 41 | "full_name": "nikku/testtest" 42 | } 43 | }, 44 | "author_association": "OWNER" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/000b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/001_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/002_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "success", 12 | "statuses": [ 13 | { 14 | "state": "success", 15 | "context": "continuous-integration/travis-ci/push" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/pr" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/003_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/0050_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "waltaaa", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "COLLABORATOR", 19 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_non_collaborator_review/0051_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "waltaaa" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/000_pull_request_review.submitted.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pull_request_review.submitted", 3 | "type": "event", 4 | "payload": { 5 | "action": "submitted", 6 | "review": { 7 | "user": { 8 | "login": "waltaaa" 9 | }, 10 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "state": "approved", 12 | "author_association": "COLLABORATOR" 13 | }, 14 | "pull_request": { 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku" 20 | }, 21 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 22 | "assignees": [], 23 | "requested_reviewers": [], 24 | "requested_teams": [], 25 | "labels": [], 26 | "head": { 27 | "label": "nikku:nikku-patch-1", 28 | "ref": "nikku-patch-1", 29 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 30 | "repo": { 31 | "name": "testtest", 32 | "full_name": "nikku/testtest" 33 | } 34 | }, 35 | "base": { 36 | "label": "nikku:master", 37 | "ref": "master", 38 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 39 | "repo": { 40 | "name": "testtest", 41 | "full_name": "nikku/testtest" 42 | } 43 | }, 44 | "author_association": "OWNER" 45 | }, 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/000a_pulls.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29 8 | }, 9 | "result": { 10 | "data": { 11 | "rebaseable": true, 12 | "mergeable": true, 13 | "merged": false, 14 | "draft": false, 15 | "number": 29, 16 | "state": "open", 17 | "title": "Update test.txt", 18 | "user": { 19 | "login": "nikku" 20 | }, 21 | "merge_commit_sha": "2c249293b68269d009b489c978653101d055301e", 22 | "assignees": [], 23 | "requested_reviewers": [], 24 | "requested_teams": [], 25 | "labels": [], 26 | "head": { 27 | "label": "nikku:nikku-patch-1", 28 | "ref": "nikku-patch-1", 29 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 30 | "repo": { 31 | "name": "testtest", 32 | "full_name": "nikku/testtest" 33 | } 34 | }, 35 | "base": { 36 | "label": "nikku:master", 37 | "ref": "master", 38 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a", 39 | "repo": { 40 | "name": "testtest", 41 | "full_name": "nikku/testtest" 42 | } 43 | }, 44 | "author_association": "OWNER" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/000b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/001_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/002_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "success", 12 | "statuses": [ 13 | { 14 | "state": "success", 15 | "context": "continuous-integration/travis-ci/push" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/pr" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/003_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0050_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "mike" 15 | }, 16 | "state": "CHANGES_REQUESTED", 17 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 18 | }, 19 | { 20 | "user": { 21 | "login": "waltaaa", 22 | "type": "User" 23 | }, 24 | "state": "APPROVED", 25 | "author_association": "COLLABORATOR", 26 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 27 | } 28 | ] 29 | } 30 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0051_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "mike" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0052_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "waltaaa" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/006b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/007_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/008_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "success", 12 | "statuses": [ 13 | { 14 | "state": "success", 15 | "context": "continuous-integration/travis-ci/push" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/pr" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/009_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0110_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "mike" 15 | }, 16 | "state": "CHANGES_REQUESTED", 17 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 18 | }, 19 | { 20 | "user": { 21 | "login": "waltaaa", 22 | "type": "User" 23 | }, 24 | "state": "APPROVED", 25 | "author_association": "COLLABORATOR", 26 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 27 | }, 28 | { 29 | "user": { 30 | "login": "mike" 31 | }, 32 | "state": "APPROVED", 33 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0111_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "waltaaa" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/0112_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "mike" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_rejected_reviews/012_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_failed/001_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_failed/002b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_failed/003_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_failed/004_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "failed", 12 | "statuses": [ 13 | { 14 | "state": "failed", 15 | "context": "continuous-integration/travis-ci/pr" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/push" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_failed/005_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "failed", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/000a_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/001_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/002_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [ 13 | { 14 | "state": "pending", 15 | "context": "continuous-integration/travis-ci/push" 16 | } 17 | ], 18 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 19 | "total_count": 1, 20 | "repository": { 21 | "name": "testtest", 22 | "full_name": "nikku/testtest", 23 | "owner": { 24 | "login": "nikku", 25 | "type": "User" 26 | } 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/004_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/005_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/006_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/008_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/009b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/010_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/011_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [ 13 | { 14 | "state": "pending", 15 | "context": "continuous-integration/travis-ci/pr" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/push" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/012_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/pr", 8 | "state": "success", 9 | "commit": { 10 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "GitHub" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "web-flow", 30 | "type": "User" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "nikku-patch-1", 41 | "commit": { 42 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/013b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/014_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/015_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "success", 12 | "statuses": [ 13 | { 14 | "state": "success", 15 | "context": "continuous-integration/travis-ci/push" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/pr" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/016_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/0180_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "waltaaa", 15 | "type": "User" 16 | }, 17 | "state": "COMMENTED", 18 | "author_association": "COLLABORATOR", 19 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/0181_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "waltaaa" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/020b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": {} 11 | } 12 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/021_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/022_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "success", 12 | "statuses": [ 13 | { 14 | "state": "success", 15 | "context": "continuous-integration/travis-ci/push" 16 | }, 17 | { 18 | "state": "success", 19 | "context": "continuous-integration/travis-ci/pr" 20 | } 21 | ], 22 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 23 | "total_count": 2, 24 | "repository": { 25 | "name": "testtest", 26 | "full_name": "nikku/testtest", 27 | "owner": { 28 | "login": "nikku", 29 | "type": "User" 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/023_checks.listSuitesForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "checks.listSuitesForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "ref": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 8 | }, 9 | "result": { 10 | "data": { 11 | "total_count": 0, 12 | "check_suites": [] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/0250_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "waltaaa", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "COLLABORATOR", 19 | "commit_id": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0" 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/0251_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "username": "waltaaa" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/026_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest", 7 | "pull_number": 29, 8 | "sha": "53e4600f2c01d18a8005f0f3e857c701fed8a9e0", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /test/fixtures/unprotected_status_only/028_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "status", 3 | "type": "event", 4 | "payload": { 5 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf", 6 | "name": "nikku/testtest", 7 | "context": "continuous-integration/travis-ci/push", 8 | "state": "pending", 9 | "commit": { 10 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf", 11 | "commit": { 12 | "author": { 13 | "name": "Nico Rehwaldt" 14 | }, 15 | "committer": { 16 | "name": "merge-me-test[bot]" 17 | }, 18 | "message": "Update test.txt", 19 | "tree": { 20 | "sha": "911f57504612def9e96f0991fc84d59e078ec674" 21 | }, 22 | "comment_count": 0 23 | }, 24 | "author": { 25 | "login": "nikku", 26 | "type": "User" 27 | }, 28 | "committer": { 29 | "login": "merge-me-test[bot]", 30 | "type": "Bot" 31 | }, 32 | "parents": [ 33 | { 34 | "sha": "c5de67566cca3f699aab82e92dc930d964587f2a" 35 | } 36 | ] 37 | }, 38 | "branches": [ 39 | { 40 | "name": "master", 41 | "commit": { 42 | "sha": "6dddb0904e02f6503d96b0ab6ec0a5a064027ccf" 43 | } 44 | } 45 | ], 46 | "repository": { 47 | "name": "testtest", 48 | "full_name": "nikku/testtest", 49 | "owner": { 50 | "login": "nikku", 51 | "type": "User" 52 | }, 53 | "default_branch": "master" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/003_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "minApprovals": 2 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/007_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/008_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/0110_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [] 12 | } 13 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/012b_config.get.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "config.get", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "path": ".github/merge-me.yml" 8 | }, 9 | "result": { 10 | "config": { 11 | "minApprovals": 2 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/013_repos.getBranchProtection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getBranchProtection", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "branch": "master" 8 | }, 9 | "result": { 10 | "error": { 11 | "status": 404 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/014_repos.getCombinedStatusForRef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.getCombinedStatusForRef", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "ref": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 8 | }, 9 | "result": { 10 | "data": { 11 | "state": "pending", 12 | "statuses": [], 13 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 14 | "total_count": 0, 15 | "repository": { 16 | "name": "testtest-checks", 17 | "full_name": "nikku/testtest-checks", 18 | "owner": { 19 | "login": "nikku", 20 | "type": "User" 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/0170_pulls.listReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.listReviews", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "per_page": 100 9 | }, 10 | "result": { 11 | "data": [ 12 | { 13 | "user": { 14 | "login": "nikku", 15 | "type": "User" 16 | }, 17 | "state": "APPROVED", 18 | "author_association": "OWNER", 19 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 20 | }, 21 | { 22 | "user": { 23 | "login": "oguzeroglu", 24 | "type": "User" 25 | }, 26 | "state": "APPROVED", 27 | "author_association": "MEMBER", 28 | "commit_id": "ca7142df376bebb6edcc0c156ca6897d39f468e2" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/0171_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "nikku" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/0172_repos.checkCollaborator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repos.checkCollaborator", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "username": "oguzeroglu" 8 | }, 9 | "result": {} 10 | } -------------------------------------------------------------------------------- /test/fixtures/with_minapprovals_config/018_pulls.merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulls.merge", 3 | "type": "api-call", 4 | "args": { 5 | "owner": "nikku", 6 | "repo": "testtest-checks", 7 | "pull_number": 1, 8 | "sha": "ca7142df376bebb6edcc0c156ca6897d39f468e2", 9 | "merge_method": "rebase" 10 | }, 11 | "result": { 12 | "data": { 13 | "sha": "18bf62ff9ce3b89190dd4b15ddcfcd77dd4b4fef", 14 | "message": "Pull Request successfully merged" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "CommonJS", 5 | "allowJs": true, 6 | "checkJs": true, 7 | "rootDir": ".", 8 | "strict": false, 9 | "noEmit": true, 10 | "skipLibCheck": true, 11 | "strictNullChecks": true 12 | }, 13 | "include": [ 14 | "lib" 15 | ], 16 | "exclude": [ 17 | "node_modules" 18 | ] 19 | } 20 | --------------------------------------------------------------------------------