From d33f153641e156029c1b05a230612360f7d53a50 Mon Sep 17 00:00:00 2001 From: Ronnie_Jiang Date: Mon, 15 Mar 2021 18:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96index=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=88=86=E6=94=AF=E6=A0=A1=E9=AA=8C=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=88=B7=E6=96=B0README.en.md=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 33 ++++++++++++++++++++++++--------- advisors/issue_report.py | 8 +++++--- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/README.en.md b/README.en.md index 5fc6381f..d6e4df60 100644 --- a/README.en.md +++ b/README.en.md @@ -9,12 +9,12 @@ Collection of automation tools for easily maintaining openEuler | | 1.2 Best Version | release note、test、user feedback | newest/stable/official/compatible version | | | | 1.3 Best Version Notify | issue/PR | auto issue/PR | | | 2.Package | 2.1 Meta data | summary, deps ... | from spec, from other package system | | -| | 2.2 Check Old Patch (while updating) | drop upstreamed patch; check conflict | | -| | 2.3 Python to RPM | way to build python package by pip | turn pip to rpm | | -| 3.Modify | 3.1 CVE & CVE official fix | CVE notify & official patch/commit | | +| | 2.2 Check Old Patch (while updating) | drop upstreamed patch; check conflict | | +| | 2.3 Python to RPM | way to build python package by pip | turn pip to rpm | | +| 3.Modify | 3.1 CVE & CVE official fix | CVE notify & official patch/commit | | | | 3.2 Patch upstream | upstream bugzilla/git URL | auto bugzilla/PR | | | 4.Test | 4.1 Upstream Test & Feedback | upstream test entry & feedback channel | standard test entry & auto feedback | | -| 5.Release | TODO | | | +| 5.Release | TODO | | | ## Software Metadata @@ -62,7 +62,7 @@ DONE! than you can create a Pull Request. yum install rpmdevtools (ver>=8.3) pip3 install beautifulsoup4 (ver>=4.9.3) yum install yum-utils (ver>=1.1.31) - + ##### 2. json file config ~/.gitee_personal_token.json content format: {"user":"user_name","access_token":"token_passwd"} @@ -82,13 +82,13 @@ DONE! than you can create a Pull Request. ##### 1. simple_update_robot.py single package auto-upgrade: python3 simple_update_robot.py -u pkg pkg_name branch_name [-n new_version] ep: python3 simple_update_robot.py -u pkg snappy master - + single package manual upgrade: python3 simple_update_robot.py pkg_name branch_name [-fc] [-d] [-s] [-n new_version] [-b] [-p] ep: python3 simple_update_robot.py snappy openEuler-20.03-LTS -fc -d -s -n 1.8.1 multi-packages in a repo auto-upgrade: python3 simple_update_robot.py -u repo repo_name branch_name ep: python3 simple_update_robot.py -u repo src-openeuler master - + you can config local yaml for auto upgrade, such as: upgrade-example.yaml repositories: - name: A-Tune @@ -105,11 +105,26 @@ DONE! than you can create a Pull Request. ##### 2. oa_upgradable.py display all tags of target package: python3 oa_upgradable.py pkg_name ep: python3 oa_upgradable.py glibc + +##### 3. issue_report.py + + Automatically generates issue and CVE management forms (CSV) and result reports (Markdown), based on the openEuler version. + + useage: + ```bash + python3 issue_report.py -milestone "openEuler 20.03-LTS" "openEuler 20.09" -branch "openEuler-21.03" "openEuler-20.09" -outpath /Users/lilu/Downloads + ``` + option: + > -milestone: openEuler' milestion, multiple inputs supported(e.g., "openEuler-21.03", "openEuler 21.03-RC1"). + > -branch: src-openEuler branches name, multiple inputs supported (e.g., "openEuler-21.03", "openEuler-20.09"). + > -outpath: output path for version control reports and release reports + #### Consultation for advisors: if any problem, please contact: licihua@huawei.com/zwfeng@huawei.com/shanshishi@huawei.com - - + + +​ ## Contribution 1. Fork the repository diff --git a/advisors/issue_report.py b/advisors/issue_report.py index f40800ae..5c7df267 100644 --- a/advisors/issue_report.py +++ b/advisors/issue_report.py @@ -19,7 +19,9 @@ CMD_INPUT_ARGS = sys.argv[1:] def _to_markdown(df: pd.DataFrame, index=False): - cols = df.columns + cols = list(df.columns) + if index: + cols.insert(0, "index") title = "|" + "|".join(str(col) for col in cols) + "|\n" under_title = "|" + "---|" * len(cols) + "\n" @@ -27,7 +29,7 @@ def _to_markdown(df: pd.DataFrame, index=False): for idx, row in df.iterrows(): curr_row = list(str(r) for r in row) if index: - curr_row.insert(idx) + curr_row.insert(0, str(idx)) content += "|" + "|".join(curr_row) + "|\n" return title + under_title + content @@ -281,7 +283,7 @@ def generate_md(issue_sources, cve_sources, output_path): elif response.get("type") == "缺陷" and response.get("state") == "open": todo_issue_id.append(response.get("issue_id", "暂无相应信息")) todo_issue_title.append(response.get("issue_title", "暂无相应信息")) - effect.append(response.get("description", "暂无相应信息")) + effect.append("") todo_version.append(response.get("milestone", "暂无相应信息")) dataframe_feature = pd.DataFrame( -- Gitee