JakubHelis opened a new pull request, #8765:
URL: https://github.com/apache/incubator-devlake/pull/8765
Bitbucket Cloud returns timestamps with 6-digit fractional seconds (e.g.
2025-09-15T08:53:36.337932+00:00). The PR extractor used time.Time directly for
created_on/updated_on fields, causing a time.ParseError since Go's
json.Unmarshal uses RFC3339 which does not accept microseconds.
Fix:
- Change BitbucketCreatedAt/BitbucketUpdatedAt in BitbucketApiPullRequest
struct from time.Time to *common.Iso8601Time
- Add microsecond format (6-digit fractional seconds) to DateTimeFormats in
Iso8601Time, before the existing 3-digit format, so that ConvertStringToTime
correctly parses these timestamps
Fixes #8708
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
### ⚠️ Pre Checklist
> Please complete _ALL_ items in this checklist, and remove before submitting
- [ x ] I have read through the [Contributing
Documentation](https://devlake.apache.org/community/).
- [x ] I have added relevant tests.
- [ x] I have added relevant documentation.
- [ x] I will add labels to the PR, such as `pr-type/bug-fix`,
`pr-type/feature-development`, etc.
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes.
Please fill out as many sections below as possible.
-->
### Summary
What does this PR do?
Bitbucket Cloud returns timestamps with 6-digit microsecond precision
(e.g. `2025-09-15T08:53:36.337932+00:00`). The PR extractor stored
`created_on` and `updated_on` directly as `time.Time`, which caused a
`time.ParseError` during extraction because Go's `json.Unmarshal` uses
RFC3339 — a format that does not accept microseconds.
### Does this close any open issues?
Closes #8708
### Screenshots
-
### Other Information
Developed with the assistance of an AI coding agent. While I am not
proficient in Go, I have a general software engineering background and
verified that the fix is minimal, targeted, and does not introduce regressions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]