为水母收集数据的代理

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第三方库


热门话题
javajavax。艾尔。PropertyNotFoundException:   java为什么通过TCP发送的文件比它本身包含的文件包含更多的数据?   java为什么字符开关/案例不起作用?   php到java连接器,在哪里可以找到好的连接器   需要帮助Java简单规则形状面积计算器和if语句吗   macos如何从newstyle Oracle Java OSX捆绑包结构启动帮助页?   java既然所有的类都扩展对象,而对象是一个类,那么对象如何扩展对象呢?   java从JavaPairdd<String,Tuple2<Integer,Integer>>转换为JavaPairdd<String,Integer>   java微调器值未从一个活动传递到另一个活动   参数化类型的java数组   java不提供类。getCanonicalName是否存在性能问题?   java输入键JTextField   为什么我不能在java中调用nextLine()方法两次?   JTextPane中的java JProgressBar   java如何获取Crudepository实例?   用于提取几个<div>标记的java正则表达式   java如何使用JUnit Testrunner生成html图像   Go中Java静态属性的等价性