Problem/Motivation

Currently the Bitbucket deployment dates are not formatted. To be consistent with the other modules they should be formatted in the long core date date format.

In the same code there's also a small bug that triggers a PHP notice if a pipeline hasn't been completed yet:

Notice: Undefined index: completed_on in /var/www/web/modules/contrib/build_hooks/modules/build_hooks_bitbucket/src/Plugin/FrontendEnvironment/BitbucketFrontendEnvironment.php on line 242

Steps to reproduce

* Set up a Bitbucket frontend environment
* Go to the environment
* Launch a new deployment
* The dates are not formatted and a PHP notice is triggered.

A patch will follow

Comments

klaasvw created an issue. See original summary.

klaasvw’s picture

Status: Active » Needs review
StatusFileSize
new5.27 KB

The following patch introduces the following changes in the Bitbucket module:

* Formats the started at and completed at dates in the long core date format.
* Fixes the PHP notice triggered when a pipeline build has no completed_at date
* Fixes some coding standard issues

Status: Needs review » Needs work
klaasvw’s picture

Status: Needs work » Needs review
StatusFileSize
new5.83 KB

Oops, forgot to update the services.yml.

Status: Needs review » Needs work
larowlan’s picture

Looks like the unit test needs updating too, to pass in the extra argument to the constructor

Thanks for contributing

klaasvw’s picture

Status: Needs work » Needs review
StatusFileSize
new6.63 KB

Silly me, this time with an updated unit test.

  • larowlan committed c2164da on 3.x authored by klaasvw
    Issue #3212638 by klaasvw: Show formatted dates in Bitbucket deployments...
larowlan’s picture

Status: Needs review » Fixed

Thanks this will go out as 3.1.4 shortly

larowlan’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.