为水母收集数据的代理

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 Spring freemarker多模板加载程序路径   在java插件中从控制台获取输入   java在包中创建继承类   网页抓取Java Jsoup网页抓取   java在线程内创建一个对象,而true条件具有相同的引用   java如何根据空格数拆分字符串   java新的安卓 studio更新中的配置文件“app”是什么?   java在将ArrayList写入/读取到文件时出现奇怪的问题   java Reg替换文本块第一次出现+最后一次出现   java当我单击任何RecyclerView列表项时,如何在MainActivity的EditText中显示特定的单击项?   JAVA XML删除节点仅删除第一个外观   java如何在数组中查找特定值   java SVG/矢量图形对象布尔运算(并集、交集、减法)   java在Android中创建线程需要多长时间   尝试从JBOSS联系Oracle LDAP服务器时发生java连接重置异常   java基于参数获取特定的实现实例   使用java就地修改文件内容   java MonetaryException:未加载MonetaryAmountsSingletonSpi   java接受用户的不同输入并使其触发完全相同的代码段的最短方法是什么   Spring 3.2.8应用程序中未找到java HTTP 404错误