Package: joca
jocaJira On Call AssigneeCheck an ical url (files not supported yet) for current on call.PyPIInstallationpip install jocaConfiguration fileThe configuration holds 3 sections,local,jiraandprojects.localis for configuring logging.jirahouses the username, password and server url of the Jira
instance joca connects to.projectsis a list of objects that tell joca what project, what
ical and the regex to apply to the event summary to extract the users
name.Here is a basic configuration:{
    "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,formatis not required.local.logging.leveldoesn’t need to be uppercase.projects.#.keydoesn’t have to be uppercase, joca will handle
that.projectsis a list, so feel free to have multiple projects set up,
and it will loop over them.To doCheck out todo.txt for the basic list of to-do’s.todo.txt follows the syntax rules laid outhere.Version Numberingjoca follows the three major tenets ofSemVer.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, andPATCH 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)Build metadata MAY be denoted by appending a hyphen and a series of dot
separated identifiers immediately following the patch or pre-release
version.Build version followsRFC-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)Example:1.23.4-2018033000:Major version1Minor version23Patch version4Build number2018033000=>2018033000Please read the full spec at the link above or in the citations.Exit codesExit/Error codes use the best approximation fromerrno.h.Codeerrno.hjoca usage2ENOENTThe file does not exist.5EIOThe output was not expected.13EACCESJira returned a 401 Not Authorized.22EINVALSupposed Lead cannot be made Project Lead.43EPROTONOSUPPORTFile failed schema validation.78ENOSYSRequired import is not installed.CopyrightJOCA – Jira On Call Assignee – Change project lead based on an ical
event. Copyright (C) 2018 Bryce McNabThis 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, seehttp://www.gnu.org/licenses/.CitationsPreston-Warner, T. (2013).Semantic Versioning 2.0.0. Retrieved
November 27, 2017, fromhttps://semver.org/spec/v2.0.0.htmlBarr, D. (1996).Common DNS Operational and Configuration Errors.
Retrieved on March 30, 2018, fromhttps://tools.ietf.org/html/rfc1912#section-2.2