Skip to content

Commit c29db65

Browse files
authored
[AMORO-3651] Add auto assign action for issues (#3652)
1 parent c1702c2 commit c29db65

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/take.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Assign the issue via a `take` comment
19+
on:
20+
issue_comment:
21+
types: created
22+
23+
permissions:
24+
issues: write
25+
26+
jobs:
27+
issue_assign:
28+
if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/github-script@v7
32+
with:
33+
script: |
34+
github.rest.issues.addAssignees({
35+
owner: context.repo.owner,
36+
repo: context.repo.repo,
37+
issue_number: context.issue.number,
38+
assignees: [context.payload.comment.user.login],
39+
})

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ to track it.
4141
* Bug: A problem that prevents the project from functioning as intended.
4242
* Subtask: A subtask of a Feature/Improvement that can be broken down into smaller steps.
4343

44+
You can assign the issue to yourself by leaving a comment with content `take`.
45+
4446
## Pull requests
4547

4648
Pull requests are the preferred mechanism for contributing to Amoro

0 commit comments

Comments
 (0)