Skip to content

Conversation

@zahiar
Copy link
Contributor

@zahiar zahiar commented Nov 15, 2021

When you add a deploy key that contains a comment, the Bitbucket API splits out the comment and returns it in a separate comment field in the API.

For example,
key = "ssh-rsa AAAA...=== my@comment.example"

API response

key = "ssh-rsa AAAA...==="
comment = "my@comment.example"

When you add a deploy key that contains a comment, the Bitbucket API splits out the comment and returns it in a separate `comment` field in the API.

For example,
`key = "ssh-rsa AAAA...=== my@comment.example"`

API response
```
key = "ssh-rsa AAAA...==="
comment = "my@comment.example"
```
@zahiar
Copy link
Contributor Author

zahiar commented Nov 15, 2021

Tests pass 🎉

go test -v ./tests/deploykeys_test.go
=== RUN   TestDeployKey
=== RUN   TestDeployKey/create
=== RUN   TestDeployKey/get
=== RUN   TestDeployKey/delete
--- PASS: TestDeployKey (6.68s)
    --- PASS: TestDeployKey/create (3.50s)
    --- PASS: TestDeployKey/get (2.49s)
    --- PASS: TestDeployKey/delete (0.69s)
=== RUN   TestDeployKeyWithComment
=== RUN   TestDeployKeyWithComment/create
=== RUN   TestDeployKeyWithComment/get
=== RUN   TestDeployKeyWithComment/delete
--- PASS: TestDeployKeyWithComment (4.39s)
    --- PASS: TestDeployKeyWithComment/create (2.19s)
    --- PASS: TestDeployKeyWithComment/get (1.96s)
    --- PASS: TestDeployKeyWithComment/delete (0.23s)
PASS
ok      command-line-arguments  13.449s

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.

LGTM!

@ktrysmt ktrysmt merged commit 3feff68 into ktrysmt:master Nov 17, 2021
@zahiar zahiar deleted the add-comment-field-deploy-key branch November 17, 2021 21:11
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.

2 participants