X Tutup
Skip to content

Commit 2edab98

Browse files
authored
Auto update lib status (#7074)
1 parent f594b0a commit 2edab98

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Updated libs status
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "Lib/**"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
issues: write
14+
15+
env:
16+
PYTHON_VERSION: "v3.14.3"
17+
ISSUE_ID: "6839"
18+
19+
jobs:
20+
update-issue:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Clone RustPython
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
path: rustpython
27+
persist-credentials: "false"
28+
sparse-checkout: |-
29+
Lib
30+
scripts/update_lib
31+
32+
33+
- name: Clone CPython ${{ env.PYTHON_VERSION }}
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
with:
36+
repository: python/cpython
37+
path: cpython
38+
ref: ${{ env.PYTHON_VERSION }}
39+
persist-credentials: "false"
40+
sparse-checkout: |
41+
Lib
42+
43+
- name: Get current date
44+
id: current_date
45+
run: |
46+
now=$(date +"%Y-%m-%d %H:%M:%S")
47+
echo "date=$now" >> "$GITHUB_OUTPUT"
48+
49+
- name: Write body prefix
50+
run: |
51+
cat > body.txt <<EOF
52+
53+
<!--
54+
THIS BODY IS AUTO-GENERATED. DO NOT EDIT MANUALLY!
55+
-->
56+
57+
## Summary
58+
59+
Check \`scripts/update_lib\` for tools. As a note, the current latest Python version is \`${{ env.PYTHON_VERSION }}\`.
60+
61+
Previous versions' issues as reference
62+
- 3.13: #5529
63+
64+
<!--
65+
Quick guideline for Copilot:
66+
# Clone \`github.com/python/cpython\` \`${{ env.PYTHON_VERSION }}\` tag under RustPython working dir with depth 1 option; never 3.14.0 or 3.14.1 or 3.14.2
67+
# Pick a library or test to update. Probably user give one.
68+
# Run \`python3 scripts/update_lib quick <name>\`
69+
# A commit is automatically created. push the commit.
70+
# Do not include keywords that automatically close an issue (e.g., Fix, Close, Resolve) next to an issue link or issue number.
71+
-->
72+
73+
## Details
74+
75+
${{ steps.current_date.outputs.date }}
76+
\`\`\`shell
77+
$ python3 scripts/update_lib todo --done
78+
\`\`\`
79+
EOF
80+
81+
- name: Run todo
82+
run: python3 rustpython/scripts/update_lib todo --cpython cpython --lib rustpython/Lib --done >> body.txt
83+
84+
- name: Update GH issue
85+
run: gh issue edit ${{ env.ISSUE_ID }} --body-file ../body.txt
86+
env:
87+
GH_TOKEN: ${{ github.token }}
88+
working-directory: rustpython
89+
90+

0 commit comments

Comments
 (0)
X Tutup