From caed72036a408602ceb0419bf9c96723b6cc5cdb Mon Sep 17 00:00:00 2001 From: Xiaowei Zhu <33129495+zhu-xiaowei@users.noreply.github.com> Date: Mon, 22 May 2023 19:53:21 +0800 Subject: [PATCH] chore: add github templates for issue and pr (#14) 1. add bug_report and feature_report template for issue. 2. add pr template. Close #6 --------- Co-authored-by: xiaoweii --- .github/ISSUE_TEMPLATE/1.bug_report.yaml | 138 +++++++++++++++++++ .github/ISSUE_TEMPLATE/2.feature_report.yaml | 54 ++++++++ .github/ISSUE_TEMPLATE/config.yaml | 5 + .github/PULL_REQUEST_TEMPLATE.md | 17 +++ CONTRIBUTING.md | 58 ++++++++ 5 files changed, 272 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/1.bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/2.feature_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yaml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yaml b/.github/ISSUE_TEMPLATE/1.bug_report.yaml new file mode 100644 index 0000000..5a9a2a4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yaml @@ -0,0 +1,138 @@ +name: Bug report +description: Create a report to help us improve Clickstream Android + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Try to include as much information as you can. + - type: markdown + attributes: + value: | + For reference, the current versions of the Clickstream Android packages are listed below. Please verify your issue against the latest version(s) of the relevant package(s). + + | Package | Version | + | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | + | `software.aws.solution:clickstream` | [![Maven Central](https://img.shields.io/maven-central/v/software.aws.solution/clickstream.svg)](https://search.maven.org/artifact/software.aws.solution/clickstream)| + + - type: checkboxes + attributes: + label: | + Before opening, please confirm: + options: + - label: I have [searched for duplicate or closed issues](https://github.com/awslabs/clickstream-android/issues?q=is%3Aissue+). + required: true + + - type: markdown + attributes: + value: | + ## Environment + - type: dropdown + attributes: + label: Language and Async Model + description: What programming language is being used? + multiple: true + options: + - Java + - Kotlin + - Kotlin - Coroutines + - RxJava + - Not applicable + validations: + required: true + - type: textarea + attributes: + label: Gradle script dependencies + description: | + Please provide the version of Clickstream being used from your `build.gradle (Module: app)` file. + value: | +
+ + ```groovy + // Put output below this line + + + ``` + +
+ validations: + required: true + - type: textarea + attributes: + label: Environment information + description: | + Please run the following command inside your project and copy/paste the output below: + ``` + ./gradlew --version + ``` + value: | +
+ + ``` + # Put output below this line + + + ``` + +
+ validations: + required: true + - type: markdown + attributes: + value: | + ## Details + - type: input + attributes: + label: Please include any relevant guides or documentation you're referencing + - type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + attributes: + label: Reproduction steps (if applicable) + description: | + How do you trigger this bug? Please walk us through it step by step. Screenshots can be attached in textarea below. + placeholder: | + 1. Install '...' + 2. Configure '...' + 3. Go to '...' + 4. See error + - type: textarea + attributes: + label: Code Snippet + description: | + Please provide a code snippet or a link to sample code of the issue you are experiencing to help us reproduce the issue. + + **Be sure to remove any sensitive data.** + value: | + ```java + // Put your code below this line. + + ``` + - type: textarea + attributes: + label: Log output + description: | + For example, error messages, or stack traces. + **Be sure to remove any sensitive data.** + value: | +
+ + ``` + // Put your logs below this line + + + ``` + +
+ + - type: textarea + attributes: + label: Additional information and screenshots + description: | + If you have any additional information, workarounds, etc. for us, use the field below. + Please note, you can attach screenshots or screen recordings here, by + dragging and dropping files in the field below. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2.feature_report.yaml b/.github/ISSUE_TEMPLATE/2.feature_report.yaml new file mode 100644 index 0000000..fbd73a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2.feature_report.yaml @@ -0,0 +1,54 @@ +name: Feature request +description: Create a feature request to help us improve Clickstream Android + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! Try to include as much information as you can. + - type: markdown + attributes: + value: | + For reference, the current versions of the Clickstream Android are listed below. Please verify your issue against the latest version(s) of the relevant package(s). + + | Package | Version | + | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | + | `software.aws.solution:clickstream` | [![Maven Central](https://img.shields.io/maven-central/v/software.aws.solution/clickstream.svg)](https://search.maven.org/artifact/software.aws.solution/clickstream)| + + - type: checkboxes + attributes: + label: | + Before opening, please confirm: + options: + - label: I have [searched for duplicate or closed issues](https://github.com/awslabs/clickstream-android/issues?q=is%3Aissue+). + required: true + + - type: textarea + id: description + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + validations: + required: true + + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..f3f4bb9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: GitHub Community Support + url: https://github.com/awslabs/clickstream-android/discussions + about: Please ask and answer questions here. \ 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..7f0589f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +- [ ] PR title and description conform to [Pull Request](https://github.com/awslabs/clickstream-android/blob/main/CONTRIBUTING.md#pull-request-guidelines) guidelines. + +*Issue #, if available:* + +*Description of changes:* + +*How did you test these changes?* +(Please add a line here how the changes were tested) + +*Documentation update required?* +- [ ] No +- [ ] Yes (Please include a PR link for the documentation update) + +*General Checklist* +- [ ] Added Unit Tests + +By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4b6a1c..ee83c7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,64 @@ reported the issue. Please try to include as much information as you can. Detail ## Contributing via Pull Requests + +This is mostly the same as [GitHub's guide on creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + +First, create a _fork_ of `clickstream-android`. Clone it, and make changes to this _fork_. + +```shell +git clone git@github.com:your_username/clickstream-android.git +``` + +After you have tested your feature/fix, by adding sufficient test coverage, and +validating Checkstyle, lint, and the existing test suites, you're ready to +publish your change. + +The commit message should look like below. It started with a prefix like feat/fix or +chore. After a paragraph describing what you've done, include links to useful resources. These might +include design documents, StackOverflow implementation notes, GitHub issues, +etc. All links must be publicly accessible. + +```console +feat: add new preset event for screen view. + +Resolves: https://github.com/awslabs/clickstream-android/issues/222 +See also: https://stackoverflow.com/a/58662077/695787 +``` + +Now, save your work to a new branch: + +```shell +git checkout -b feature_screen_view +``` + +To publish it: + +```shell +git push -u origin feature_screen_view +``` + +This last step will give you a URL to view a GitHub page in your browser. +Copy-paste this, and complete the workflow in the UI. It will invite you to +"create a PR" from your newly published branch. + +### Pull Request Guidelines +- The title of your PR must be descriptive to the specific change. +- The title of your PR must be of below format since next release version is determined from PR titles in the commit history. + - For a bugfix: `fix: description of changes` + - For a feature: `feat: add awesome feature` + - Everything else: `chore: fix build script` +- No period at the end of the title. +- Pull Request message should indicate which issues are fixed: `fixes #` or `closes #`. +- If not obvious (i.e. from unit tests), describe how you verified that your change works. +- If this PR includes breaking changes, they must be listed at the top of the changelog as described above in the Pull Request Checklist. +- PR must be reviewed by at least one repository maintainer, in order + to be considered for inclusion. +- PR must also pass the Actions like Checkstyle, Lint, and Unit tests. +- Usually all these are going to be **squashed** when you merge to main. +- Make sure to update the PR title/description if things change. +- Rebase with the `main` branch if it has commits ahead of your fork. + Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 1. You are working against the latest source on the *main* branch.