Skip to content

Commit

Permalink
docs: add commit rule to contribute guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Jul 11, 2019
1 parent b5a2a30 commit 4700c87
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ steps:
from_secret: BOT_URL
commands:
- export MSG_LINK=${DRONE_BUILD_LINK}
- export MSG_TITLE="🏗️⌛ Start a CI pipeline (${DRONE_BUILD_NUMBER}) for $DRONE_SOURCE_BRANCH"
- export MSG_CONTENT="submit by **$DRONE_COMMIT_AUTHOR**($DRONE_COMMIT_AUTHOR_EMAIL), click the link below to see the status"
- export MSG_TITLE="⌛🏗 Start a CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
- export MSG_CONTENT="submit by **$DRONE_COMMIT_AUTHOR**(\`$DRONE_COMMIT_AUTHOR_EMAIL\`), click the link below to see the status"
- ./shell/push-wechatwork.sh

- name: check commit style
Expand Down Expand Up @@ -50,8 +50,8 @@ steps:
from_secret: BOT_URL
commands:
- export MSG_LINK=$DRONE_REPO_LINK
- export MSG_TITLE="✅😃 All tests passed, good job! Looks good to me. $DRONE_SOURCE_BRANCH(${DRONE_BUILD_NUMBER})"
- export MSG_CONTENT="this commit is submit by **$DRONE_COMMIT_AUTHOR**($DRONE_COMMIT_AUTHOR_EMAIL) and is ready to merge to branch $DRONE_SOURCE_BRANCH"
- export MSG_TITLE="✅😃 All tests passed, good job! \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`)"
- export MSG_CONTENT="the branch \`$DRONE_SOURCE_BRANCH\` submit by **$DRONE_COMMIT_AUTHOR**(\`$DRONE_COMMIT_AUTHOR_EMAIL\`) is ready to merge to \`master\`"
- ./shell/push-wechatwork.sh


Expand All @@ -62,8 +62,8 @@ steps:
from_secret: BOT_URL
commands:
- export MSG_LINK=$DRONE_BUILD_LINK
- export MSG_TITLE="❌😥 CI pipeline (${DRONE_BUILD_NUMBER}) failed!"
- export MSG_CONTENT="please inform **$DRONE_COMMIT_AUTHOR**($DRONE_COMMIT_AUTHOR_EMAIL) to modify and fix [$DRONE_SOURCE_BRANCH]($DRONE_COMMIT_LINK). click the link below to see the details."
- export MSG_TITLE="❌😥 CI pipeline \`$DRONE_SOURCE_BRANCH\`(\`${DRONE_BUILD_NUMBER}\`) is failed!"
- export MSG_CONTENT="please inform **$DRONE_COMMIT_AUTHOR**(\`$DRONE_COMMIT_AUTHOR_EMAIL\`) to modify and fix [\`$DRONE_SOURCE_BRANCH\`]($DRONE_COMMIT_LINK). click the link below to see the details."
- ./shell/push-wechatwork.sh
when:
status:
Expand Down
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing to GNES

## Commit Message and Pull Request Naming

To help everyone with understanding the commit history of GNES, we employ [`commitlint`](https://commitlint.js.org/#/) in the CI pipeline to enforce the commit styles. Specifically, our convention is:

```text
type(scope?): subject
```

where `type` is one of the following:

- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test

`scope` is optional, represents the module your commit working on.

`subject` explains the commit.

As an example, a commit that implements a new encoder should be phrased as:
```text
feat(encoder): add new inceptionV3 as image encoder
```

0 comments on commit 4700c87

Please sign in to comment.