|
1 | 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
3 | | -exports[`getGitHubContext > returns eventName 2`] = ` |
| 3 | +exports[`useContext > returns context for \`pull_request\` 2`] = ` |
4 | 4 | { |
5 | 5 | "action": "opened", |
6 | 6 | "installation": { |
@@ -521,3 +521,145 @@ exports[`getGitHubContext > returns eventName 2`] = ` |
521 | 521 | }, |
522 | 522 | } |
523 | 523 | `; |
| 524 | + |
| 525 | +exports[`useContext > returns context for \`workflow_dispatch\` 1`] = ` |
| 526 | +{ |
| 527 | + "inputs": { |
| 528 | + "name": "Mona the Octocat", |
| 529 | + }, |
| 530 | + "organization": { |
| 531 | + "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", |
| 532 | + "description": "Working better together!", |
| 533 | + "events_url": "https://api.github.com/orgs/octo-org/events", |
| 534 | + "hooks_url": "https://api.github.com/orgs/octo-org/hooks", |
| 535 | + "id": 6811672, |
| 536 | + "issues_url": "https://api.github.com/orgs/octo-org/issues", |
| 537 | + "login": "octo-org", |
| 538 | + "members_url": "https://api.github.com/orgs/octo-org/members{/member}", |
| 539 | + "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", |
| 540 | + "public_members_url": "https://api.github.com/orgs/octo-org/public_members{/member}", |
| 541 | + "repos_url": "https://api.github.com/orgs/octo-org/repos", |
| 542 | + "url": "https://api.github.com/orgs/octo-org", |
| 543 | + }, |
| 544 | + "ref": "refs/heads/master", |
| 545 | + "repository": { |
| 546 | + "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", |
| 547 | + "archived": false, |
| 548 | + "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", |
| 549 | + "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", |
| 550 | + "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", |
| 551 | + "clone_url": "https://github.com/octo-org/octo-repo.git", |
| 552 | + "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", |
| 553 | + "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", |
| 554 | + "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", |
| 555 | + "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", |
| 556 | + "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", |
| 557 | + "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", |
| 558 | + "created_at": "2014-02-28T02:42:51Z", |
| 559 | + "custom_properties": {}, |
| 560 | + "default_branch": "master", |
| 561 | + "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments", |
| 562 | + "description": "My first repo on GitHub!", |
| 563 | + "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", |
| 564 | + "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", |
| 565 | + "fork": false, |
| 566 | + "forks": 1, |
| 567 | + "forks_count": 1, |
| 568 | + "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", |
| 569 | + "full_name": "octo-org/octo-repo", |
| 570 | + "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", |
| 571 | + "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", |
| 572 | + "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", |
| 573 | + "git_url": "git://github.com/octo-org/octo-repo.git", |
| 574 | + "has_downloads": true, |
| 575 | + "has_issues": true, |
| 576 | + "has_pages": false, |
| 577 | + "has_projects": true, |
| 578 | + "has_wiki": true, |
| 579 | + "homepage": "https://example.com", |
| 580 | + "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", |
| 581 | + "html_url": "https://github.com/octo-org/octo-repo", |
| 582 | + "id": 17273051, |
| 583 | + "is_template": false, |
| 584 | + "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", |
| 585 | + "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", |
| 586 | + "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", |
| 587 | + "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", |
| 588 | + "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", |
| 589 | + "language": "JavaScript", |
| 590 | + "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", |
| 591 | + "license": null, |
| 592 | + "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", |
| 593 | + "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", |
| 594 | + "mirror_url": null, |
| 595 | + "name": "octo-repo", |
| 596 | + "node_id": "MDEwOlJlcG9zaXRvcnkxNzI3MzA1MQ==", |
| 597 | + "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", |
| 598 | + "open_issues": 23, |
| 599 | + "open_issues_count": 23, |
| 600 | + "owner": { |
| 601 | + "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", |
| 602 | + "events_url": "https://api.github.com/users/octo-org/events{/privacy}", |
| 603 | + "followers_url": "https://api.github.com/users/octo-org/followers", |
| 604 | + "following_url": "https://api.github.com/users/octo-org/following{/other_user}", |
| 605 | + "gists_url": "https://api.github.com/users/octo-org/gists{/gist_id}", |
| 606 | + "gravatar_id": "", |
| 607 | + "html_url": "https://github.com/octo-org", |
| 608 | + "id": 6811672, |
| 609 | + "login": "octo-org", |
| 610 | + "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", |
| 611 | + "organizations_url": "https://api.github.com/users/octo-org/orgs", |
| 612 | + "received_events_url": "https://api.github.com/users/octo-org/received_events", |
| 613 | + "repos_url": "https://api.github.com/users/octo-org/repos", |
| 614 | + "site_admin": false, |
| 615 | + "starred_url": "https://api.github.com/users/octo-org/starred{/owner}{/repo}", |
| 616 | + "subscriptions_url": "https://api.github.com/users/octo-org/subscriptions", |
| 617 | + "type": "Organization", |
| 618 | + "url": "https://api.github.com/users/octo-org", |
| 619 | + }, |
| 620 | + "private": true, |
| 621 | + "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", |
| 622 | + "pushed_at": "2018-10-10T15:58:47Z", |
| 623 | + "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", |
| 624 | + "size": 59, |
| 625 | + "ssh_url": "git@github.com:octo-org/octo-repo.git", |
| 626 | + "stargazers_count": 0, |
| 627 | + "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", |
| 628 | + "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", |
| 629 | + "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", |
| 630 | + "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", |
| 631 | + "svn_url": "https://github.com/octo-org/octo-repo", |
| 632 | + "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", |
| 633 | + "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", |
| 634 | + "topics": [], |
| 635 | + "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", |
| 636 | + "updated_at": "2018-10-10T15:58:51Z", |
| 637 | + "url": "https://api.github.com/repos/octo-org/octo-repo", |
| 638 | + "visibility": "public", |
| 639 | + "watchers": 0, |
| 640 | + "watchers_count": 0, |
| 641 | + "web_commit_signoff_required": false, |
| 642 | + }, |
| 643 | + "sender": { |
| 644 | + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", |
| 645 | + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", |
| 646 | + "followers_url": "https://api.github.com/users/Codertocat/followers", |
| 647 | + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", |
| 648 | + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", |
| 649 | + "gravatar_id": "", |
| 650 | + "html_url": "https://github.com/Codertocat", |
| 651 | + "id": 21031067, |
| 652 | + "login": "Codertocat", |
| 653 | + "node_id": "MDQ6VXNlcjIxMDMxMDY3", |
| 654 | + "organizations_url": "https://api.github.com/users/Codertocat/orgs", |
| 655 | + "received_events_url": "https://api.github.com/users/Codertocat/received_events", |
| 656 | + "repos_url": "https://api.github.com/users/Codertocat/repos", |
| 657 | + "site_admin": false, |
| 658 | + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", |
| 659 | + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", |
| 660 | + "type": "User", |
| 661 | + "url": "https://api.github.com/users/Codertocat", |
| 662 | + }, |
| 663 | + "workflow": ".github/workflows/hello-world-workflow.yml", |
| 664 | +} |
| 665 | +`; |
0 commit comments