mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Switch to `team-triage
` for auto triage assignments
This commit is contained in:
parent
ec7203d346
commit
29dc3e093d
2 changed files with 6 additions and 2 deletions
|
@ -42,6 +42,10 @@ def get_triage_next_account(options):
|
|||
if previous_account and previous_account.login == last_account_assigned:
|
||||
return member
|
||||
previous_account = member
|
||||
else:
|
||||
# The previously assigned account is not longer part of the team members
|
||||
# or the team was switched
|
||||
return random.choice(team_members)
|
||||
|
||||
|
||||
def label_and_assign_issue(options):
|
||||
|
@ -85,7 +89,6 @@ def main():
|
|||
|
||||
if not os.environ.get("GITHUB_TOKEN"):
|
||||
parser.exit(status=1, message="GITHUB_TOKEN environment variable not set")
|
||||
sys.exit(1)
|
||||
if not os.environ.get("READ_ORG_TOKEN"):
|
||||
parser.exit(status=1, message="READ_ORG_TOKEN environment variable not set")
|
||||
|
||||
|
@ -97,6 +100,7 @@ def main():
|
|||
)
|
||||
if CACHE_FILENAME.parent.is_dir() is False:
|
||||
CACHE_FILENAME.parent.mkdir()
|
||||
|
||||
try:
|
||||
label_and_assign_issue(options)
|
||||
parser.exit(0)
|
||||
|
|
2
.github/workflows/triage.yml
vendored
2
.github/workflows/triage.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
|||
python .github/workflows/scripts/label-and-assign.py \
|
||||
--org ${{ github.repository_owner }} \
|
||||
--repo ${{ github.event.repository.name }} \
|
||||
--team team-core \
|
||||
--team team-triage \
|
||||
--label needs-triage \
|
||||
--issue ${{ github.event.issue.number }}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue