Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Jul 19, 2024
1 parent 205f5a2 commit 2bb8bee
Show file tree
Hide file tree
Showing 4 changed files with 1,390 additions and 3 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/issues-accept.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ---------------------------------------------------------------------------------------
# @parent : github workflow
# @desc : adds a label and assignee when specified user types /accept in
# PR comment.
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# ---------------------------------------------------------------------------------------

name: "🎫 Issue › Accept"
run-name: "🎫 Issue › Accept"

# ---------------------------------------------------------------------------------------
# triggers
# ---------------------------------------------------------------------------------------

on:
issue_comment:
types: [created]

# ---------------------------------------------------------------------------------------
# environment variables
# ---------------------------------------------------------------------------------------

env:
LABEL_ACCEPT: "Status 𐄂 Accepted"

ASSIGN_USER: Aetherinox
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]

# ---------------------------------------------------------------------------------------
# jobs
#
# env not available for job.if
# ---------------------------------------------------------------------------------------

jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && contains(github.event.comment.body, '/accept') && github.event.comment.user.login == 'Aetherinox'
steps:

# ---------------------------------------------------------------------------------------
# Add Label to accepted PR
# ---------------------------------------------------------------------------------------

- name: "🏷️ Assign Label › ${{ env.LABEL_ACCEPT }}"
run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: ${{ env.LABEL_ACCEPT }}

# ---------------------------------------------------------------------------------------
# Add assignee to accepted PR
# ---------------------------------------------------------------------------------------

- name: "🏷️ Assign Assignee › ${{ env.ASSIGN_USER }}"
run: gh issue edit "$NUMBER" --add-assignee "$ASSIGNEE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
ASSIGNEE: ${{ env.ASSIGN_USER }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# - roadmap
# ---------------------------------------------------------------------------------------

name: "🎫 Issue › New › Assignment"
run-name: "🎫 Issue › New › Assignment - ${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
name: "🎫 Issue › New"
run-name: "🎫 Issue › New › ${{ github.event.issue.number }}: ${{ github.event.issue.title }}"

# ---------------------------------------------------------------------------------------
# triggers
Expand Down Expand Up @@ -758,7 +758,7 @@ jobs:
let HE_message =
`
💡 It appears you might need help, please check the resources below for documentation that might assist with your issue:
- [Noxenv Documentation](https://aetherinox.github.io/noxenv)
- [Snippet Bundle Documentation](https://aetherinox.github.io/obsidian-dataview-snippets)
---
Expand Down
Loading

0 comments on commit 2bb8bee

Please sign in to comment.