Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/github/github_contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ func TestGitHubContract_RealGitHub(t *testing.T) {
func TestGitHubContract_Fake_PRByNumber(t *testing.T) {
knownPRNumber := testHelpers.GithubPRNumber()
pr := &types.PREvidence{
URL: "https://github.com/kosli-dev/cli/pull/6",
URL: "https://github.com/kosli-dev/cli/pull/829",
State: "MERGED",
MergeCommit: "e21a8afff429e0c87ee523d683f2438113f0a105",
MergeCommit: "475dd3d1fe69f0d64057defeb0504aad2e132e9d",
}
client := &FakeGitHubClient{
PRsByNumber: map[int]*types.PREvidence{
Expand Down
13 changes: 7 additions & 6 deletions internal/testHelpers/testHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,19 @@ func SkipIfEnvVarSet(T *testing.T, requiredEnvVars []string) {
}
}

// Originally we had commit 73d7fee2f31ade8e1a9c456c324255212c30c2a6
// This worked for a while, but now the PR is no longer found by the github api
// for reasons we cannot fathom
// We are now using an even older commit, which currently works.
// The GitHub API intermittently stops returning PR associations for older commits
// for reasons we cannot fathom. When that happens, update to a more recent commit.
Comment on lines +40 to +41
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

// Previous values:
// - 73d7fee2f31ade8e1a9c456c324255212c30c2a6 (PR #6) — stopped working
// - e21a8afff429e0c87ee523d683f2438113f0a105 (PR #6) — stopped working
func GithubCommitWithPR() string {
return "e21a8afff429e0c87ee523d683f2438113f0a105"
return "475dd3d1fe69f0d64057defeb0504aad2e132e9d"
}

// GithubPRNumber returns the PR number associated with GithubCommitWithPR in
// kosli-dev/cli. It is stable because merged PRs are never deleted.
func GithubPRNumber() int {
return 6
return 829
}

func CloneGitRepo(url, cloneTo string) (*git.Repository, error) {
Expand Down
Loading