(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestGetVCSUserSkipsGitHubBot(t *testing.T) { |
| 33 | eventPath := filepath.Join(t.TempDir(), "event.json") |
| 34 | require.NoError(t, os.WriteFile(eventPath, []byte(`{"pull_request":{"user":{"id":41898282,"login":"github-actions[bot]","type":"Bot"}}}`), 0600)) |
| 35 | t.Setenv("GITHUB_EVENT_NAME", "pull_request") |
| 36 | t.Setenv("GITHUB_EVENT_PATH", eventPath) |
| 37 | |
| 38 | require.Nil(t, getVCSUser(world.GitHub)) |
| 39 | } |
| 40 | |
| 41 | func TestGetVCSUserFromGitHubPullRequestTarget(t *testing.T) { |
| 42 | eventPath := filepath.Join(t.TempDir(), "event.json") |
nothing calls this directly
no test coverage detected