smartpush 1.0.1__tar.gz → 1.0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartpush
3
- Version: 1.0.1
3
+ Version: 1.0.1.2
4
4
  Summary: 用于smartpush自动化测试工具包
5
5
  Author: 卢泽彬、邵宇飞、周彦龙
@@ -0,0 +1,23 @@
1
+ # SmartPush_AutoTest
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ ## 打包/上传的依赖
8
+ ```
9
+ pip install wheel
10
+ pip install twine
11
+ ```
12
+
13
+
14
+ ## 打包-打包前记得修改版本号
15
+ ```
16
+ python setup.py sdist bdist_wheel
17
+ ```
18
+
19
+
20
+ ## 上传到pipy的命令
21
+ ```
22
+ twine upload dist/*
23
+ ```
File without changes
File without changes
@@ -0,0 +1,64 @@
1
+ from jira import JIRA
2
+
3
+
4
+ def get_custom_fields(jira):
5
+ all_fields = jira.fields()
6
+ # print(all_fields)
7
+ custom_fields = {}
8
+ for field in all_fields:
9
+ try:
10
+ # print(field)
11
+ if field.get('custom'):
12
+ if field['scope']['project']['id'] == '10559':
13
+ custom_fields[field['id']] = field['name']
14
+ except:
15
+ continue
16
+ print(custom_fields)
17
+ return custom_fields
18
+
19
+
20
+ if __name__ == '__main__':
21
+ api_key = "ATATT3xFfGF0YeIApQYdm4c671OUkhg5ggVISNgIb0D1Iqpd2dwwunzff98Pc5VQjb74ZN997uXvvxi6LpmNGJx1kW1BLh5AaudMj5RuWTe6uozsGqGpx_QkySeU2HF-JB37kkza9PREOpOSbiDFZxrI0eqYPV9Fe-bJP0RM16V_GSyDPib0wmw=FE3DE2B1"
22
+
23
+ # Jira 服务器的 URL
24
+ jira_url = "https://shopline.atlassian.net/"
25
+ # Jira API 密钥
26
+ jira_api_key = api_key
27
+ # Jira 用户名
28
+ jira_user = "lu.lu@shopline.com"
29
+
30
+ # 连接到 Jira 服务器
31
+ jira = JIRA(server=jira_url, basic_auth=(jira_user, jira_api_key))
32
+
33
+ # 获取一个项目的信息
34
+ project_key = 10559 # 替换为你想要获取的项目的 key
35
+ project = jira.project(project_key)
36
+ print(f"Project: {project.key} - {project.name}")
37
+
38
+ all_fields = jira.fields()
39
+ # print(all_fields)
40
+
41
+ # 获取项目的问题
42
+ issues = jira.search_issues(f"project={project_key}")
43
+ issue = jira.issue(issues[0])
44
+ # print("Issue Key:", issue.key)
45
+ # print("Summary:", issue.fields.summary)
46
+ # # print("Description:", issue.fields.description)
47
+ # print("Assignee:", issue.fields.assignee.displayName if issue.fields.assignee else "Unassigned")
48
+ # print("Reporter:", issue.fields.reporter.displayName)
49
+ # print("Status:", issue.fields.status.name)
50
+ # print("Priority:", issue.fields.priority.name)
51
+ # print("Created:", issue.fields.created)
52
+ # print("Updated:", issue.fields.updated)
53
+ # print("Due Date:", issue.fields.duedate)
54
+ # print("Labels:", issue.fields.labels)
55
+ # print("Components:", [component.name for component in issue.fields.components])
56
+ # print(issue.fields.__dict__.items())
57
+ custom_fields = get_custom_fields(jira)
58
+ for field_name, field_value in issue.fields.__dict__.items():
59
+ try:
60
+ # if field_name.startswith("customfield_"):
61
+ # continue
62
+ print(f"Custom Field ID: {field_name}, NAME:{custom_fields[field_name]}, Value: {field_value}")
63
+ except:
64
+ continue
@@ -0,0 +1,13 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='smartpush',
5
+ version='1.0.1.2',
6
+ description='用于smartpush自动化测试工具包',
7
+ author='卢泽彬、邵宇飞、周彦龙',
8
+ packages=find_packages(),
9
+ install_requires=[
10
+ # List your package's dependencies here
11
+ # TODO
12
+ ],
13
+ )
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartpush
3
- Version: 1.0.1
3
+ Version: 1.0.1.2
4
4
  Summary: 用于smartpush自动化测试工具包
5
5
  Author: 卢泽彬、邵宇飞、周彦龙
@@ -0,0 +1,10 @@
1
+ README.md
2
+ setup.py
3
+ autotest/__init__.py
4
+ autotest/setup.py
5
+ autotest/get_jira_info/__init__.py
6
+ autotest/get_jira_info/get_jira_info.py
7
+ smartpush.egg-info/PKG-INFO
8
+ smartpush.egg-info/SOURCES.txt
9
+ smartpush.egg-info/dependency_links.txt
10
+ smartpush.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ autotest
@@ -1,5 +0,0 @@
1
- setup.py
2
- smartpush.egg-info/PKG-INFO
3
- smartpush.egg-info/SOURCES.txt
4
- smartpush.egg-info/dependency_links.txt
5
- smartpush.egg-info/top_level.txt
File without changes
File without changes