为水母收集数据的代理

jf-agent的Python项目详细描述


JF U代理

可以在本地运行并收集要发送到Jellyfish的数据的代理。

用法

  1. 在python 3环境中,使用pip
  2. 安装jf_代理
pip install jf_agent

或者,取决于python环境的设置方式,

pip3 install jf_agent
  1. 为吉拉:收集你的吉拉证书。您将需要一个jira用户名和对正确项目的读取权限,以及该用户的密码。

  2. 使用jira凭据设置环境变量。将JIRA_USERNAMEJIRA_PASSWORD设置为上面找到的用户名和密码。

  3. 对于Bitbucket:收集您的Bitbucket凭据。将BITBUCKET_USERNAMEBITBUCKET_PASSWORD环境变量设置为适当的值。

  4. 对于github:创建个人访问令牌(https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)。将GITHUB_TOKEN环境变量设置为令牌的内容。

  5. 创建一个yaml配置文件,告诉jf_代理如何运行。示例配置文件可以是:

global:
  # Location to put output files
  out_dir: /tmp/agent

  # Set this to True to skip verification of server SSL certificates.  This might
  # be useful if your Jira / Bitbucket server doesn't have a valid SSL certificate.
  no_verify_ssl: False

jira:
  # URL to jira
  url: https://jira.yourcompany.com

  # Uncomment this to print the list of available fields and exit
  # print_fields_only: True

  # GDPR mode: enable this if your Jira instance's API has User
  # endpoints modified in order to support GDPR.  This should be True
  # for Atlassian Cloud hosted JIRA as of March 30, 2019.
  gdpr_active: False
  
  # only pull issues from specific projects.  Comment this out
  # to pull issues from all projects.
  include_projects:
    - PROJ1
    - PROJ2

  # Uncomment this to pull issues from all but specific projects.
  # exclude_projects:
  #   - PROJ1

  # Uncomment to pull issues from specific project categories only.
  # include_project_categories:
  #   - Engineering

  # Uncomment this to pull issues from all but specific project categories.
  # exclude_project_categories:
  #   - Support

  # Uncomment this to pull only issues matching a specific JQL filter
  # issue_jql: 'text ~ pattern and issuetype != "Secret Type"'

  # Uncomment this to pull only specific fields on issues.
  # include_fields:
  #   - id
  #   - summary

  # Uncomment this to pull all but specific fields on issues.
  # exclude_fields:
  #   - description
  #   - comment


git:
  # supported providers are `bitbucket_server` and `github`
  provider: bitbucket_server
  
  # URL to bitbucket or github.  For github cloud, this should be https://api.github.com; otherwise, use the URL to your local git server.
  url: https://bitbucket.yourcompany.com
  
  # only pull from specific projects / organizations.  Required for github; comment this out to pull from all projects for bitbucket server.
  include_projects:
      - PROJ1
      
  # Uncomment this to pull from all but specific projects (not supported for github).
  #  exclude_projects:
  #    - PROJ1
      
  # only pull from specific repos.  Comment this out to pull from all repos.
  include_repos:
      - my_repository
      
  # Uncomment this to pull from all but specific repos.
  # exclude_repos:
  #    - repo_to_skip
      
  # Strip out long-form text content (commit messages, PR text, etc)
  strip_text_content: False
  
  # Redact names and URLs for projects, repos, branches
  redact_names_and_urls: False
  1. 使用配置文件的路径运行jf_agent,可以选择指定提取git数据的时间限制:
jf_agent -c jellyfish.yml [--since 2018-01-01] [--until 2019-04-02]
  1. 从指定的输出目录中收集生成的文件,并将它们发送到水母。

字段

可以将代理配置为从 吉拉。例如,如果某些字段包含 不想发送给水母的敏感数据。

这可以通过include_fieldsexclude_fields来控制。 配置文件中的选项。但是,请注意,某些字段必须按顺序排列 让水母工作。这些必需字段是:

issuekey
project
reporter
assignee
creator
issuetype
resolution
resolutiondate
status
created
updated
subtasks

一些jira敏捷特性是在水母使用的“自定义域”内部构建的。这些 自定义字段具有形式为customfield_XXXXX的键,但其中由x表示的数字 在每个jira安装中都是不同的。你可以找到定制的钥匙 通过在配置文件中使用print_fields_only选项运行代理来获取字段。习俗 水母使用的字段如下:

Epic Link
Epic Name
Sprint
Parent Link
Story Points
Rank

确保至少为水母配置了这些字段。

如果拉动以下字段,则会启用其他水母功能:

summary
description
priority
worklog
comment
timetracking
duedate
labels
fixVersions
versions
components
timeestimate
timeoriginalestimate
timespent
aggregatetimespent
aggregatetimeoriginalestimate
aggregatetimeestimate

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何下载多个。java中的PDF文件   linux Java打开文件,形成实际用户主页~/   java如何在时间线内维护TableView选择?   java Hibernate注释@Where vs@WhereJoinTable   Java读/写访问异常FileNotFoundException(访问被拒绝)   继承在Java中是否可以扩展最后一个类?   Android HttpClient使用java使应用程序崩溃。lang.OutOfMemoryError:pthread_create   java为什么即使我在proguardproject中添加了jar文件,也会出现这种错误。txt?   如果添加JButton,swing Java FocusListener和KeyListener将无法工作   java使用solrj检索json格式的SolrDocument   使用Microsoft Visual Studio代码进行Java编程   java NoClassDefFoundError:org/apache/log4j/Logger   哈希集中包含相等对象的java   java中的参数化构造函数是否需要有一个主体?   java类似于NetBeans不必要的代码检测器   Java实践问题   java Blackberry“[projectname].调试文件丢失”和“I/O错误:找不到程序”jar