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

Added XML URL in Reports endpoint #66

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

Progi1984
Copy link
Member

Questions Answers
Description? Added XML URL in Reports endpoint
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket? N/A
How to test? N/A

@@ -944,13 +949,28 @@ private function getDataFromGCP(string $gcp_url): array
$xml = new \SimpleXMLElement($GCPCallResult);
foreach ($xml->Contents as $content) {
$build_name = (string) $content->Key;
if (strpos($build_name, '.xml') !== false) {
//get version and date
preg_match('/([0-9]{4}-[0-9]{2}-[0-9]{2})-([A-z0-9\.]*)-prestashop_(.*)\.xml/', $build_name, $matches_filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same as below, you can refactor the code :)

Copy link
Contributor

@PierreRambaud PierreRambaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate code, can be refactored :)

@Progi1984
Copy link
Member Author

@PierreRambaud Fixed.

@Progi1984 Progi1984 merged commit b0a89c5 into PrestaShop:develop Mar 15, 2022
@Progi1984 Progi1984 deleted the xmlInReports branch March 15, 2022 13:07
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.

3 participants