From d871e4b3d23a828a16e187e8c6917d4ce7eaf157 Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Fri, 15 Dec 2023 12:34:58 +0100 Subject: [PATCH 1/4] feat: Add GitHub templates and workflows --- .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/1_bug_report.yaml | 62 +++++++++++++++++++ .github/ISSUE_TEMPLATE/2_feature_request.yaml | 28 +++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/PULL_REQUEST_TEMPLATE.md | 39 ++++++++++++ .github/workflows/build-lint-test.yml | 30 +++++++++ .github/workflows/dry-run.yml | 12 ++++ .github/workflows/release.yml | 20 ++++++ 8 files changed, 197 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/1_bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/2_feature_request.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/build-lint-test.yml create mode 100644 .github/workflows/dry-run.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..c001ec8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @cloudscape-design/cloudscape-dev diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yaml b/.github/ISSUE_TEMPLATE/1_bug_report.yaml new file mode 100644 index 0000000..0b16e05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yaml @@ -0,0 +1,62 @@ +name: Bug Report +description: Report a bug +title: "[Bug]: " +labels: bug +body: + - type: markdown + attributes: + value: Provide as much information as possible to help us investigate the bug. + - type: dropdown + id: browser + attributes: + label: Browser + description: In which browser(s) are you experiencing the issue? + multiple: true + options: + - Chrome + - Safari + - Firefox + - Edge + - type: input + id: version + attributes: + label: Package version + description: Which version(s) are you using? + placeholder: e.g. v3.0.122 + validations: + required: true + - type: input + id: react-version + attributes: + label: React version + description: Which version of React are you using? + placeholder: e.g. v18.0.1 + - type: textarea + id: description + attributes: + label: Description + description: Tell us more about the issue you are experiencing + placeholder: What is the actual and expected behavior? + validations: + required: true + - type: textarea + id: source-code + attributes: + label: Source code + description: Share links to your source code + - type: textarea + id: reproduction + attributes: + label: Reproduction + description: Recreate the issue using [CodeSandbox](https://codesandbox.io/). Use this [template](https://codesandbox.io/s/cloudscape-design-system-react-javascript-ljs1t7) as a starting point + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: Please confirm the following + options: + - label: I agree to follow this project's [Code of + Conduct](https://github.com/cloudscape-design/components/blob/main/CODE_OF_CONDUCT.md) + required: true + - label: I checked the current issues on [this](https://github.com/cloudscape-design/code-view/issues) and + [main](https://github.com/cloudscape-design/components/issues) repositories for duplicate problems diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yaml b/.github/ISSUE_TEMPLATE/2_feature_request.yaml new file mode 100644 index 0000000..eadf46f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_feature_request.yaml @@ -0,0 +1,28 @@ +name: Feature request +description: Request a feature +title: '[Feature Request]: ' +labels: enhancement +body: + - type: markdown + attributes: + value: Use this template to request a new feature. + - type: textarea + id: description + attributes: + label: Description + description: Describe the feature you request. Provide details on your use case, and how it would benefit your customers + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: Please confirm the following + options: + - label: + I agree to follow this project's [Code of + Conduct](https://github.com/cloudscape-design/components/blob/main/CODE_OF_CONDUCT.md) + required: true + - label: + I checked the [current + issues](https://github.com/cloudscape-design/components/issues) for duplicate requests \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..235756c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + url: https://github.com/cloudscape-design/components/discussions + about: Ask a question about Cloudscape Design System \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..740552f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,39 @@ +### Description + + + + + +Related links, issue #, if available: n/a + +### How has this been tested? + + + + + +
+ Review checklist + +_The following items are to be evaluated by the author(s) and the reviewer(s)._ + +#### Correctness + +- _Changes include appropriate documentation updates._ +- _Changes are backward-compatible if not indicated, see [`CONTRIBUTING.md`](CONTRIBUTING.md#public-apis)._ +- _Changes do not include unsupported browser features, see [`CONTRIBUTING.md`](CONTRIBUTING.md#browsers-support)._ +- _Changes were manually tested for accessibility, see [accessibility guidelines](https://cloudscape.design/foundation/core-principles/accessibility/)._ + +#### Security + +- _If the code handles URLs: all URLs are validated through [the `checkSafeUrl` function](https://github.com/cloudscape-design/components/blob/main/src/internal/utils/check-safe-url.ts)._ + +#### Testing + +- _Changes are covered with new/existing unit tests?_ +- _Changes are covered with new/existing integration tests?_ +
+ +--- + +By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml new file mode 100644 index 0000000..3f25527 --- /dev/null +++ b/.github/workflows/build-lint-test.yml @@ -0,0 +1,30 @@ +name: Build, lint and test + +on: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: + id-token: write + actions: read + contents: read + security-events: write + deployments: write + +jobs: + build: + uses: cloudscape-design/.github/.github/workflows/build-lint-test.yml@main + with: + artifact-path: dist + artifact-name: dev-pages + deploy: + needs: build + uses: cloudscape-design/.github/.github/workflows/deploy.yml@main + secrets: inherit + with: + artifact-name: dev-pages + deployment-path: dist diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml new file mode 100644 index 0000000..15442bd --- /dev/null +++ b/.github/workflows/dry-run.yml @@ -0,0 +1,12 @@ +# This workflow executes a full dry-run test, which means that all we build and test all @cloudscape-design packages in GitHub. +# This ensures that the changes in the current package do not cause any regressions for its consumers. +name: Dry-run +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + dry-run: + uses: cloudscape-design/.github/.github/workflows/dry-run.yml@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c0ca91d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +# This workflow releases the current package to a dedicated private CodeArtifact repository. +# One repository may publish more than one package. For more details refer to the release-package Action. +name: Release + +on: + push: + branches: + - main + - "dev-v3-*" + +permissions: + id-token: write + contents: read + +jobs: + release: + uses: cloudscape-design/.github/.github/workflows/release.yml@main + secrets: inherit + with: + publish-packages: lib/components From 2e97f902956861f2687e05980a378f04e0fd80c3 Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Mon, 18 Dec 2023 18:15:34 +0100 Subject: [PATCH 2/4] chore: Update workflows to use new actions repo --- .github/PULL_REQUEST_TEMPLATE.md | 8 ++------ .github/workflows/build-lint-test.yml | 4 ++-- .github/workflows/dry-run.yml | 2 +- .github/workflows/lint-pr.yml | 12 ++++++++++++ .github/workflows/release.yml | 4 +--- 5 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/lint-pr.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 740552f..e7060de 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,14 +20,10 @@ _The following items are to be evaluated by the author(s) and the reviewer(s)._ #### Correctness - _Changes include appropriate documentation updates._ -- _Changes are backward-compatible if not indicated, see [`CONTRIBUTING.md`](CONTRIBUTING.md#public-apis)._ -- _Changes do not include unsupported browser features, see [`CONTRIBUTING.md`](CONTRIBUTING.md#browsers-support)._ +- _Changes are backward-compatible if not indicated, see [`CONTRIBUTING.md`](https://github.com/cloudscape-design/components/blob/main/CONTRIBUTING.md#public-apis)._ +- _Changes do not include unsupported browser features, see [`CONTRIBUTING.md`](https://github.com/cloudscape-design/components/blob/main/CONTRIBUTING.md#browsers-support)._ - _Changes were manually tested for accessibility, see [accessibility guidelines](https://cloudscape.design/foundation/core-principles/accessibility/)._ -#### Security - -- _If the code handles URLs: all URLs are validated through [the `checkSafeUrl` function](https://github.com/cloudscape-design/components/blob/main/src/internal/utils/check-safe-url.ts)._ - #### Testing - _Changes are covered with new/existing unit tests?_ diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 3f25527..8b6f558 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -17,13 +17,13 @@ permissions: jobs: build: - uses: cloudscape-design/.github/.github/workflows/build-lint-test.yml@main + uses: cloudscape-design/actions/.github/workflows/build-lint-test.yml@main with: artifact-path: dist artifact-name: dev-pages deploy: needs: build - uses: cloudscape-design/.github/.github/workflows/deploy.yml@main + uses: cloudscape-design/actions/.github/workflows/deploy.yml@main secrets: inherit with: artifact-name: dev-pages diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml index 15442bd..6a50a20 100644 --- a/.github/workflows/dry-run.yml +++ b/.github/workflows/dry-run.yml @@ -9,4 +9,4 @@ on: jobs: dry-run: - uses: cloudscape-design/.github/.github/workflows/dry-run.yml@main + uses: cloudscape-design/actions/.github/workflows/dry-run.yml@main diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 0000000..811bb04 --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,12 @@ +name: Lint PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + dry-run: + uses: cloudscape-design/actions/.github/workflows/lint-pr.yml@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0ca91d..c5abf73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,5 @@ permissions: jobs: release: - uses: cloudscape-design/.github/.github/workflows/release.yml@main + uses: cloudscape-design/actions/.github/workflows/release.yml@main secrets: inherit - with: - publish-packages: lib/components From 22385aa849fda4e696f2ba63d558c4136ba27daf Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Tue, 19 Dec 2023 17:02:43 +0100 Subject: [PATCH 3/4] chore: Update links in bug report --- .github/ISSUE_TEMPLATE/2_feature_request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yaml b/.github/ISSUE_TEMPLATE/2_feature_request.yaml index eadf46f..463d9c8 100644 --- a/.github/ISSUE_TEMPLATE/2_feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/2_feature_request.yaml @@ -24,5 +24,5 @@ body: Conduct](https://github.com/cloudscape-design/components/blob/main/CODE_OF_CONDUCT.md) required: true - label: - I checked the [current - issues](https://github.com/cloudscape-design/components/issues) for duplicate requests \ No newline at end of file + I checked the current issues on [this](https://github.com/cloudscape-design/code-view/issues) and + [main](https://github.com/cloudscape-design/components/issues) repositories forfor duplicate requests From e38f46aaabfc6227f81c3d75a9d3f96749ecd6fd Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Mon, 15 Jan 2024 11:37:39 +0100 Subject: [PATCH 4/4] chore: Fix typo --- .github/ISSUE_TEMPLATE/2_feature_request.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yaml b/.github/ISSUE_TEMPLATE/2_feature_request.yaml index 463d9c8..7adb974 100644 --- a/.github/ISSUE_TEMPLATE/2_feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/2_feature_request.yaml @@ -1,6 +1,6 @@ name: Feature request description: Request a feature -title: '[Feature Request]: ' +title: "[Feature Request]: " labels: enhancement body: - type: markdown @@ -19,10 +19,9 @@ body: label: Code of Conduct description: Please confirm the following options: - - label: - I agree to follow this project's [Code of + - label: I agree to follow this project's [Code of Conduct](https://github.com/cloudscape-design/components/blob/main/CODE_OF_CONDUCT.md) required: true - label: I checked the current issues on [this](https://github.com/cloudscape-design/code-view/issues) and - [main](https://github.com/cloudscape-design/components/issues) repositories forfor duplicate requests + [main](https://github.com/cloudscape-design/components/issues) repositories for duplicate requests