Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
63b3f780
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
41
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
63b3f780
编写于
6月 30, 2020
作者:
S
Shinwell Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup lint issue
上级
93a6343a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
32 deletion
+9
-32
advisors/check_upstream.py
advisors/check_upstream.py
+4
-29
advisors/gitee.py
advisors/gitee.py
+1
-1
advisors/oa_upgradable.py
advisors/oa_upgradable.py
+4
-2
未找到文件。
advisors/check_upstream.py
浏览文件 @
63b3f780
...
...
@@ -65,10 +65,10 @@ def dirty_redirect_tricks(url, resp):
if
line
.
startswith
(
"Redirecting"
):
eprint
(
"Redirecting with document.cookie"
)
need_trick
=
True
m
=
re
.
search
(
"document\.cookie=
\"
(.*)
\"
;"
,
line
)
m
=
re
.
search
(
r
"document\.cookie=\"(.*)\";"
,
line
)
if
m
:
cookie
=
cookie
|
set
(
m
.
group
(
1
).
split
(
';'
))
m
=
re
.
search
(
"document\.location\.href=
\"
(.*)
\"
;"
,
line
)
m
=
re
.
search
(
r
"document\.location\.href=\"(.*)\";"
,
line
)
if
m
:
href
=
m
.
group
(
1
)
new_url
=
urljoin
(
url
,
href
)
...
...
@@ -185,7 +185,7 @@ def __svn_resp_to_tags(resp):
def
__git_resp_to_tags
(
resp
):
tags
=
[]
pattern
=
re
.
compile
(
"^([^
\t
]*)[
\t
]*refs\/tags\/([^
\t
]*)"
)
pattern
=
re
.
compile
(
r
"^([^ \t]*)[ \t]*refs\/tags\/([^ \t]*)"
)
for
line
in
resp
.
splitlines
():
m
=
pattern
.
match
(
line
)
if
m
:
...
...
@@ -259,29 +259,4 @@ def check_svn(info):
if
__name__
==
"__main__"
:
pass
"""
def compare_tags (a, b)
arr_a = a.split(".")
arr_b = b.split(".")
len = [arr_a.length, arr_b.length].min
idx = 0
while idx < len do
res1 = arr_a[idx].to_i <=> arr_b[idx].to_i
return res1 if res1 != 0
res2 = arr_a[idx].length <=> arr_b[idx].length
return -res2 if res2 != 0
res3 = arr_a[idx][-1].to_i <=> arr_b[idx][-1].to_i
return res3 if res3 != 0
idx = idx + 1
end
return arr_a.length <=> arr_b.length
end
def sort_tags (tags)
tags.sort! { |a, b|
compare_tags(a,b)
}
return tags
end
"""
advisors/gitee.py
浏览文件 @
63b3f780
...
...
@@ -163,7 +163,7 @@ Yours openEuler-Advisor.
parameters
=
"state=open&sort=created&direction=desc&page=1&per_page=20"
return
self
.
get_gitee_json
(
issues_url
+
parameters
)
def
get_issue_comments
(
self
,
pkg
,
number
,
prj
=
"src-openeuler"
):
def
get_issue_comments
(
self
,
pkg
,
prj
=
"src-openeuler"
):
"""
Get comments of specific issue
"""
...
...
advisors/oa_upgradable.py
浏览文件 @
63b3f780
#!/usr/bin/python3
"""
This is a script to check upgradable information against upstream
"""
from
pyrpm.spec
import
Spec
,
replace_macros
import
yaml
...
...
@@ -37,7 +39,7 @@ if __name__ == "__main__":
current_version
=
replace_macros
(
s_spec
.
version
,
s_spec
)
print
(
"Checking "
,
prj_name
)
print
(
"current version is "
,
current_version
)
print
(
"current version is "
,
current_version
)
try
:
prj_info_string
=
gitee
.
get_yaml
(
prj_name
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录