diff --git a/tests/fail/noAuthor/test.json b/tests/fail/noAuthor/test.json index a247774..71e59f1 100644 --- a/tests/fail/noAuthor/test.json +++ b/tests/fail/noAuthor/test.json @@ -38,78 +38,78 @@ "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "Hello-World", - "full_name": "Codertocat/Hello-World", + "name": "NoAuthor", + "full_name": "Fail/NoAuthor", "private": false, "owner": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com", - "login": "Codertocat", + "name": "Fail", + "email": "21031067+Fail@users.noreply.github.com", + "login": "Fail", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Fail", + "html_url": "https://github.com/Fail", + "followers_url": "https://api.github.com/users/Fail/followers", + "following_url": "https://api.github.com/users/Fail/following{/other_user}", + "gists_url": "https://api.github.com/users/Fail/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Fail/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Fail/subscriptions", + "organizations_url": "https://api.github.com/users/Fail/orgs", + "repos_url": "https://api.github.com/users/Fail/repos", + "events_url": "https://api.github.com/users/Fail/events{/privacy}", + "received_events_url": "https://api.github.com/users/Fail/received_events", "type": "User", "site_admin": false }, - "html_url": "https://github.com/Codertocat/Hello-World", + "html_url": "https://github.com/Fail/NoAuthor", "description": null, "fork": false, - "url": "https://github.com/Codertocat/Hello-World", - "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", - "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", - "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", - "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", + "url": "https://github.com/Fail/NoAuthor", + "forks_url": "https://api.github.com/repos/Fail/NoAuthor/forks", + "keys_url": "https://api.github.com/repos/Fail/NoAuthor/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Fail/NoAuthor/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Fail/NoAuthor/teams", + "hooks_url": "https://api.github.com/repos/Fail/NoAuthor/hooks", + "issue_events_url": "https://api.github.com/repos/Fail/NoAuthor/issues/events{/number}", + "events_url": "https://api.github.com/repos/Fail/NoAuthor/events", + "assignees_url": "https://api.github.com/repos/Fail/NoAuthor/assignees{/user}", + "branches_url": "https://api.github.com/repos/Fail/NoAuthor/branches{/branch}", + "tags_url": "https://api.github.com/repos/Fail/NoAuthor/tags", + "blobs_url": "https://api.github.com/repos/Fail/NoAuthor/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Fail/NoAuthor/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Fail/NoAuthor/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Fail/NoAuthor/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Fail/NoAuthor/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Fail/NoAuthor/languages", + "stargazers_url": "https://api.github.com/repos/Fail/NoAuthor/stargazers", + "contributors_url": "https://api.github.com/repos/Fail/NoAuthor/contributors", + "subscribers_url": "https://api.github.com/repos/Fail/NoAuthor/subscribers", + "subscription_url": "https://api.github.com/repos/Fail/NoAuthor/subscription", + "commits_url": "https://api.github.com/repos/Fail/NoAuthor/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Fail/NoAuthor/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Fail/NoAuthor/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Fail/NoAuthor/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Fail/NoAuthor/contents/{+path}", + "compare_url": "https://api.github.com/repos/Fail/NoAuthor/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Fail/NoAuthor/merges", + "archive_url": "https://api.github.com/repos/Fail/NoAuthor/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Fail/NoAuthor/downloads", + "issues_url": "https://api.github.com/repos/Fail/NoAuthor/issues{/number}", + "pulls_url": "https://api.github.com/repos/Fail/NoAuthor/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Fail/NoAuthor/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Fail/NoAuthor/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Fail/NoAuthor/labels{/name}", + "releases_url": "https://api.github.com/repos/Fail/NoAuthor/releases{/id}", + "deployments_url": "https://api.github.com/repos/Fail/NoAuthor/deployments", "created_at": 1557933565, "updated_at": "2019-05-15T15:20:41Z", "pushed_at": 1557933657, - "git_url": "git://github.com/Codertocat/Hello-World.git", - "ssh_url": "git@github.com:Codertocat/Hello-World.git", - "clone_url": "https://github.com/Codertocat/Hello-World.git", - "svn_url": "https://github.com/Codertocat/Hello-World", + "git_url": "git://github.com/Fail/NoAuthor.git", + "ssh_url": "git@github.com:Fail/NoAuthor.git", + "clone_url": "https://github.com/Fail/NoAuthor.git", + "svn_url": "https://github.com/Fail/NoAuthor", "homepage": null, "size": 0, "stargazers_count": 0, @@ -134,26 +134,26 @@ "master_branch": "master" }, "pusher": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com" + "name": "Fail", + "email": "21031067+Fail@users.noreply.github.com" }, "sender": { - "login": "Codertocat", + "login": "Fail", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Fail", + "html_url": "https://github.com/Fail", + "followers_url": "https://api.github.com/users/Fail/followers", + "following_url": "https://api.github.com/users/Fail/following{/other_user}", + "gists_url": "https://api.github.com/users/Fail/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Fail/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Fail/subscriptions", + "organizations_url": "https://api.github.com/users/Fail/orgs", + "repos_url": "https://api.github.com/users/Fail/repos", + "events_url": "https://api.github.com/users/Fail/events{/privacy}", + "received_events_url": "https://api.github.com/users/Fail/received_events", "type": "User", "site_admin": false } diff --git a/tests/fail/noAuthor/test.sh b/tests/fail/noAuthor/test.sh index 6192bcd..0c2f212 100755 --- a/tests/fail/noAuthor/test.sh +++ b/tests/fail/noAuthor/test.sh @@ -6,4 +6,5 @@ act \ --secret-file "secrets.env" \ --workflows "$testDir/test.yml" \ --container-architecture "linux/amd64" \ ---eventpath "$testDir/test.json" +--eventpath "$testDir/test.json" \ +"$@" diff --git a/tests/pass/commits/test.json b/tests/pass/commits/test.json index 5349178..989320c 100644 --- a/tests/pass/commits/test.json +++ b/tests/pass/commits/test.json @@ -39,78 +39,78 @@ "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "Hello-World", - "full_name": "Codertocat/Hello-World", + "name": "Commits", + "full_name": "Pass/Commits", "private": false, "owner": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com", - "login": "Codertocat", + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false }, - "html_url": "https://github.com/Codertocat/Hello-World", + "html_url": "https://github.com/Pass/Commits", "description": null, "fork": false, - "url": "https://github.com/Codertocat/Hello-World", - "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", - "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", - "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", - "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", + "url": "https://github.com/Pass/Commits", + "forks_url": "https://api.github.com/repos/Pass/Commits/forks", + "keys_url": "https://api.github.com/repos/Pass/Commits/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Pass/Commits/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Pass/Commits/teams", + "hooks_url": "https://api.github.com/repos/Pass/Commits/hooks", + "issue_events_url": "https://api.github.com/repos/Pass/Commits/issues/events{/number}", + "events_url": "https://api.github.com/repos/Pass/Commits/events", + "assignees_url": "https://api.github.com/repos/Pass/Commits/assignees{/user}", + "branches_url": "https://api.github.com/repos/Pass/Commits/branches{/branch}", + "tags_url": "https://api.github.com/repos/Pass/Commits/tags", + "blobs_url": "https://api.github.com/repos/Pass/Commits/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Pass/Commits/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Pass/Commits/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Pass/Commits/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Pass/Commits/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Pass/Commits/languages", + "stargazers_url": "https://api.github.com/repos/Pass/Commits/stargazers", + "contributors_url": "https://api.github.com/repos/Pass/Commits/contributors", + "subscribers_url": "https://api.github.com/repos/Pass/Commits/subscribers", + "subscription_url": "https://api.github.com/repos/Pass/Commits/subscription", + "commits_url": "https://api.github.com/repos/Pass/Commits/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Pass/Commits/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Pass/Commits/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Pass/Commits/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Pass/Commits/contents/{+path}", + "compare_url": "https://api.github.com/repos/Pass/Commits/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Pass/Commits/merges", + "archive_url": "https://api.github.com/repos/Pass/Commits/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Pass/Commits/downloads", + "issues_url": "https://api.github.com/repos/Pass/Commits/issues{/number}", + "pulls_url": "https://api.github.com/repos/Pass/Commits/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Pass/Commits/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Pass/Commits/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Pass/Commits/labels{/name}", + "releases_url": "https://api.github.com/repos/Pass/Commits/releases{/id}", + "deployments_url": "https://api.github.com/repos/Pass/Commits/deployments", "created_at": 1557933565, "updated_at": "2019-05-15T15:20:41Z", "pushed_at": 1557933657, - "git_url": "git://github.com/Codertocat/Hello-World.git", - "ssh_url": "git@github.com:Codertocat/Hello-World.git", - "clone_url": "https://github.com/Codertocat/Hello-World.git", - "svn_url": "https://github.com/Codertocat/Hello-World", + "git_url": "git://github.com/Pass/Commits.git", + "ssh_url": "git@github.com:Pass/Commits.git", + "clone_url": "https://github.com/Pass/Commits.git", + "svn_url": "https://github.com/Pass/Commits", "homepage": null, "size": 0, "stargazers_count": 0, @@ -135,26 +135,26 @@ "master_branch": "master" }, "pusher": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com" + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com" }, "sender": { - "login": "Codertocat", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false } diff --git a/tests/pass/commits/test.sh b/tests/pass/commits/test.sh index 6192bcd..0c2f212 100755 --- a/tests/pass/commits/test.sh +++ b/tests/pass/commits/test.sh @@ -6,4 +6,5 @@ act \ --secret-file "secrets.env" \ --workflows "$testDir/test.yml" \ --container-architecture "linux/amd64" \ ---eventpath "$testDir/test.json" +--eventpath "$testDir/test.json" \ +"$@" diff --git a/tests/pass/deploy/test.json b/tests/pass/deploy/test.json index b9f7ca2..5cf9e63 100644 --- a/tests/pass/deploy/test.json +++ b/tests/pass/deploy/test.json @@ -6,84 +6,84 @@ "deleted": true, "forced": false, "base_ref": null, - "compare": "https://github.com/Codertocat/Hello-World/compare/6113728f27ae...000000000000", + "compare": "https://github.com/Pass/Deploy/compare/6113728f27ae...000000000000", "commits": [], "head_commit": null, "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "Hello-World", - "full_name": "Codertocat/Hello-World", + "name": "Deploy", + "full_name": "Pass/Deploy", "private": false, "owner": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com", - "login": "Codertocat", + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false }, - "html_url": "https://github.com/Codertocat/Hello-World", + "html_url": "https://github.com/Pass/Deploy", "description": null, "fork": false, - "url": "https://github.com/Codertocat/Hello-World", - "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", - "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", - "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", - "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", + "url": "https://github.com/Pass/Deploy", + "forks_url": "https://api.github.com/repos/Pass/Deploy/forks", + "keys_url": "https://api.github.com/repos/Pass/Deploy/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Pass/Deploy/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Pass/Deploy/teams", + "hooks_url": "https://api.github.com/repos/Pass/Deploy/hooks", + "issue_events_url": "https://api.github.com/repos/Pass/Deploy/issues/events{/number}", + "events_url": "https://api.github.com/repos/Pass/Deploy/events", + "assignees_url": "https://api.github.com/repos/Pass/Deploy/assignees{/user}", + "branches_url": "https://api.github.com/repos/Pass/Deploy/branches{/branch}", + "tags_url": "https://api.github.com/repos/Pass/Deploy/tags", + "blobs_url": "https://api.github.com/repos/Pass/Deploy/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Pass/Deploy/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Pass/Deploy/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Pass/Deploy/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Pass/Deploy/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Pass/Deploy/languages", + "stargazers_url": "https://api.github.com/repos/Pass/Deploy/stargazers", + "contributors_url": "https://api.github.com/repos/Pass/Deploy/contributors", + "subscribers_url": "https://api.github.com/repos/Pass/Deploy/subscribers", + "subscription_url": "https://api.github.com/repos/Pass/Deploy/subscription", + "commits_url": "https://api.github.com/repos/Pass/Deploy/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Pass/Deploy/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Pass/Deploy/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Pass/Deploy/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Pass/Deploy/contents/{+path}", + "compare_url": "https://api.github.com/repos/Pass/Deploy/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Pass/Deploy/merges", + "archive_url": "https://api.github.com/repos/Pass/Deploy/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Pass/Deploy/downloads", + "issues_url": "https://api.github.com/repos/Pass/Deploy/issues{/number}", + "pulls_url": "https://api.github.com/repos/Pass/Deploy/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Pass/Deploy/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Pass/Deploy/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Pass/Deploy/labels{/name}", + "releases_url": "https://api.github.com/repos/Pass/Deploy/releases{/id}", + "deployments_url": "https://api.github.com/repos/Pass/Deploy/deployments", "created_at": 1557933565, "updated_at": "2019-05-15T15:20:41Z", "pushed_at": 1557933657, - "git_url": "git://github.com/Codertocat/Hello-World.git", - "ssh_url": "git@github.com:Codertocat/Hello-World.git", - "clone_url": "https://github.com/Codertocat/Hello-World.git", - "svn_url": "https://github.com/Codertocat/Hello-World", + "git_url": "git://github.com/Pass/Deploy.git", + "ssh_url": "git@github.com:Pass/Deploy.git", + "clone_url": "https://github.com/Pass/Deploy.git", + "svn_url": "https://github.com/Pass/Deploy", "homepage": null, "size": 0, "stargazers_count": 0, @@ -108,26 +108,26 @@ "master_branch": "master" }, "pusher": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com" + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com" }, "sender": { - "login": "Codertocat", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false } diff --git a/tests/pass/deploy/test.sh b/tests/pass/deploy/test.sh index c1c2f7c..6c1efe4 100755 --- a/tests/pass/deploy/test.sh +++ b/tests/pass/deploy/test.sh @@ -6,4 +6,5 @@ act \ --secret-file "secrets.env" \ --workflows ".github/workflows/discord.yml" \ --container-architecture "linux/amd64" \ ---eventpath "$testDir/test.json" +--eventpath "$testDir/test.json" \ +"$@" diff --git a/tests/pass/simple/test.json b/tests/pass/simple/test.json index b9f7ca2..fecb248 100644 --- a/tests/pass/simple/test.json +++ b/tests/pass/simple/test.json @@ -6,84 +6,84 @@ "deleted": true, "forced": false, "base_ref": null, - "compare": "https://github.com/Codertocat/Hello-World/compare/6113728f27ae...000000000000", + "compare": "https://github.com/Pass/Simple/compare/6113728f27ae...000000000000", "commits": [], "head_commit": null, "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "Hello-World", - "full_name": "Codertocat/Hello-World", + "name": "Simple", + "full_name": "Pass/Simple", "private": false, "owner": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com", - "login": "Codertocat", + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false }, - "html_url": "https://github.com/Codertocat/Hello-World", + "html_url": "https://github.com/Pass/Simple", "description": null, "fork": false, - "url": "https://github.com/Codertocat/Hello-World", - "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", - "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", - "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", - "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", + "url": "https://github.com/Pass/Simple", + "forks_url": "https://api.github.com/repos/Pass/Simple/forks", + "keys_url": "https://api.github.com/repos/Pass/Simple/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Pass/Simple/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Pass/Simple/teams", + "hooks_url": "https://api.github.com/repos/Pass/Simple/hooks", + "issue_events_url": "https://api.github.com/repos/Pass/Simple/issues/events{/number}", + "events_url": "https://api.github.com/repos/Pass/Simple/events", + "assignees_url": "https://api.github.com/repos/Pass/Simple/assignees{/user}", + "branches_url": "https://api.github.com/repos/Pass/Simple/branches{/branch}", + "tags_url": "https://api.github.com/repos/Pass/Simple/tags", + "blobs_url": "https://api.github.com/repos/Pass/Simple/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Pass/Simple/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Pass/Simple/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Pass/Simple/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Pass/Simple/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Pass/Simple/languages", + "stargazers_url": "https://api.github.com/repos/Pass/Simple/stargazers", + "contributors_url": "https://api.github.com/repos/Pass/Simple/contributors", + "subscribers_url": "https://api.github.com/repos/Pass/Simple/subscribers", + "subscription_url": "https://api.github.com/repos/Pass/Simple/subscription", + "commits_url": "https://api.github.com/repos/Pass/Simple/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Pass/Simple/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Pass/Simple/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Pass/Simple/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Pass/Simple/contents/{+path}", + "compare_url": "https://api.github.com/repos/Pass/Simple/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Pass/Simple/merges", + "archive_url": "https://api.github.com/repos/Pass/Simple/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Pass/Simple/downloads", + "issues_url": "https://api.github.com/repos/Pass/Simple/issues{/number}", + "pulls_url": "https://api.github.com/repos/Pass/Simple/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Pass/Simple/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Pass/Simple/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Pass/Simple/labels{/name}", + "releases_url": "https://api.github.com/repos/Pass/Simple/releases{/id}", + "deployments_url": "https://api.github.com/repos/Pass/Simple/deployments", "created_at": 1557933565, "updated_at": "2019-05-15T15:20:41Z", "pushed_at": 1557933657, - "git_url": "git://github.com/Codertocat/Hello-World.git", - "ssh_url": "git@github.com:Codertocat/Hello-World.git", - "clone_url": "https://github.com/Codertocat/Hello-World.git", - "svn_url": "https://github.com/Codertocat/Hello-World", + "git_url": "git://github.com/Pass/Simple.git", + "ssh_url": "git@github.com:Pass/Simple.git", + "clone_url": "https://github.com/Pass/Simple.git", + "svn_url": "https://github.com/Pass/Simple", "homepage": null, "size": 0, "stargazers_count": 0, @@ -108,26 +108,26 @@ "master_branch": "master" }, "pusher": { - "name": "Codertocat", - "email": "21031067+Codertocat@users.noreply.github.com" + "name": "Pass", + "email": "21031067+Pass@users.noreply.github.com" }, "sender": { - "login": "Codertocat", + "login": "Pass", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "url": "https://api.github.com/users/Pass", + "html_url": "https://github.com/Pass", + "followers_url": "https://api.github.com/users/Pass/followers", + "following_url": "https://api.github.com/users/Pass/following{/other_user}", + "gists_url": "https://api.github.com/users/Pass/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Pass/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Pass/subscriptions", + "organizations_url": "https://api.github.com/users/Pass/orgs", + "repos_url": "https://api.github.com/users/Pass/repos", + "events_url": "https://api.github.com/users/Pass/events{/privacy}", + "received_events_url": "https://api.github.com/users/Pass/received_events", "type": "User", "site_admin": false } diff --git a/tests/pass/simple/test.sh b/tests/pass/simple/test.sh index 6192bcd..0c2f212 100755 --- a/tests/pass/simple/test.sh +++ b/tests/pass/simple/test.sh @@ -6,4 +6,5 @@ act \ --secret-file "secrets.env" \ --workflows "$testDir/test.yml" \ --container-architecture "linux/amd64" \ ---eventpath "$testDir/test.json" +--eventpath "$testDir/test.json" \ +"$@" diff --git a/tests/run.sh b/tests/run.sh new file mode 100755 index 0000000..e7fd422 --- /dev/null +++ b/tests/run.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +testDir="$(dirname "${BASH_SOURCE[0]}")" + +if [ ! -e "$testDir/../secrets.env" ]; then + echo "Please enter your webhook:" + echo -n "> " + read webhook + echo "DISCORD_WEBHOOK=\"$webhook\"" > "$testDir/../secrets.env" +fi + +for file in $(find "$testDir" -type f -iname "*test.sh"); do + echo -n "[....] Test case: $file" + + temp_file=$(mktemp) + ignore="$(bash $file --quiet 2>&1 > $temp_file)" + exitcode="$?" + + echo -en "\033[1G\033[K" + if [[ "$exitcode" == 0 ]]; then + echo "[SENT] Test case: $file" + else + echo "[FAIL] Test case: $file" + echo "" + echo "================ FAIL ==================" + cat "$temp_file" + echo "============== END FAIL =================" + echo "" + fi + rm "$temp_file" +done + +# ignore="$(bash tests/pass/simple/test.sh 2>&1 > output.txt)" + +# echo $? +# echo $output +