From 13a280d456973d40919da986fabaab598e346aaa Mon Sep 17 00:00:00 2001 From: Martin Fobian Date: Mon, 23 Sep 2024 16:19:41 +0200 Subject: [PATCH 01/18] Add methods for DataExports endpoints --- src/Client.php | 6 +++ src/Endpoints/DataExports.php | 89 +++++++++++++++++++++++++++++++++++ src/Entities/DataExport.php | 68 ++++++++++++++++++++++++++ src/Response.php | 2 + 4 files changed, 165 insertions(+) create mode 100644 src/Endpoints/DataExports.php create mode 100644 src/Entities/DataExport.php diff --git a/src/Client.php b/src/Client.php index 5176acb3..4eeb197c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -70,6 +70,11 @@ class Client * @var Endpoints\Insurance */ public $insurance; + + /** + * @var Endpoints\DataExports + */ + public $dataExports; /*************************/ /** @@ -150,6 +155,7 @@ private function initEndpoints() $this->shareOfCheckout = new Endpoints\ShareOfCheckout($this->context); $this->webhooks = new Endpoints\Webhooks($this->context); $this->insurance = new Endpoints\Insurance($this->context); + $this->dataExports = new Endpoints\DataExports($this->context); } private function initUserAgent() diff --git a/src/Endpoints/DataExports.php b/src/Endpoints/DataExports.php new file mode 100644 index 00000000..646983b0 --- /dev/null +++ b/src/Endpoints/DataExports.php @@ -0,0 +1,89 @@ + + * @copyright Copyright (c) 2018 Alma / Nabla SAS + * @license https://opensource.org/licenses/MIT The MIT License + * + */ + +namespace Alma\API\Endpoints; + +use Alma\API\Entities\DataExport; +use Alma\API\ParamsError; +use Alma\API\RequestError; + +class DataExports extends Base +{ + const DATA_EXPORTS_PATH = '/v1/data-exports'; + + /** + * @param $data + * @return DataExport + * @throws ParamsError + * @throws RequestError + */ + public function create($data) + { + $res = $this->request(self::DATA_EXPORTS_PATH)->setRequestBody($data)->post(); + + if ($res->isError()) { + throw new RequestError($res->errorMessage, null, $res); + } + + return new DataExport($res->json); + } + + /** + * @param $data + * @return DataExport + * @throws ParamsError + * @throws RequestError + */ + public function fetch($reportId) + { + $res = $this->request(self::DATA_EXPORTS_PATH . '/' . $reportId)->get(); + + if ($res->isError()) { + throw new RequestError($res->errorMessage, null, $res); + } + + return new DataExport($res->json); + } + + /** + * @param $reportId + * @param $format + * + * @return mixed + * @throws RequestError + */ + public function download($reportId, $format) + { + $res = $this->request(self::DATA_EXPORTS_PATH . '/' . $reportId) + ->setQueryParams(['format' => $format]) + ->get(); + + if ($res->isError()) { + throw new RequestError($res->errorMessage, null, $res); + } + + return $res->data; + } +} diff --git a/src/Entities/DataExport.php b/src/Entities/DataExport.php new file mode 100644 index 00000000..d789a477 --- /dev/null +++ b/src/Entities/DataExport.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2018 Alma / Nabla SAS + * @license https://opensource.org/licenses/MIT The MIT License + */ + +namespace Alma\API\Entities; + +class DataExport extends Base +{ + public $complete; + + public $created; + + public $end; + + public $holder_id; + + public $id; + + public $include_child_accounts; + + public $merchant; + + public $receivable_export_type; + + public $start; + + public $type; + + public $updated; + + public $url_csv; + + public $url_pdf; + + public $url_xlsx; + + public $url_xml; + + public $url_zip; + + /** + * @param array $attributes + */ + public function __construct($attributes) + { + parent::__construct($attributes); + } +} diff --git a/src/Response.php b/src/Response.php index ca9a4f9b..2534ec88 100644 --- a/src/Response.php +++ b/src/Response.php @@ -29,12 +29,14 @@ class Response { public $responseCode; public $json; + public $data; public $errorMessage; public function __construct($curlHandle, $curlResult) { $this->responseCode = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE); $this->json = json_decode($curlResult, true); + $this->data = $curlResult; if ($this->isError()) { if ($this->json && array_key_exists('message', $this->json)) { From 8faeaf39c00feb7e7e2b2655199d6ccf0edf019c Mon Sep 17 00:00:00 2001 From: Carine Bonnafous Date: Thu, 30 Jan 2025 14:54:25 +0100 Subject: [PATCH 02/18] Remove ping to France in Slack release messages --- .github/workflows/release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index c1156d29..ede05dc2 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -110,7 +110,7 @@ jobs: ${{ steps.fetch-release-draft.outputs.body }} - cc <@france.berut> <@khadija.cherif> + cc <@khadija.cherif> - name: Send changelog to Slack uses: slackapi/slack-github-action@v2.0.0 From 1c3f3222fa490414507e838abf5e5bd8da56aa24 Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:32:35 +0100 Subject: [PATCH 03/18] feat: add doc block and unit tests for DataExports endpoint --- src/Endpoints/DataExports.php | 31 +++++++++++++++++++++---------- src/Entities/DataExport.php | 17 ++++++++++++++--- src/Response.php | 9 +++++++-- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/Endpoints/DataExports.php b/src/Endpoints/DataExports.php index 646983b0..6756b99f 100644 --- a/src/Endpoints/DataExports.php +++ b/src/Endpoints/DataExports.php @@ -26,42 +26,47 @@ namespace Alma\API\Endpoints; use Alma\API\Entities\DataExport; +use Alma\API\Exceptions\ParametersException; +use Alma\API\Exceptions\RequestException; use Alma\API\ParamsError; use Alma\API\RequestError; class DataExports extends Base { const DATA_EXPORTS_PATH = '/v1/data-exports'; + const ACCEPTED_FORMAT = ['csv', 'xlsx']; /** * @param $data + * * @return DataExport - * @throws ParamsError - * @throws RequestError + * + * @throws RequestException|RequestError */ public function create($data) { $res = $this->request(self::DATA_EXPORTS_PATH)->setRequestBody($data)->post(); if ($res->isError()) { - throw new RequestError($res->errorMessage, null, $res); + throw new RequestException($res->errorMessage, null, $res); } return new DataExport($res->json); } /** - * @param $data + * @param $reportId + * * @return DataExport - * @throws ParamsError - * @throws RequestError + * + * @throws RequestException|RequestError */ public function fetch($reportId) { $res = $this->request(self::DATA_EXPORTS_PATH . '/' . $reportId)->get(); if ($res->isError()) { - throw new RequestError($res->errorMessage, null, $res); + throw new RequestException($res->errorMessage, null, $res); } return new DataExport($res->json); @@ -69,19 +74,25 @@ public function fetch($reportId) /** * @param $reportId - * @param $format + * + * @param string $format only csv or xlsx * * @return mixed - * @throws RequestError + * + * @throws RequestException|RequestError|ParametersException */ public function download($reportId, $format) { + if (!in_array($format, self::ACCEPTED_FORMAT)) { + throw new ParametersException("Invalid format: $format. Accepted format are: " . implode(', ', self::ACCEPTED_FORMAT)); + } + $res = $this->request(self::DATA_EXPORTS_PATH . '/' . $reportId) ->setQueryParams(['format' => $format]) ->get(); if ($res->isError()) { - throw new RequestError($res->errorMessage, null, $res); + throw new RequestException($res->errorMessage, null, $res); } return $res->data; diff --git a/src/Entities/DataExport.php b/src/Entities/DataExport.php index d789a477..3cf90421 100644 --- a/src/Entities/DataExport.php +++ b/src/Entities/DataExport.php @@ -26,36 +26,47 @@ class DataExport extends Base { + /** @var bool */ public $complete; + /** @var int Timestamp */ public $created; + /** @var int Timestamp */ public $end; - public $holder_id; - + /** @var string */ public $id; + /** @var bool */ public $include_child_accounts; + /** @var string */ public $merchant; - public $receivable_export_type; + /** @var int Timestamp */ public $start; + /** @var string */ public $type; + /** @var string Timestamp */ public $updated; + /** @var string */ public $url_csv; + /** @var string */ public $url_pdf; + /** @var string */ public $url_xlsx; + /** @var string */ public $url_xml; + /** @var string */ public $url_zip; /** diff --git a/src/Response.php b/src/Response.php index 2534ec88..8c8990ae 100644 --- a/src/Response.php +++ b/src/Response.php @@ -35,8 +35,13 @@ class Response public function __construct($curlHandle, $curlResult) { $this->responseCode = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE); - $this->json = json_decode($curlResult, true); - $this->data = $curlResult; + + if ('application/json' === curl_getinfo($curlHandle, CURLINFO_CONTENT_TYPE)) { + $this->json = json_decode($curlResult, true); + } else { + $this->json = null; + $this->data = $curlResult; + } if ($this->isError()) { if ($this->json && array_key_exists('message', $this->json)) { From 37f351961cf9c4be3d83d37a334d6833dc23a317 Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:36:29 +0100 Subject: [PATCH 04/18] feat: add doc block and unit tests for DataExports endpoint --- .../Integration/Endpoints/DataExportsTest.php | 39 ++++ tests/Unit/Endpoints/DataExportsTest.php | 185 ++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 tests/Integration/Endpoints/DataExportsTest.php create mode 100644 tests/Unit/Endpoints/DataExportsTest.php diff --git a/tests/Integration/Endpoints/DataExportsTest.php b/tests/Integration/Endpoints/DataExportsTest.php new file mode 100644 index 00000000..aec0d1af --- /dev/null +++ b/tests/Integration/Endpoints/DataExportsTest.php @@ -0,0 +1,39 @@ + "payments", + "include_child_accounts" => false + ]; + $dataExport = DataExportsTest::$almaClient->dataExports->create($data); + $this->assertNotNull($dataExport->id); + + for ($i = 0; $i < 5; $i++) { + $fetchedExport = DataExportsTest::$almaClient->dataExports->fetch($dataExport->id); + if ($fetchedExport->complete) { + break; + } + sleep(2); + } + $this->assertEquals($dataExport->id, $fetchedExport->id); + + $downloadedCsvExport = DataExportsTest::$almaClient->dataExports->download($dataExport->id, 'csv'); + $this->assertNotNull($downloadedCsvExport); + } + +} \ No newline at end of file diff --git a/tests/Unit/Endpoints/DataExportsTest.php b/tests/Unit/Endpoints/DataExportsTest.php new file mode 100644 index 00000000..d0d92d8c --- /dev/null +++ b/tests/Unit/Endpoints/DataExportsTest.php @@ -0,0 +1,185 @@ +clientContext = Mockery::mock(ClientContext::class); + $this->dataExportsEndpoint = Mockery::mock(DataExports::class)->makePartial(); + $loggerMock = Mockery::mock(LoggerInterface::class); + $loggerMock->shouldReceive('error'); + $this->requestObject = Mockery::mock(Request::class); + $this->responseMock = Mockery::mock(Response::class); + $this->clientContext->logger = $loggerMock; + $this->dataExportsEndpoint->setClientContext($this->clientContext); + } + + public function tearDown(): void + { + $this->dataExportsEndpoint = null; + $this->responseMock = null; + $this->requestObject = null; + $this->clientContext = null; + Mockery::close(); + } + + /** + * @throws RequestError + * @throws RequestException + */ + public function testCreateDataExportPostThrowRequestException() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('setRequestBody') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('post') + ->once() + ->andThrow(new RequestException('Request error', null, null)); + + $this->expectException(RequestException::class); + $this->dataExportsEndpoint->create(['type' => 'payments', 'include_child_accounts' => false]); + } + + /** + * @throws RequestError + * @throws RequestException + */ + public function testFetchDataExportGetThrowRequestException() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports/123') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('get') + ->once() + ->andThrow(new RequestException('Request error', null, null)); + + $this->expectException(RequestException::class); + $this->dataExportsEndpoint->fetch(123); + } + + /** + * @throws RequestException|ParametersException|RequestError + */ + public function testDownloadDataExportGetThrowRequestException() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports/123') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('setQueryParams') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('get') + ->once() + ->andThrow(new RequestException('Request error', null, null)); + + $this->expectException(RequestException::class); + $this->dataExportsEndpoint->download(123, 'csv'); + } + + /** + * @throws RequestException|ParametersException|RequestError + */ + public function testDownloadDataExportInvalidFormat() + { + $this->expectException(ParametersException::class); + $this->dataExportsEndpoint->download(123, 'pdf'); + } + + /** + * @throws RequestException|RequestError + */ + public function testCreateSuccess() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('setRequestBody') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('post') + ->once() + ->andReturn($this->responseMock); + + $this->responseMock->shouldReceive('isError')->andReturn(false); + $this->responseMock->json = ['id' => '12345', 'status' => 'completed']; + + $result = $this->dataExportsEndpoint->create(['type' => 'report']); + + $this->assertInstanceOf(DataExport::class, $result); + $this->assertEquals('12345', $result->id); + $this->assertEquals('completed', $result->status); + } + + /** + * @throws RequestException|RequestError + */ + public function testFetchSuccess() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports/12345') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('get') + ->once() + ->andReturn($this->responseMock); + + $this->responseMock->shouldReceive('isError')->andReturn(false); + $this->responseMock->json = ['id' => '12345', 'status' => 'completed']; + + $result = $this->dataExportsEndpoint->fetch('12345'); + + $this->assertInstanceOf(DataExport::class, $result); + $this->assertEquals('12345', $result->id); + $this->assertEquals('completed', $result->status); + } + + /** + * @throws RequestException|ParametersException|RequestError + */ + public function testDownloadSuccess() + { + $this->dataExportsEndpoint->shouldReceive('request') + ->with('/v1/data-exports/12345') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('setQueryParams') + ->once() + ->andReturn($this->requestObject); + $this->requestObject->shouldReceive('get') + ->once() + ->andReturn($this->responseMock); + + $this->responseMock->shouldReceive('isError')->andReturn(false); + $this->responseMock->data = 'file_content'; + + $result = $this->dataExportsEndpoint->download('12345', 'csv'); + + $this->assertEquals('file_content', $result); + } +} \ No newline at end of file From cb9ec884510127034f46af216620b3631dc8422f Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:12:30 +0100 Subject: [PATCH 05/18] fix: add newline at end of file where it's missing --- tests/Integration/Endpoints/DataExportsTest.php | 2 +- tests/Unit/Endpoints/DataExportsTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Integration/Endpoints/DataExportsTest.php b/tests/Integration/Endpoints/DataExportsTest.php index aec0d1af..b5f891b6 100644 --- a/tests/Integration/Endpoints/DataExportsTest.php +++ b/tests/Integration/Endpoints/DataExportsTest.php @@ -36,4 +36,4 @@ public function testCanFetchDataExport() $this->assertNotNull($downloadedCsvExport); } -} \ No newline at end of file +} diff --git a/tests/Unit/Endpoints/DataExportsTest.php b/tests/Unit/Endpoints/DataExportsTest.php index d0d92d8c..de200ab8 100644 --- a/tests/Unit/Endpoints/DataExportsTest.php +++ b/tests/Unit/Endpoints/DataExportsTest.php @@ -182,4 +182,4 @@ public function testDownloadSuccess() $this->assertEquals('file_content', $result); } -} \ No newline at end of file +} From 8d92bc3a16769e1d23b47e46372d085c6917a7e5 Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:50:11 +0100 Subject: [PATCH 06/18] fix: rename data to responseFile --- src/Endpoints/DataExports.php | 2 +- src/Response.php | 4 ++-- tests/Unit/Endpoints/DataExportsTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Endpoints/DataExports.php b/src/Endpoints/DataExports.php index 6756b99f..99c6a166 100644 --- a/src/Endpoints/DataExports.php +++ b/src/Endpoints/DataExports.php @@ -95,6 +95,6 @@ public function download($reportId, $format) throw new RequestException($res->errorMessage, null, $res); } - return $res->data; + return $res->responseFile; } } diff --git a/src/Response.php b/src/Response.php index 8c8990ae..c62728da 100644 --- a/src/Response.php +++ b/src/Response.php @@ -29,7 +29,7 @@ class Response { public $responseCode; public $json; - public $data; + public $responseFile; public $errorMessage; public function __construct($curlHandle, $curlResult) @@ -40,7 +40,7 @@ public function __construct($curlHandle, $curlResult) $this->json = json_decode($curlResult, true); } else { $this->json = null; - $this->data = $curlResult; + $this->responseFile = $curlResult; } if ($this->isError()) { diff --git a/tests/Unit/Endpoints/DataExportsTest.php b/tests/Unit/Endpoints/DataExportsTest.php index de200ab8..eb689dc7 100644 --- a/tests/Unit/Endpoints/DataExportsTest.php +++ b/tests/Unit/Endpoints/DataExportsTest.php @@ -176,7 +176,7 @@ public function testDownloadSuccess() ->andReturn($this->responseMock); $this->responseMock->shouldReceive('isError')->andReturn(false); - $this->responseMock->data = 'file_content'; + $this->responseMock->responseFile = 'file_content'; $result = $this->dataExportsEndpoint->download('12345', 'csv'); From bc7b290a0616186c8644a1b2c70b404685f494cc Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 17:21:03 +0100 Subject: [PATCH 07/18] chore(deps): pin dependencies (#167) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/aqua.yml | 6 +++--- .github/workflows/backport-pull-request.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/hotfix-pull-request.yml | 10 +++++----- .github/workflows/pr-labeler.yml | 2 +- .github/workflows/release-publish.yml | 8 ++++---- .github/workflows/release-pull-request.yml | 10 +++++----- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 7b4b1520..2f1fddb9 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -17,20 +17,20 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: show-progress: false - name: Authenticate to Google Cloud id: gcloud-auth - uses: google-github-actions/auth@v2 + uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2 with: token_format: access_token workload_identity_provider: projects/699052769907/locations/global/workloadIdentityPools/github-identity-pool-shared/providers/github-identity-provider-shared # yamllint disable-line service_account: github-gar-alma-php-client@lyrical-carver-335213.iam.gserviceaccount.com - name: Authenticate to Artifact Registry - uses: docker/login-action@v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 with: registry: europe-docker.pkg.dev username: oauth2accesstoken diff --git a/.github/workflows/backport-pull-request.yml b/.github/workflows/backport-pull-request.yml index da739105..f7ee8817 100644 --- a/.github/workflows/backport-pull-request.yml +++ b/.github/workflows/backport-pull-request.yml @@ -17,7 +17,7 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: develop @@ -28,7 +28,7 @@ jobs: git reset --hard main - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 with: commit-message: 'chore: backport main to develop' title: Backport main to develop diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 864c15f0..2f1649ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,12 +33,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2 with: php-version: ${{ matrix.php }} tools: composer:v2 diff --git a/.github/workflows/hotfix-pull-request.yml b/.github/workflows/hotfix-pull-request.yml index 9325fc77..cc64ee3f 100644 --- a/.github/workflows/hotfix-pull-request.yml +++ b/.github/workflows/hotfix-pull-request.yml @@ -15,18 +15,18 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: main - name: Release drafter - uses: release-drafter/release-drafter@v6 + uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6 id: release-drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update release draft - uses: actions/github-script@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 with: script: | const { owner, repo } = context.repo; @@ -39,7 +39,7 @@ jobs: }); - name: Update CHANGELOG.md file - uses: stefanzweifel/changelog-updater-action@v1 + uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1 with: latest-version: ${{ steps.release-drafter.outputs.tag_name }} release-notes: "### 🐛 Bug Fixes\n ${{ inputs.changelog-message }}\n" @@ -49,7 +49,7 @@ jobs: ./scripts/update-files-with-release-version.sh ${{ steps.release-drafter.outputs.tag_name }} - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 with: commit-message: 'chore: update version' title: Release ${{ steps.release-drafter.outputs.tag_name }} diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index d3f2d9ee..9d22a6cc 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -11,6 +11,6 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: TimonVS/pr-labeler-action@v5 + - uses: TimonVS/pr-labeler-action@f9c084306ce8b3f488a8f3ee1ccedc6da131d1af # v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index ede05dc2..8fa04249 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -15,7 +15,7 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Install taskfile.dev uses: arduino/setup-task@v2 @@ -85,7 +85,7 @@ jobs: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.fetch-release-draft.outputs.id }}/assets?name=alma-php-client.zip - name: Publish Github release - uses: actions/github-script@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 with: # target_commitish is set to refs/heads/develop by release-drafter as we need to retrieve pull requests merged into develop # We need to override it to refs/heads/main to point to the last commit of main branch instead of develop branch @@ -102,7 +102,7 @@ jobs: }); - name: Format release notes for Slack - uses: LoveToKnow/slackify-markdown-action@v1.1.1 + uses: LoveToKnow/slackify-markdown-action@698a1d4d0ff1794152a93c03ee8ca5e03a310d4e # v1.1.1 id: slack-markdown-release-notes with: text: | @@ -113,7 +113,7 @@ jobs: cc <@khadija.cherif> - name: Send changelog to Slack - uses: slackapi/slack-github-action@v2.0.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: method: chat.postMessage token: ${{ secrets.SLACK_RELEASE_CHANGELOG_BOT_TOKEN }} diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 76f6e592..9740f2a1 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -10,7 +10,7 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: main persist-credentials: false @@ -24,7 +24,7 @@ jobs: git reset --hard develop - name: Create release draft - uses: release-drafter/release-drafter@v6 + uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6 id: release-drafter with: # release-drafter should be based on develop to get the correct content as pull requests are merged into develop @@ -35,7 +35,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update CHANGELOG.md - uses: stefanzweifel/changelog-updater-action@v1 + uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1 with: latest-version: ${{ steps.release-drafter.outputs.tag_name }} release-notes: ${{ steps.release-drafter.outputs.body }} @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} @@ -55,7 +55,7 @@ jobs: repositories: alma-php-client - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 with: token: ${{ steps.github-token.outputs.token }} commit-message: 'chore: update version' From 6610e526f5829ce0b3848462be562ac780bf7a96 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 11:22:13 +0100 Subject: [PATCH 08/18] chore(deps): update github actions (#168) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/aqua.yml | 6 +++--- .github/workflows/backport-pull-request.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/hotfix-pull-request.yml | 10 +++++----- .github/workflows/release-publish.yml | 4 ++-- .github/workflows/release-pull-request.yml | 10 +++++----- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 2f1fddb9..b8d5fb00 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -17,20 +17,20 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: false - name: Authenticate to Google Cloud id: gcloud-auth - uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2 + uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8 with: token_format: access_token workload_identity_provider: projects/699052769907/locations/global/workloadIdentityPools/github-identity-pool-shared/providers/github-identity-provider-shared # yamllint disable-line service_account: github-gar-alma-php-client@lyrical-carver-335213.iam.gserviceaccount.com - name: Authenticate to Artifact Registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: europe-docker.pkg.dev username: oauth2accesstoken diff --git a/.github/workflows/backport-pull-request.yml b/.github/workflows/backport-pull-request.yml index f7ee8817..01e05225 100644 --- a/.github/workflows/backport-pull-request.yml +++ b/.github/workflows/backport-pull-request.yml @@ -17,7 +17,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: develop @@ -28,7 +28,7 @@ jobs: git reset --hard main - name: Create Pull Request - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: commit-message: 'chore: backport main to develop' title: Backport main to develop diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f1649ed..fabb7572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,12 +33,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2 + uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # 2.32.0 with: php-version: ${{ matrix.php }} tools: composer:v2 diff --git a/.github/workflows/hotfix-pull-request.yml b/.github/workflows/hotfix-pull-request.yml index cc64ee3f..a0947cc2 100644 --- a/.github/workflows/hotfix-pull-request.yml +++ b/.github/workflows/hotfix-pull-request.yml @@ -15,18 +15,18 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: main - name: Release drafter - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6 + uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0 id: release-drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update release draft - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | const { owner, repo } = context.repo; @@ -39,7 +39,7 @@ jobs: }); - name: Update CHANGELOG.md file - uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1 + uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0 with: latest-version: ${{ steps.release-drafter.outputs.tag_name }} release-notes: "### 🐛 Bug Fixes\n ${{ inputs.changelog-message }}\n" @@ -49,7 +49,7 @@ jobs: ./scripts/update-files-with-release-version.sh ${{ steps.release-drafter.outputs.tag_name }} - name: Create Pull Request - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: commit-message: 'chore: update version' title: Release ${{ steps.release-drafter.outputs.tag_name }} diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8fa04249..554cc2da 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -15,7 +15,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Install taskfile.dev uses: arduino/setup-task@v2 @@ -85,7 +85,7 @@ jobs: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.fetch-release-draft.outputs.id }}/assets?name=alma-php-client.zip - name: Publish Github release - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: # target_commitish is set to refs/heads/develop by release-drafter as we need to retrieve pull requests merged into develop # We need to override it to refs/heads/main to point to the last commit of main branch instead of develop branch diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 9740f2a1..5f25383c 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -10,7 +10,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: main persist-credentials: false @@ -24,7 +24,7 @@ jobs: git reset --hard develop - name: Create release draft - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6 + uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0 id: release-drafter with: # release-drafter should be based on develop to get the correct content as pull requests are merged into develop @@ -35,7 +35,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update CHANGELOG.md - uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1 + uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0 with: latest-version: ${{ steps.release-drafter.outputs.tag_name }} release-notes: ${{ steps.release-drafter.outputs.body }} @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1 + uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} @@ -55,7 +55,7 @@ jobs: repositories: alma-php-client - name: Create Pull Request - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ steps.github-token.outputs.token }} commit-message: 'chore: update version' From db08182d746b7761d4b41787694f72b4fbe55278 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:15:27 +0000 Subject: [PATCH 09/18] chore(deps): update actions/create-github-app-token action to v1.12.0 --- .github/workflows/release-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 5f25383c..e220ba3f 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7 + uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} From 636f9a0817b045f6745728f5ba3e2b89adb65513 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:15:34 +0000 Subject: [PATCH 10/18] chore(deps): update actions/create-github-app-token action to v2 --- .github/workflows/release-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 5f25383c..b1a95ea4 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7 + uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} From d49b917427f6e8d599037f20e1a157d2be0cf587 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 10:15:13 +0000 Subject: [PATCH 11/18] chore(deps): update shivammathur/setup-php action to v2.33.0 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fabb7572..25314351 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # 2.32.0 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # 2.33.0 with: php-version: ${{ matrix.php }} tools: composer:v2 From f6e8e960c4cc546347bbabd8019fe937355c5659 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 08:07:35 +0000 Subject: [PATCH 12/18] chore(deps): update google-github-actions/auth action to v2.1.10 (#175) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/aqua.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index b8d5fb00..fa1d32d0 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -23,7 +23,7 @@ jobs: - name: Authenticate to Google Cloud id: gcloud-auth - uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8 + uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10 with: token_format: access_token workload_identity_provider: projects/699052769907/locations/global/workloadIdentityPools/github-identity-pool-shared/providers/github-identity-provider-shared # yamllint disable-line From c65adc3f028e727e90ef382e59bc44d3e0f07f4d Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 08:48:36 +0200 Subject: [PATCH 13/18] chore(deps): update actions/create-github-app-token action to v2.0.6 (#176) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/release-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index b1a95ea4..ec40d2a3 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2 + uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} From f2973a20f832c3de507d7f5993124007022e855c Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 11:44:29 +0200 Subject: [PATCH 14/18] chore(deps): update slackapi/slack-github-action action to v2.1.0 (#178) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 554cc2da..55f782d8 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -113,7 +113,7 @@ jobs: cc <@khadija.cherif> - name: Send changelog to Slack - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 + uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 with: method: chat.postMessage token: ${{ secrets.SLACK_RELEASE_CHANGELOG_BOT_TOKEN }} From 6c0af68dbf0a584162c017e4bd3a93063443f889 Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 08:43:42 +0200 Subject: [PATCH 15/18] chore(deps): update shivammathur/setup-php action to v2.34.1 (#180) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25314351..68292ca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # 2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # 2.34.1 with: php-version: ${{ matrix.php }} tools: composer:v2 From 62ed5380dd8f670f9e198c8aff20b2a4fc84278c Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 09:42:46 +0200 Subject: [PATCH 16/18] chore(deps): update github actions (#184) Co-authored-by: alma-renovate-bot[bot] <163289924+alma-renovate-bot[bot]@users.noreply.github.com> --- .github/workflows/aqua.yml | 4 ++-- .github/workflows/backport-pull-request.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/hotfix-pull-request.yml | 2 +- .github/workflows/release-publish.yml | 2 +- .github/workflows/release-pull-request.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index fa1d32d0..384f3aae 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -17,13 +17,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: show-progress: false - name: Authenticate to Google Cloud id: gcloud-auth - uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: token_format: access_token workload_identity_provider: projects/699052769907/locations/global/workloadIdentityPools/github-identity-pool-shared/providers/github-identity-provider-shared # yamllint disable-line diff --git a/.github/workflows/backport-pull-request.yml b/.github/workflows/backport-pull-request.yml index 01e05225..53e8e341 100644 --- a/.github/workflows/backport-pull-request.yml +++ b/.github/workflows/backport-pull-request.yml @@ -17,7 +17,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: develop diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68292ca3..7426288f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false diff --git a/.github/workflows/hotfix-pull-request.yml b/.github/workflows/hotfix-pull-request.yml index a0947cc2..e503dfe3 100644 --- a/.github/workflows/hotfix-pull-request.yml +++ b/.github/workflows/hotfix-pull-request.yml @@ -15,7 +15,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: main diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 55f782d8..36d1c734 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -15,7 +15,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Install taskfile.dev uses: arduino/setup-task@v2 diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index ec40d2a3..f57b11c9 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -10,7 +10,7 @@ jobs: steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: main persist-credentials: false From fc4227f77723451c3b6b4c24d0dc36520b24cd0e Mon Sep 17 00:00:00 2001 From: "alma-renovate-bot[bot]" <163289924+alma-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 07:43:56 +0000 Subject: [PATCH 17/18] chore(deps): update github actions --- .github/workflows/aqua.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/release-publish.yml | 2 +- .github/workflows/release-pull-request.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 384f3aae..85b4b632 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -30,7 +30,7 @@ jobs: service_account: github-gar-alma-php-client@lyrical-carver-335213.iam.gserviceaccount.com - name: Authenticate to Artifact Registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 + uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 with: registry: europe-docker.pkg.dev username: oauth2accesstoken diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7426288f..befaf603 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # 2.34.1 + uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # 2.35.4 with: php-version: ${{ matrix.php }} tools: composer:v2 diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 36d1c734..709d8239 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -113,7 +113,7 @@ jobs: cc <@khadija.cherif> - name: Send changelog to Slack - uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 + uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 with: method: chat.postMessage token: ${{ secrets.SLACK_RELEASE_CHANGELOG_BOT_TOKEN }} diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index f57b11c9..e0c5938e 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -47,7 +47,7 @@ jobs: # If using default Github token, the created pull request won't trigger workflows with pull_request event # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs - name: Generate Github token to create PR - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 id: github-token with: app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} From 3335bd0ab7026669644c1de2dcc6ac0c4cc88574 Mon Sep 17 00:00:00 2001 From: joyet-simon <43644110+joyet-simon@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:58:34 +0000 Subject: [PATCH 18/18] chore: update version --- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- src/Client.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3938659f..548f4bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # CHANGELOG +## v2.5.1 - 2025-09-01 + +### Changes + +- Add DataExports endpoints (#137) + +#### Contributors + +@Francois-Gomis, @alma-renovate-bot[bot], @carine-bonnafous, @joyet-simon, @martinfobian, @remi-zuffinetti, [alma-renovate-bot[bot]](https://github.com/apps/alma-renovate-bot) and [github-actions[bot]](https://github.com/apps/github-actions) + ## v2.5.0 - 2025-01-30 ### Changes @@ -220,6 +230,7 @@ + ``` * Add fields and docs to the Payment entity * Add a Refund entity and extract refunds data within the Payment entity constructor diff --git a/composer.json b/composer.json index 172a7fa6..fee4689c 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "alma/alma-php-client", "description": "PHP API client for the Alma payments API", - "version": "2.5.0", + "version": "2.5.1", "type": "library", "require": { "php": "^5.6 || ~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4 || ~8.0 || ~8.1 || ~8.2 || ~8.3", diff --git a/src/Client.php b/src/Client.php index a5c34ebc..96b3039f 100644 --- a/src/Client.php +++ b/src/Client.php @@ -30,7 +30,7 @@ class Client { - const VERSION = '2.5.0'; + const VERSION = '2.5.1'; const LIVE_MODE = 'live'; const TEST_MODE = 'test';