You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ji...@apache.org on 2020/08/06 18:13:56 UTC

[helix] branch master updated: Add PR/Issue template and actions to validate PR status. (#1223)

This is an automated email from the ASF dual-hosted git repository.

jiajunwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4aa7113  Add PR/Issue template and actions to validate PR status. (#1223)
4aa7113 is described below

commit 4aa7113e115d8480a7c82f5ad96bbb6d4d039af5
Author: Jiajun Wang <jj...@linkedin.com>
AuthorDate: Thu Aug 6 11:13:49 2020 -0700

    Add PR/Issue template and actions to validate PR status. (#1223)
    
    Add 2 issue templates and one PR template to the Helix project.
    Also, add Github actions based on the PR template so as to automatically update the PR status based on any PR updates.
---
 .github/ISSUE_TEMPLATE/bug_report.md             | 20 +++++++++++
 .github/ISSUE_TEMPLATE/feature_request.md        | 17 ++++++++++
 .github/pull_request_template.md                 | 43 ++++++++++++++++++++++++
 .github/workflows/{Helix_CI.yml => Helix-CI.yml} |  2 +-
 .github/workflows/Helix-PR-CI.yml                |  6 ++--
 .github/workflows/Helix-PR-Premerge-Check.yml    | 28 +++++++++++++++
 6 files changed, 112 insertions(+), 4 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..80ee282
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: bug
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior.
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..8413110
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,17 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: feature
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is.
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..4e7cfe2
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,43 @@
+### Issues
+
+- [ ] My PR addresses the following Helix issues and references them in the PR description:
+
+(#200 - Link your issue number here: You can write "Fixes #XXX". Please use the proper keyword so that the issue gets closed automatically. See https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
+Any of the following keywords can be used: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved)
+
+### Description
+
+- [ ] Here are some details about my PR, including screenshots of any UI changes:
+
+(Write a concise description including what, why, how)
+
+### Tests
+
+- [ ] The following tests are written for this issue:
+
+(List the names of added unit/integration tests)
+
+- [ ] The following is the result of the "mvn test" command on the appropriate module:
+
+(Before CI test pass, please copy & paste the result of "mvn test")
+
+### Documentation (Optional)
+
+- In case of new functionality, my PR adds documentation in the following wiki page:
+
+(Link the GitHub wiki you added)
+
+### Commits
+
+- My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
+  1. Subject is separated from body by a blank line
+  1. Subject is limited to 50 characters (not including Jira issue reference)
+  1. Subject does not end with a period
+  1. Subject uses the imperative mood ("add", not "adding")
+  1. Body wraps at 72 characters
+  1. Body explains "what" and "why", not "how"
+
+### Code Quality
+
+- My diff has been formatted using helix-style.xml 
+(helix-style-intellij.xml if IntelliJ IDE is used)
diff --git a/.github/workflows/Helix_CI.yml b/.github/workflows/Helix-CI.yml
similarity index 98%
rename from .github/workflows/Helix_CI.yml
rename to .github/workflows/Helix-CI.yml
index f350781..fc81684 100644
--- a/.github/workflows/Helix_CI.yml
+++ b/.github/workflows/Helix-CI.yml
@@ -6,7 +6,7 @@ on:
     branches: [ master ]
 
 jobs:
-  build:
+  Merge_PR_CI:
 
     runs-on: ubuntu-latest
 
diff --git a/.github/workflows/Helix-PR-CI.yml b/.github/workflows/Helix-PR-CI.yml
index 7837d8f..2960c70 100644
--- a/.github/workflows/Helix-PR-CI.yml
+++ b/.github/workflows/Helix-PR-CI.yml
@@ -6,10 +6,10 @@ on:
     branches: [ master ]
 
 jobs:
-  build:
-    
+  pull_request_CI:
+
     runs-on: ubuntu-latest
-    
+
     steps:
     - uses: actions/checkout@v2
     - name: Set up JDK 1.8
diff --git a/.github/workflows/Helix-PR-Premerge-Check.yml b/.github/workflows/Helix-PR-Premerge-Check.yml
new file mode 100644
index 0000000..c0eb809
--- /dev/null
+++ b/.github/workflows/Helix-PR-Premerge-Check.yml
@@ -0,0 +1,28 @@
+# Verify if the PR meets all the requirements for merging on PR review event.
+
+name: PR Pre-merge Check
+
+on:
+  pull_request:
+    types: [edited]
+  pull_request_review:
+    types: [submitted]
+
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+jobs:
+  validate_PR:
+
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Verify All Tasks are Finished
+        uses: venkatsarvesh/pr-tasks-completed-action@v1.0.0
+        with:
+          repo-token: "${{ secrets.GITHUB_TOKEN }}"
+      - name: Verify the PR has been approved
+        uses: pullreminders/label-when-approved-action@master
+        env:
+          APPROVALS: "1"
+          ADD_LABEL: "CheckedAndApproved"