Skip to content

Commit

Permalink
Merge branch 'feature/action-based-management-utils' of https://githu…
Browse files Browse the repository at this point in the history
  • Loading branch information
burningtnt committed Jan 8, 2025
2 parents f896725 + d7081e3 commit c06802e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/repository-management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Repository Management Utils

on:
issue_comment:
types: [ created, edited ]

jobs:
process:
if: ${{ startsWith(github.event.comment.body, '/management title ') && contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.comment.author_association) }}
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- name: Rename the Issue or PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HMCL_TARGET_ID: ${{ github.event.issue.number }}
HMCL_TARGET_COMMAND: ${{ github.event.comment.body }}
run: |
echo "Editing the title of issue $HMCL_TARGET_ID to ${HMCL_TARGET_COMMAND:18}"
gh issue edit $HMCL_TARGET_ID --title "${HMCL_TARGET_COMMAND:18}" --repo $GITHUB_REPOSITORY

0 comments on commit c06802e

Please sign in to comment.