Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Script] Release helper #25754

Merged
merged 136 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 135 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
a4c6645
update for Go
msyyc Nov 26, 2021
d96f9e1
check tag consistency and optize reply
msyyc Nov 26, 2021
29dcc3b
add write.md
RAY-316 Nov 30, 2021
7c41af8
update go js readme
RAY-316 Nov 30, 2021
971b310
Merge pull request #27 from msyyc/helper-update-1
RAY-316 Nov 30, 2021
bdeabc3
update
RAY-316 Nov 30, 2021
3d466ae
Merge pull request #28 from msyyc/helper-update-1
RAY-316 Nov 30, 2021
c0ab72f
Update common.py
RAY-316 Nov 30, 2021
ba7d785
Update common.py
RAY-316 Dec 1, 2021
6231625
update assignee for JS
msyyc Dec 1, 2021
41190c6
update
RAY-316 Dec 1, 2021
46c273e
Merge pull request #29 from RAY-316/helper-update-2
RAY-316 Dec 1, 2021
d5ca1dc
update
RAY-316 Dec 1, 2021
8a44300
Merge pull request #30 from RAY-316/helper-update-2
RAY-316 Dec 1, 2021
7110dbb
Update common.py
RAY-316 Dec 1, 2021
32bc8ef
Update common.py
RAY-316 Dec 1, 2021
e76d3ab
Update release_helper.yml for Azure Pipelines
RAY-316 Dec 1, 2021
5c4b139
Update common.py
RAY-316 Dec 1, 2021
9230cc8
update
RAY-316 Dec 1, 2021
65cd109
Merge branch 'release-helper' into helper-update-2
RAY-316 Dec 1, 2021
e901ee2
Merge pull request #31 from RAY-316/helper-update-2
RAY-316 Dec 1, 2021
0708059
Update common.py
RAY-316 Dec 1, 2021
3ae9739
Update common.py
RAY-316 Dec 1, 2021
4726a30
Update main.py
RAY-316 Dec 1, 2021
910e856
update
RAY-316 Dec 2, 2021
a97639a
Merge branch 'release-helper' into helper-update-2
RAY-316 Dec 2, 2021
6053c72
update bot advice
RAY-316 Dec 2, 2021
672f312
Merge branch 'helper-update-2' of https://github.com/msyyc/azure-sdk-…
RAY-316 Dec 2, 2021
be9e9bc
update
RAY-316 Dec 2, 2021
eb3875e
update
msyyc Dec 15, 2021
cbba97b
update excel
msyyc Dec 15, 2021
578d349
update output function
msyyc Dec 16, 2021
9648164
add exception handle for bad credential
msyyc Dec 16, 2021
cd06868
fix static varaible in class
msyyc Dec 16, 2021
9a79019
update auto_assignee algorithm
msyyc Dec 16, 2021
6b6c7de
merge main
msyyc Dec 16, 2021
baaa568
update bot token to have a try
msyyc Dec 22, 2021
2f8b301
update bot token
msyyc Dec 22, 2021
c914ef8
force to single process
msyyc Dec 22, 2021
04f1cab
test
BigCat20196 Mar 17, 2022
50a757d
test
BigCat20196 Mar 17, 2022
27dca4f
test
BigCat20196 Mar 17, 2022
ec25604
Merge branch 'main' into release-helper
BigCat20196 Mar 17, 2022
11afaaa
test
BigCat20196 Mar 17, 2022
6ad173c
Merge branch 'release-helper' of https://github.com/msyyc/azure-sdk-f…
BigCat20196 Mar 17, 2022
1b4959d
fix bug
BigCat20196 Mar 17, 2022
032ac00
fix
BigCat20196 Mar 17, 2022
f407d8b
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Mar 29, 2022
08c51a0
update release_helper/js
BigCat20196 Mar 29, 2022
b854175
update release_helper/js
BigCat20196 Mar 29, 2022
3db56d9
fix bug
BigCat20196 Mar 29, 2022
a5f2697
update release helper
BigCat20196 Mar 30, 2022
59ca186
Update js.py
BigCat20196 Mar 30, 2022
f3f66c2
Update js.py
BigCat20196 Mar 30, 2022
1a79e89
Update js.py
msyyc Mar 30, 2022
663250d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Apr 8, 2022
3cadc34
urldecode
BigCat20196 Apr 8, 2022
7fe5dda
format
BigCat20196 Apr 8, 2022
495c673
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jun 9, 2022
1d7b492
add python
BigCat20196 Jun 9, 2022
1a7ea45
fix
BigCat20196 Jun 9, 2022
38c743b
add package name
BigCat20196 Jun 9, 2022
fbd6688
update package name
BigCat20196 Jun 9, 2022
80176c7
update package name
BigCat20196 Jun 9, 2022
751f1d9
fix bug
BigCat20196 Jun 9, 2022
fba6456
update get edit_content
BigCat20196 Jun 10, 2022
e4dcb02
auto-close
BigCat20196 Jun 10, 2022
98acf92
record release
BigCat20196 Jun 13, 2022
59a156b
debug
BigCat20196 Jun 13, 2022
d7f4fca
debug
BigCat20196 Jun 13, 2022
c338d58
debug
BigCat20196 Jun 13, 2022
7d04c42
override run
BigCat20196 Jun 13, 2022
195d661
init readme link
BigCat20196 Jun 13, 2022
b182787
fix
BigCat20196 Jun 13, 2022
0596363
fix
BigCat20196 Jun 13, 2022
7b11ace
fix
BigCat20196 Jun 13, 2022
373c12b
update assignee_token and auto-close
BigCat20196 Jun 20, 2022
7a32e05
fix
BigCat20196 Jun 20, 2022
4cacd5f
debug
BigCat20196 Jun 21, 2022
081e2ad
fix
BigCat20196 Jun 21, 2022
b07eb2e
auto-reply
BigCat20196 Jun 21, 2022
f8e4719
fix
BigCat20196 Jun 21, 2022
aef1947
debug
BigCat20196 Jun 21, 2022
b0b63ef
fix
BigCat20196 Jun 21, 2022
d1d4799
debug
BigCat20196 Jun 22, 2022
d74825f
debug
BigCat20196 Jun 22, 2022
a8f4308
fix
BigCat20196 Jun 22, 2022
87f2ebe
debugg
BigCat20196 Jun 22, 2022
4fce70c
update yaml
BigCat20196 Jun 23, 2022
b01e55d
change to add_label
BigCat20196 Jun 23, 2022
9d18dfe
format
BigCat20196 Jun 23, 2022
2f28e57
add attention policy and remind policy
BigCat20196 Jun 24, 2022
bb06dfd
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jun 24, 2022
85330b5
add duplicated policy
BigCat20196 Jun 27, 2022
65e5deb
delete uesless code
BigCat20196 Jun 27, 2022
788a451
Update scripts/release_helper/utils.py
BigCat20196 Jun 28, 2022
d1fc233
update
BigCat20196 Jun 28, 2022
7e2ddb5
fix dependence version
BigCat20196 Jun 28, 2022
388b373
fix dependence version
BigCat20196 Jun 28, 2022
b7eb450
fix env
BigCat20196 Jun 28, 2022
2ee48d1
update js assignee
BigCat20196 Jun 28, 2022
07509ad
update js assignee
BigCat20196 Jun 28, 2022
1d5f58a
fix find pr number bug
BigCat20196 Jun 29, 2022
603e3a7
update assignee logic
BigCat20196 Jun 29, 2022
9425655
debug
BigCat20196 Jun 29, 2022
e8afcf3
debug
BigCat20196 Jun 29, 2022
9a89bbe
update python assignee
BigCat20196 Jun 29, 2022
9290c64
Update python.py
msyyc Jun 30, 2022
6edbe7a
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jul 6, 2022
055c2e7
debug
BigCat20196 Jul 6, 2022
0c7744f
debug
BigCat20196 Jul 6, 2022
5642eab
delete useless code
BigCat20196 Jul 6, 2022
4918eee
Update scripts/release_helper/python.py
BigCat20196 Jul 6, 2022
9929de2
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jul 7, 2022
c5d19c8
add multi api policy
BigCat20196 Jul 7, 2022
53d15db
add tag inconsystency
BigCat20196 Jul 8, 2022
8483a4d
add specified tag
BigCat20196 Jul 11, 2022
891784b
Update scripts/release_helper/python.py
BigCat20196 Jul 12, 2022
069def5
update
BigCat20196 Jul 12, 2022
a719856
update multiapi policy
BigCat20196 Jul 12, 2022
55e6ebb
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jul 21, 2022
a85c4e5
update on time
BigCat20196 Jul 21, 2022
ee0e9b3
Update python.py
BigCat20196 Jul 21, 2022
067ebca
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
BigCat20196 Jul 22, 2022
455b43d
add version and is_stable
BigCat20196 Jul 22, 2022
ed871de
Merge https://github.com/Azure/azure-sdk-for-python into HEAD
msyyc Aug 9, 2022
60569bd
update assignee
msyyc Aug 9, 2022
72cc2d3
fix confilct
BigCat20196 Aug 17, 2022
d9fc3f0
add rest repo hash
BigCat20196 Aug 17, 2022
ff9f029
debug
BigCat20196 Aug 17, 2022
6a042e7
Update utils.py
BigCat20196 Aug 18, 2022
5d7ac76
Update python.py
BigCat20196 Aug 18, 2022
ef018d1
update
BigCat20196 Aug 18, 2022
5507ce8
update
BigCat20196 Aug 18, 2022
881a22f
update
BigCat20196 Aug 18, 2022
8df0eb8
update
BigCat20196 Aug 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions scripts/release_helper/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,30 @@ def __init__(self, issue_package: IssuePackage, request_repo_dict: Dict[str, Rep
self.is_multiapi = False
self.pattern_resource_manager = re.compile(r'/specification/([\w-]+/)+resource-manager')
self.delay_time = self.get_delay_time()
self.is_specified_tag = False
self.specified_tag = ''
BigCat20196 marked this conversation as resolved.
Show resolved Hide resolved
self.rest_repo_hash = ''

def get_delay_time(self):
q = [comment.updated_at
for comment in self.issue_package.issue.get_comments() if comment.user.login not in self.language_owner]
q.sort()
return (datetime.now() - (self.created_time if not q else q[-1])).days

def get_tag_and_hash(self, issue_body_list: List):
for line in issue_body_list:
if '->Readme Tag:' in line:
self.specified_tag = line.split(":", 1)[-1].strip()
if '->hash:' in line:
self.rest_repo_hash = line.split(":", 1)[-1].strip()

def init_readme_link(self) -> None:
issue_body_list = self.get_issue_body()

# Get the origin link and readme tag in issue body
origin_link, self.target_readme_tag = get_origin_link_and_tag(issue_body_list)
self.is_specified_tag = any('->Readme Tag:' in line for line in issue_body_list)

# Get the specified tag and rest repo hash in issue body
self.get_tag_and_hash(issue_body_list[:5])
BigCat20196 marked this conversation as resolved.
Show resolved Hide resolved

# get readme_link
self.get_readme_link(origin_link)
Expand Down Expand Up @@ -93,11 +103,11 @@ def auto_reply(self) -> None:
if not self.readme_comparison:
issue_link = self.issue_package.issue.html_url
release_pipeline_url = get_python_release_pipeline(self.output_folder)
python_tag = self.target_readme_tag if self.is_specified_tag else ""
res_run = run_pipeline(issue_link=issue_link,
pipeline_url=release_pipeline_url,
spec_readme=self.readme_link + '/readme.md',
python_tag=python_tag
python_tag=self.specified_tag,
rest_repo_hash=self.rest_repo_hash
)
if res_run:
self.log(f'{issue_number} run pipeline successfully')
Expand Down
6 changes: 5 additions & 1 deletion scripts/release_helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_python_release_pipeline(output_folder):


# Run sdk-auto-release(main) to generate SDK
def run_pipeline(issue_link, pipeline_url, spec_readme, python_tag=""):
def run_pipeline(issue_link, pipeline_url, spec_readme, python_tag="", rest_repo_hash=""):
paramaters = {
"stages_to_skip": [],
"resources": {
Expand Down Expand Up @@ -102,6 +102,10 @@ def run_pipeline(issue_link, pipeline_url, spec_readme, python_tag=""):
"PYTHON_TAG": {
"value": python_tag,
"isSecret": False
},
"REST_REPO_HASH": {
"value": rest_repo_hash,
"isSecret": False
}
}
}
Expand Down