Skip to content

Commit

Permalink
feat: add command for transferring issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Sep 11, 2024
1 parent 2751ab4 commit adf8c59
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ jobs:
At the moment the following comments are supported in issues:

- \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`.
example: \`/gfi js\` or \`/good-first-issue ci-cd\``
example: \`/gfi js\` or \`/good-first-issue ci-cd\`
- \`/trasfer-issue {repo-name}\` or \`/ti {repo-name}\` - trasfers issue from the source repository to the other repository passed by the user. example: \`/ti cli\` or \`/trasfer-issue cli\`
})
35 changes: 35 additions & 0 deletions .github/workflows/transfer-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

name: Transfer Issues between repositories

on:
issue_comment:
types:
- created


jobs:
transfer:
if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (contains(github.event.comment.body, '/trasfer-issue') || contains(github.event.comment.body, '/ti'))}}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install gh
- name: Authenticate GitHub CLI
run: |
gh action login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
- name: Extract Input
id: extract_step
run: |
COMMENT="${{github.event.comment.body}}"
REPO=$(echo $COMMENT | awk '{print $2}')
echo repo=$REPO >> $GITHUB_OUTPUT
- name: Trasfer Issue
run: |
gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}}

0 comments on commit adf8c59

Please sign in to comment.