Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bitbucket GetCommitStatus date parsing #79

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

omerzi
Copy link
Member

@omerzi omerzi commented Apr 19, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • I used go fmt ./... for formatting the code before submitting the pull request.
  • This feature is included on all supported VCS providers - GitHub, Bitbucket cloud, Bitbucket server, and GitLab.

Parsing createdOn and updatedOn values of a commit status failed due to a wrong response parsing.
The Bitbucket server scheme is as follows:

{
    "size": 1,
    "limit": 25,
    "isLastPage": true,
    "values": [
        {
            "state": "SUCCESSFUL",
            "key": "REPO-MASTER",
            "name": "REPO-MASTER-42",
            "url": "https://bamboo.example.com/browse/REPO-MASTER-42",
            "description": "Changes by John Doe",
            "dateAdded": 1442835514204
        }
    ],
    "start": 0
}

The Bitbucket Cloud is as follows:

...
"created_on": "<string>",
"updated_on": "<string>"

In the case of Bitbucket Server, we'll parse the dateAdded field, on Bitbucket Cloud we'll parse the created_on and updated_on fields.

@omerzi omerzi added the bug Something isn't working label Apr 19, 2023
@omerzi omerzi force-pushed the fix-commit-status-time-parsing branch from 2b57f13 to 371efc7 Compare April 19, 2023 11:18
@omerzi omerzi temporarily deployed to frogbot April 19, 2023 11:18 — with GitHub Actions Inactive
@omerzi omerzi requested a review from eyalbe4 April 19, 2023 11:21
@github-actions
Copy link
Contributor

What is Frogbot?

@omerzi omerzi merged commit 15565f8 into jfrog:master Apr 19, 2023
@omerzi omerzi deleted the fix-commit-status-time-parsing branch April 19, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants