You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wolf427 (GitHub)" <gi...@apache.org> on 2018/11/20 01:51:19 UTC

[GitHub] [incubator-dubbo-ops] wolf427 opened pull request #186: 代码重构,修复bug,加注释

1.把搜索功能从controller中抽出到service里,替换掉里面的魔法值
2.之前的模糊搜索,因为将filter强制转换成小写了,所以*ExampleService这样的搜索条件搜不到com.xxx.ExampleService这样的service, 通过修改Pattern匹配方式为不区分大小写,修复了该bug
3.主要为主页搜索相关的方法加了一些注释

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] wolf427 closed pull request #186: 代码重构,修复bug,加注释

Posted by "wolf427 (GitHub)" <gi...@apache.org>.
[ pull request closed by wolf427 ]

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-ops] majinkai commented on issue #186: 代码重构,修复bug,加注释

Posted by "majinkai (GitHub)" <gi...@apache.org>.
感谢你积极参与dubbo项目的建设,希望能看到你贡献更多的代码:D

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] majinkai commented on issue #186: 代码重构,修复bug,加注释

Posted by "majinkai (GitHub)" <gi...@apache.org>.
提交PR的流程可以参照
https://github.com/apache/incubator-dubbo/blob/master/CONTRIBUTING.md#contribution-flow

每次编写代码之前,先rebase到最新的提交点,这样提交的PR不会包含之前的提交历史,比如你这次的PR就包含了之前的Refactor search process提交

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] majinkai commented on issue #186: 代码重构,修复bug,加注释

Posted by "majinkai (GitHub)" <gi...@apache.org>.
# 操作顺序
1. 找到心仪的开源项目,Fork它,Star它
2. 根据自己的项目地址Clone到本地
3. 将被Fork的项目添加为upstream,用以跟踪其所有修改
4. 创建一个新的分支(补丁/特性都可以,名称跟你要开发的内容相关)
5. 编写你的代码
6. 提交N次代码(如果想把这N次提交合并成一次,显得漂亮一些的话,可以执行提交合并[1])
7. 将创建的分支推送到origin
8. 在Github上面发起Pull Request请求等待合并
9. 如果代码被合并了,可以删除自己的分支
10. 拉取upstream的最新提交
11. 创建新的分支
12. 将新分支rebase到upstream的最新提交点
13. 重复5~12即可

#### [1] 提交合并
我们在本地开发时,可以随时去提交写好的代码,但是这样会导致提交历史比较多,推送到远端或者发起Pull Request显得比较杂乱,这时我们就可以将几次提交或者全部提交合并成一次提交,执行顺序如下:
* 切换到需要合并提交的分支
* 输入git rebase -i HEAD~N(N=你想合并的最后几次提交),看到如下输出:
```powershell
pick 708fa0a commit message A
pick 8baaa26 commit message B
pick dba177a commit message C

# Rebase 2d2fb07..bfa62a9 onto 2d2fb07 (3 command(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
```

* 根据Commands注释修改成你想要的效果,例如:
```powershell
pick 708fa0a commit message A
squash 8baaa26 commit message B
squash dba177a commit message C

# ...
```
* 输入:wq保存退出,会出现如下提交信息:
```plain
# This is a combination of 3 commits.
# The first commit's message is:
commit message A

# This is the 2nd commit message:
commit message B

# This is the 3rd commit message:
commit message C
```
* 根据实际情况修改提交信息
* 再次输入:wq就会看到合并完毕的提示信息
* 这时候Rebase合并就成功了,并且三次提交也合并在一起成为一次提交

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] codecov-io commented on issue #186: 代码重构,修复bug,加注释

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=h1) Report
> Merging [#186](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/incubator-dubbo-ops/commit/47bffeb9566fa93af4c165e62398eb56a782e9ef?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `0%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186/graphs/tree.svg?width=650&token=fYsc8RuDGB&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##             develop   #186      +/-   ##
===========================================
- Coverage        0.4%   0.4%   -0.01%     
  Complexity         7      7              
===========================================
  Files            102    102              
  Lines           4658   4661       +3     
  Branches         798    798              
===========================================
  Hits              19     19              
- Misses          4638   4641       +3     
  Partials           1      1
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...ache/dubbo/admin/governance/util/WebConstants.java](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186/diff?src=pr&el=tree#diff-ZHViYm8tYWRtaW4tYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vYWRtaW4vZ292ZXJuYW5jZS91dGlsL1dlYkNvbnN0YW50cy5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ache/dubbo/admin/controller/ServiceController.java](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186/diff?src=pr&el=tree#diff-ZHViYm8tYWRtaW4tYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vYWRtaW4vY29udHJvbGxlci9TZXJ2aWNlQ29udHJvbGxlci5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...n/governance/service/impl/ProviderServiceImpl.java](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186/diff?src=pr&el=tree#diff-ZHViYm8tYWRtaW4tYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vYWRtaW4vZ292ZXJuYW5jZS9zZXJ2aWNlL2ltcGwvUHJvdmlkZXJTZXJ2aWNlSW1wbC5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=footer). Last update [47bffeb...7b787bd](https://codecov.io/gh/apache/incubator-dubbo-ops/pull/186?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-ops] wolf427 commented on issue #186: 代码重构,修复bug,加注释

Posted by "wolf427 (GitHub)" <gi...@apache.org>.
谢谢,我重新提交了PR

[ Full content available at: https://github.com/apache/incubator-dubbo-ops/pull/186 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org