From d871e4b3d23a828a16e187e8c6917d4ce7eaf157 Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Fri, 15 Dec 2023 12:34:58 +0100 Subject: [PATCH] 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