Skip to content

Conversation

@zahiar
Copy link
Contributor

@zahiar zahiar commented Sep 12, 2021

The IsPrivate was incorrectly named, it should be Is_private to match the name returned by the API. This lead to this value always remaining false, as the decoder was unable to match the is_private key from the API response with IsPrivate in the Project struct.

Fixes #157

Test Output

$ BITBUCKET_TEST_USERNAME=? BITBUCKET_TEST_PASSWORD=? BITBUCKET_TEST_OWNER=? go test -v ./tests/project_test.go
=== RUN   TestProjectCreate_isPrivateTrue
--- PASS: TestProjectCreate_isPrivateTrue (1.56s)
=== RUN   TestProjectCreate_isPrivateFalse
--- PASS: TestProjectCreate_isPrivateFalse (0.92s)
PASS
ok      command-line-arguments  2.946s

The `IsPrivate` was incorrectly named, it should be `Is_private` to match the name returned by the API. This lead to this value always remaining `false`, as the decoder was unable to match the `is_private` key from the API response with `IsPrivate` in the `Project` struct.
Copy link
Owner

@ktrysmt ktrysmt left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@ktrysmt ktrysmt merged commit 21b30d1 into ktrysmt:master Sep 14, 2021
@zahiar zahiar deleted the fix-project-is-private branch September 14, 2021 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boolean values are not decoded correctly on Project calls

2 participants