与iCal同步项目负责人(针对随叫随到的受让人)
joca的Python项目详细描述
安装
pip install joca
配置文件
配置包含3个部分,local,jira和 projects。
- local用于配置日志记录。
- jira包含jira的用户名、密码和服务器url 实例joca连接到。
- projects是一个对象列表,告诉joca什么项目,什么 iCal和regex应用于事件摘要以提取用户 名字。
以下是基本配置:
{ "local": { "logging": { "file": "/var/log/joca.log", "format": "%(asctime)s %(levelname)s %(message)s", "level": "info" }, }, "jira": { "server": "https://instance.jira.com", "username": "api-user", "password": "hunter2" }, "projects": [ { "key": "PROJ", "ical": "https://totally.a-website.com/calendar", "regex": "^(.*)$" } ] }
- local.logging,format不是必需的。
- local.logging.level不需要大写。
- projects.#.key不必大写,joca将处理 那。
projects是一个列表,因此可以随意设置多个项目, 它会在他们身上循环。
版本编号
乔卡遵循三大原则 SemVer。
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. (Preston-Warner, 2013)
构建元数据可以通过附加连字符和一系列点来表示。 修补程序或预发布后立即分离的标识符 版本。
生成版本如下RFC-1912 section 2.2:
The recommended syntax is YYYYMMDDnn (YYYY=year, MM=month, DD=day, nn=revision number. This won’t overflow until the year 4294” (Barr, 1996)
示例:1.23.4-2018033000:
- 主要版本1
- 次要版本23
- 补丁版本4
- 内部版本号2018033000=>;2018033000
请阅读以上链接或引文中的完整规范。
退出/错误代码使用^ {TT21} $的最佳逼近。
Code | errno.h | joca usage |
---|---|---|
2 | ENOENT | The file does not exist. |
5 | EIO | The output was not expected. |
13 | EACCES | Jira returned a 401 Not Authorized. |
22 | EINVAL | Supposed Lead cannot be made Project Lead. |
43 | EPROTONOSUPPORT | File failed schema validation. |
78 | ENOSYS | Required import is not installed. |
版权所有
JOCA – Jira On Call Assignee – Change project lead based on an ical event. Copyright (C) 2018 Bryce McNab
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
引文
Preston Warner,T.(2013年)。语义版本控制2.0.0。恢复 2017年11月27日,从https://semver.org/spec/v2.0.0.html
巴尔,D.(1996)。常见的DNS操作和配置错误。 2018年3月30日检索自 https://tools.ietf.org/html/rfc1912#section-2.2