From 08c779ac49f6d87bcbdd74ff6dd0454b84db139c Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:41:51 -0500 Subject: [PATCH 01/16] added workflow and updated issue tempalte --- .github/ISSUE_TEMPLATE/bug_report.yml | 22 +++++++++++++++++++++- .github/workflows/build.yml | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 80e58d4d19a..7ad288ecbc4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,4 +1,4 @@ -name: Bug Report 🐛 +name: Bug Report 🐛 description: Create a bug report to help us improve labels: ['bug'] assignees: [] @@ -9,6 +9,24 @@ body: Thank you for contributing to iTwinUI by creating an issue! Make sure you first do a search for existing issues so that this is is not a duplicate. Also visit our [FAQ](https://github.com/iTwin/iTwinUI/wiki/FAQ). + - type: dropdown + attributes: + label: Version + description: Are you using the latest version of iTwinUI? + options: + - true + - false + validations: + required: true + id: version + - type: textarea + attributes: + label: Version Details + description: If you are not using the latest version, please specify the version you are using. + validations: + required: true + if: + version: false - type: textarea attributes: label: Describe the bug (current behavior) @@ -25,6 +43,8 @@ body: attributes: label: Link to minimal repro description: 'Create a minimal reproduction by forking [this sandbox](https://stackblitz.io/github/iTwin/iTwinUI/tree/main/minimal-sandbox?file=/src/App.tsx)' + validations: + required: true - type: textarea attributes: label: Steps To Reproduce diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 295ca2bc6cc..9a8c557ffe7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,6 +117,12 @@ jobs: with: version: 9 + - name: Assign author to PR + uses: kentaro-m/auto-assign-action@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignee: author + - name: Use Node 20.x uses: actions/setup-node@v4 with: From a292dcaafbcc0edbded239917ad3cb8fb8ba47d3 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:45:42 -0500 Subject: [PATCH 02/16] updated options cannot be boolean --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7ad288ecbc4..06082f8a1ef 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -14,8 +14,8 @@ body: label: Version description: Are you using the latest version of iTwinUI? options: - - true - - false + - 'Yes' + - 'No' validations: required: true id: version @@ -26,7 +26,7 @@ body: validations: required: true if: - version: false + version: 'No' - type: textarea attributes: label: Describe the bug (current behavior) From 4fb991202c25fc93e9798eb6ac97879f7f16bac9 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:46:24 -0500 Subject: [PATCH 03/16] updated options cannot be boolean --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 06082f8a1ef..537072c65dc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -25,7 +25,7 @@ body: description: If you are not using the latest version, please specify the version you are using. validations: required: true - if: + conditions: version: 'No' - type: textarea attributes: From 87470f535da165fb36d6dfbb398bfa853179495a Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:52:57 -0500 Subject: [PATCH 04/16] tried conditional section --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 537072c65dc..b091b4ff0e3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -25,8 +25,8 @@ body: description: If you are not using the latest version, please specify the version you are using. validations: required: true - conditions: - version: 'No' + if: + equals: version.No - type: textarea attributes: label: Describe the bug (current behavior) From 98e3f4e435d58e4b2f34f3e4cfcecd0e1aaec343 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:55:02 -0500 Subject: [PATCH 05/16] removed condition --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b091b4ff0e3..e0a5e4b7584 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -24,9 +24,7 @@ body: label: Version Details description: If you are not using the latest version, please specify the version you are using. validations: - required: true - if: - equals: version.No + required: false - type: textarea attributes: label: Describe the bug (current behavior) From c834806271e40d9b50dd4c3ae406de96ec9e5afa Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 10:56:20 -0500 Subject: [PATCH 06/16] removed condition --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e0a5e4b7584..9544ef5e87f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,8 +11,7 @@ body: Also visit our [FAQ](https://github.com/iTwin/iTwinUI/wiki/FAQ). - type: dropdown attributes: - label: Version - description: Are you using the latest version of iTwinUI? + label: Are you using the latest version of iTwinUI? options: - 'Yes' - 'No' From 9db4e4df14a75855d054a178c8317b886d7381b4 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:01:48 -0500 Subject: [PATCH 07/16] fixed auto assign version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/build.yml | 30 +++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9544ef5e87f..654fc5161c0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -29,7 +29,7 @@ body: label: Describe the bug (current behavior) description: A concise description of what you're experiencing. validations: - required: false + required: true - type: textarea attributes: label: Expected Behavior diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a8c557ffe7..870683b3e13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,30 @@ jobs: - run: pnpm install + assign-author: + name: Assign author + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.event.action == 'opened' + + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v3 + with: + version: 9 + + - name: Use Node 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'pnpm' + + - name: Assign author to PR + uses: kentaro-m/auto-assign-action@v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignee: author + audit: name: Audit node modules needs: install @@ -117,12 +141,6 @@ jobs: with: version: 9 - - name: Assign author to PR - uses: kentaro-m/auto-assign-action@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - assignee: author - - name: Use Node 20.x uses: actions/setup-node@v4 with: From a7c729173e30c81c974602c5a4e6cba17339dee3 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:02:57 -0500 Subject: [PATCH 08/16] removed PR has to be opened condition --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 870683b3e13..f01467348d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: assign-author: name: Assign author runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.action == 'opened' + if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 From 682e70bedd09aedeef2abf7b162c77b63cb321e8 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:06:03 -0500 Subject: [PATCH 09/16] tried another approach --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f01467348d6..26da73c4147 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,8 @@ jobs: uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - assignee: author + add-assignees: true + assignees: ${{ github.actor }} audit: name: Audit node modules From 2d0e77f2f3e9e284ac35f5f6fad1a26dd59db5e5 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:08:47 -0500 Subject: [PATCH 10/16] tried another approach --- .github/workflows/auto_assign.yml | 1 + .github/workflows/build.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/auto_assign.yml diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml new file mode 100644 index 00000000000..717af2a0c8e --- /dev/null +++ b/.github/workflows/auto_assign.yml @@ -0,0 +1 @@ +addAssignees: author diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26da73c4147..7aa600ca6c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,8 +51,7 @@ jobs: uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - add-assignees: true - assignees: ${{ github.actor }} + configuration-path: '.github/auto_assign.yml' audit: name: Audit node modules From 1014a856c5cd1584b21358f8a9ab82c02426d640 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:13:13 -0500 Subject: [PATCH 11/16] fixed path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7aa600ca6c9..e491f6ca94e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: '.github/auto_assign.yml' + configuration-path: '.github/workflows/auto_assign.yml' audit: name: Audit node modules From 768ad0c61d5d1661d87df3f693c78bbd39481f4b Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:15:32 -0500 Subject: [PATCH 12/16] allowed assigning author to draft PR --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e491f6ca94e..1f3a0ae243c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,9 @@ jobs: cache: 'pnpm' - name: Assign author to PR + on: + pull_request: + types: [opened, draft] uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} From b2788fc38db8a6f7771987b7e93322b2cc38b17d Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:17:23 -0500 Subject: [PATCH 13/16] allowed assigning author to draft PR --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f3a0ae243c..8522aededeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: - name: Assign author to PR on: - pull_request: + pull_request_target: types: [opened, draft] uses: kentaro-m/auto-assign-action@v2.0.0 with: From babc54f6b7434578699a854c93d2ddf0a122f0e8 Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:19:29 -0500 Subject: [PATCH 14/16] allowed draft PR --- .github/workflows/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8522aededeb..73ae567c40c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,8 @@ on: branches: - main - dev - pull_request: + pull_request_target: + types: [opened, draft, ready_for_review, synchronize] merge_group: jobs: @@ -48,9 +49,6 @@ jobs: cache: 'pnpm' - name: Assign author to PR - on: - pull_request_target: - types: [opened, draft] uses: kentaro-m/auto-assign-action@v2.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} From cec592f5a1054a804de50aa8fe2885d977aadfee Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:21:12 -0500 Subject: [PATCH 15/16] allowed draft PR --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73ae567c40c..1effb56a72b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,7 @@ on: branches: - main - dev - pull_request_target: - types: [opened, draft, ready_for_review, synchronize] + pull_request: merge_group: jobs: @@ -33,7 +32,7 @@ jobs: assign-author: name: Assign author runs-on: ubuntu-latest - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'draft') steps: - uses: actions/checkout@v4 From 315064f83f9cf9589e60ffc1ab5ba4d29f084d7a Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 10 Sep 2024 11:21:53 -0500 Subject: [PATCH 16/16] removed allowing draft PR --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1effb56a72b..dd8f835a7c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,6 @@ jobs: assign-author: name: Assign author runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'draft') steps: - uses: actions/checkout@v4