From 110153a49b2465df18a5a7cd54cef31f2367833f Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Wed, 22 Feb 2023 15:08:21 +0100 Subject: [PATCH] Adding details in the GitHub Issue creation process tempalte --- .github/ISSUE_TEMPLATE/openapi-changes.yml | 10 +++++++--- .github/workflows/trigger-postman.yml | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/openapi-changes.yml b/.github/ISSUE_TEMPLATE/openapi-changes.yml index aae759c..0295917 100644 --- a/.github/ISSUE_TEMPLATE/openapi-changes.yml +++ b/.github/ISSUE_TEMPLATE/openapi-changes.yml @@ -1,10 +1,14 @@ --- -name: OpenAPI changes -about: Files need to be generated again +name: OpenAPI changes {{tools.context.sha}} title: New changes in adyen-openapi labels: enhancement assignees: jlengrand, gcatanese --- -See [adyen-openapi](https://github.com/adyen/adyen-openapi) \ No newline at end of file +See the diff here -> https://github.com/Adyen/adyen-openapi/commit/{{tools.context.sha}}. + +The list of changed files is the following -> + {{env.FILENAMES}} + +See [adyen-openapi](https://github.com/adyen/adyen-openapi) for more details. \ No newline at end of file diff --git a/.github/workflows/trigger-postman.yml b/.github/workflows/trigger-postman.yml index f911345..01d9f2c 100644 --- a/.github/workflows/trigger-postman.yml +++ b/.github/workflows/trigger-postman.yml @@ -11,9 +11,24 @@ jobs: name: "Dummy action" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + repository: 'Adyen/adyen-openapi' + fetch-depth: 0 + - name: Get changed files in the yaml folder + id: changed-files-specific + uses: tj-actions/changed-files@v35 + with: + files: yaml/*.yaml + - name: Run nothing if no file in the yaml folder has changed + if: steps.changed-files-specific.outputs.any_changed == 'false' + run: | + echo "No changes detected in the yaml folder. Nothing to do!" + - name: Files have changed in the YAML folder, we create an issue - uses: JasonEtco/create-an-issue@v2 + if: steps.changed-files-specific.outputs.any_changed == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILENAMES: ${{ steps.changed-files-specific.outputs.all_changed_files }} with: filename: .github/ISSUE_TEMPLATE/openapi-changes.yml \ No newline at end of file