diff --git a/Source/MantisSourceBase.class.php b/Source/MantisSourceBase.class.php index 5dfc36209..98331db58 100644 --- a/Source/MantisSourceBase.class.php +++ b/Source/MantisSourceBase.class.php @@ -19,12 +19,12 @@ abstract class MantisSourceBase extends MantisPlugin * a change in the minimum required MantisBT version: 0=1.2; 1=1.3, 2=2.x. * The framework version is incremented when the plugin's core files change. */ - const FRAMEWORK_VERSION = '2.8.0'; + const FRAMEWORK_VERSION = '2.9.1'; /** * Minimum required MantisBT version. * Used to define the default MantisCore dependency for all child plugins; * VCS plugins may override this based on their individual requirements. */ - const MANTIS_VERSION = '2.26.0'; + const MANTIS_VERSION = '2.26.4'; } diff --git a/Source/Source.API.php b/Source/Source.API.php index 9b8ba6ed1..c50ccdafe 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -954,7 +954,10 @@ function save() { # Commit timestamp: can't use DATE_ATOM format to insert datetime, # as MySQL < 8.0.19 does not support specifying timezone # @see https://dev.mysql.com/doc/refman/8.0/en/datetime.html - $t_timestamp = $this->timestamp->format( 'Y-m-d H:i:s' ); + # so we convert the timestamp to UTC first. + $t_timestamp = $this->timestamp + ->setTimezone( new DateTimeZone( 'UTC' ) ) + ->format( 'Y-m-d H:i:s' ); if ( 0 == $this->id ) { # create $t_query = "INSERT INTO $t_changeset_table ( repo_id, revision, parent, branch, user_id, diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php index 69e70f93b..91a5cc0a5 100644 --- a/SourceGitweb/SourceGitweb.php +++ b/SourceGitweb/SourceGitweb.php @@ -11,7 +11,7 @@ class SourceGitwebPlugin extends MantisSourceGitBasePlugin { - const PLUGIN_VERSION = '2.1.1'; + const PLUGIN_VERSION = '2.1.2'; const FRAMEWORK_VERSION_REQUIRED = '2.5.0'; public $type = 'gitweb'; @@ -355,7 +355,7 @@ private function commit_changeset( $p_repo, $p_input, $p_branch='' ) { $t_commit['message'] = trim( str_replace( '
', PHP_EOL, $t_matches[6] ) ); $t_parents = array(); - if ( preg_match_all( '#parent<[^>]*h=([0-9a-f]*)#', $t_gitweb_data, $t_matches ) ) { + if ( preg_match_all( '#parent<[^>]*(?:h=|/commit/)([0-9a-f]*)#', $t_gitweb_data, $t_matches ) ) { foreach( $t_matches[1] as $t_match ) { $t_parents[] = $t_commit['parent'] = $t_match; } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 84977b6d3..82a89b21d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,32 @@ specification. # Releases for MantisBT 2.x +## 2.9.1 - 2025-01-26 + +### Fixed + +- Commits time is displayed in the wrong timezone + [#419](https://github.com/mantisbt-plugins/source-integration/issues/419) + + +## 2.9.0 - 2025-01-17 + +### Changed + +- Minimum MantisBT version increased to 2.26.4 + [#266](https://github.com/mantisbt-plugins/source-integration/issues/266) + [#380](https://github.com/mantisbt-plugins/source-integration/issues/380) + +### Fixed + +- checkin.php returning HTTP 200 when errors occur + [#266](https://github.com/mantisbt-plugins/source-integration/issues/266) +- github: API token causes webhook to fail silently + [#380](https://github.com/mantisbt-plugins/source-integration/issues/380) +- gitweb: find parent commits with pathinfo URLs + [#418](https://github.com/mantisbt-plugins/source-integration/issues/418) + + ## [2.8.0] - 2024-09-06 ### Added @@ -689,8 +715,10 @@ Support for the 0.x branch ended on 2017-06-30. ## [0.9] - 2008-04-11 -[Unreleased]: https://github.com/mantisbt-plugins/source-integration/compare/v2.8.0...HEAD +[Unreleased]: https://github.com/mantisbt-plugins/source-integration/compare/v2.9.1...HEAD +[2.9.1]: https://github.com/mantisbt-plugins/source-integration/compare/v2.9.0...v2.9.1 +[2.9.0]: https://github.com/mantisbt-plugins/source-integration/compare/v2.8.0...v2.9.0 [2.8.0]: https://github.com/mantisbt-plugins/source-integration/compare/v2.7.0...v2.8.0 [2.7.0]: https://github.com/mantisbt-plugins/source-integration/compare/v2.6.0...v2.7.0 [2.6.0]: https://github.com/mantisbt-plugins/source-integration/compare/v2.5.2...v2.6.0