Skip to content

Commit

Permalink
chore(workflows): adds assign bot
Browse files Browse the repository at this point in the history
  • Loading branch information
Artlfmj committed Oct 2, 2023
1 parent b9a090c commit 8f10d1b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/assignment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Assign Bot

on:
issue_comment:
types:
- created

jobs:
assign:
runs-on: ubuntu-latest

steps:
- name: Check for Mention
if: contains(github.event.comment.body, '@Artlfmj assign me')
run: |
commenter=$(jq -r '.comment.user.login' "$GITHUB_EVENT_PATH")
commenter=$(echo "$commenter" | tr -d '[:space:]')
issue_number=$(jq -r '.issue.number' "$GITHUB_EVENT_PATH")
echo "Assigning @$commenter to issue #$issue_number"
gh issue assign "$issue_number" --assignee "$commenter"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8f10d1b

Please sign in to comment.