Skip to content

Commit 9002fb1

Browse files
BigCat20196msyyc
andauthored
[Script] Release issue status (Azure#24881)
* add assignee * update function * fix bug * delete old code * fix bug * fix bug * fix pipeline id * fix auto-ask-check bug * update sdk administrators * fix utils * Set up CI with Azure Pipelines [skip ci] * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update main.py * Update main.py * urldecode * test * test * test * Update reply_generator.py * add zb to assignee * fix * fix * fix * Update main.py * update * fix Co-authored-by: Yuchao Yan <[email protected]>
1 parent 3d44fe1 commit 9002fb1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

scripts/release_issue_status/main.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
_NULL = ' '
1616
_FILE_OUT = 'release_issue_status.csv'
1717
_FILE_OUT_PYTHON = 'release_python_status.md'
18-
_PYTHON_SDK_ADMINISTRATORS = ['msyyc', 'BigCat20196', 'azure-sdk']
19-
_PYTHON_SDK_ASSIGNEES = ['BigCat20196', 'msyyc']
20-
_ASSIGNER_DICT = {'BigCat20196': os.getenv('JF_TOKEN'),
21-
'msyyc': os.getenv('TOKEN')}
18+
_PYTHON_SDK_ADMINISTRATORS = ['msyyc', 'BigCat20196', 'azure-sdk', 'Wzb123456789']
19+
_PYTHON_SDK_ASSIGNEES = ['BigCat20196', 'Wzb123456789']
20+
_ASSIGNER_DICT = {'azure-sdk': os.getenv('AZURESDK_BOT_TOKEN')}
2221
logging.basicConfig(level=logging.INFO,
2322
format='[auto-reply log] - %(funcName)s[line:%(lineno)d] - %(levelname)s: %(message)s')
2423

@@ -145,7 +144,7 @@ def _latest_comment_time(comments, delay_from_create_date):
145144

146145
def auto_reply(item, request_repo, rest_repo, duplicated_issue, python_piplines, assigner_repoes):
147146
logging.info("new issue number: {}".format(item.issue_object.number))
148-
assigner_repo = assigner_repoes[item.assignee]
147+
assigner_repo = assigner_repoes['azure-sdk']
149148
if 'auto-link' not in item.labels:
150149
item.issue_object.add_to_labels('auto-link')
151150
try:
@@ -242,7 +241,7 @@ def main():
242241
# rule7: if delay from created date is over 15 days and owner never reply, remind owner to handle it.
243242
for item in issue_status:
244243
if item.language == 'Python':
245-
assigner_repo = assigner_repoes[item.assignee]
244+
assigner_repo = assigner_repoes['azure-sdk']
246245
item.issue_object = assigner_repo.get_issue(number=item.issue_object.number)
247246
issue_status_python.append(item)
248247
if item.status == 'release':

scripts/release_issue_status/release_issue_status.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ schedules:
2222
always: true
2323

2424
variables:
25+
- group: Release Secrets for GitHub
2526
- group: Azure SDK Auto Release Pipeline Secrets
2627
- group: SDK Release Helper
2728

@@ -53,6 +54,7 @@ jobs:
5354
export TOKEN=$(Yuchao-GitToken)
5455
export PIPELINE_TOKEN=$(PIPELINE-TOKEN)
5556
export JF_TOKEN=$(Jiefeng-GitToken)
57+
export AZURESDK_BOT_TOKEN=$(azuresdk-github-pat)
5658
5759
# create virtual env
5860
python -m venv venv-sdk

0 commit comments

Comments
 (0)