congomall icon indicating copy to clipboard operation
congomall copied to clipboard

刚果商城贡献手册

Open magestacks opened this issue 1 year ago • 0 comments

如果你想为刚果商城“添砖加瓦”,请查看马哥认真编写的贡献手册,在这里提前预祝大家贡献顺利。

该手册包含五个小节,分别对应不同的流程:

  • 提交 PR 的流程
  • 提交日志规范
  • Pull Request 标题规范
  • 代码规范
  • 开源协议头文件

提交 PR 的流程

如果你是个开源“老手”,本节请自行跳过。

如果你还没有执行过 PR 贡献流程,详情参考该 贡献文档

注意,该文档取自 openGoofy 另一个开源动态线程池项目 Hippo4j,其中 PR 标题和提交日志还需参考下述文档。

提交日志规范

提交日志参考 Git 操作规约

简单举例,你开发了订单查询功能创建时间倒序:

  • feature: 订单服务查询订单列表数据按照创建时间倒序 (#57)

或,优化微服务流量监控生产者前缀路径:

  • optimize: 优化微服务流量监控生产者路径前缀标识 (#61)

如果你提交的问题涉及到相关 Issue,请把对应的 Issue 编号追加到提交日志末尾。

Pull Request 标题规范

PR 标题与提交日志保持一致即可。

代码规范

刚果商城对于代码的格式以及规约非常重视,同时也希望贡献者们遵守相关规约。

贡献规约文档,大家在开发前可以阅读下贡献文档,以保证提交的 PR 无规约方面的问题。

开源协议头文件

请在每一个 .java 文件的顶部添加 Apache 2.0 开源协议,参考已有代码复制到新文件即可。

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

magestacks avatar Apr 28 '23 09:04 magestacks