Skip to content

Commit

Permalink
Update issue-trigger.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
t-will-gillis authored Nov 28, 2023
1 parent ddefa16 commit cbdfaa3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/issue-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:

jobs:
# Adds newly created issues onto project board in the default column 'New Issue Approval'
# unless overridden when issue has "LA website bot" in title, then 'Questions / In Review'
Add-Issue-To-Project-Board:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
steps:
- name: Add issue to project board
id: add-issue-project-board
env:
COLUMN_NAME: ${{ contains(github.event.issue.title, 'LA website bot') && 'Questions / In Review' || 'New Issue Approval' }}
COLUMN_NAME: ${{ contains(github.event.issue.title, 'Hack for LA website bot') && 'Questions / In Review' || 'New Issue Approval' }}
uses: alex-page/[email protected]
with:
project: Project Board
Expand All @@ -27,13 +28,21 @@ jobs:
- uses: actions/checkout@v3
# Check if the issue has required labels
- name: Check Labels
uses: actions/github-script@v6
id: check-labels
uses: actions/github-script@v7
with:
script: |
const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js')
const checkLabels = script({g: github, c: context})
return checkLabels
- name: Add Special Label
id: add-special-label
uses: actions/github-script@v7
if: ${{ needs.Add-Issue-To-Project-Board.outputs.COLUMN_NAME }} == 'Questions / In Review'
with:
script: |
echo: "${{ needs.Add-Issue-To-Project-Board.outputs.COLUMN_NAME }}"
#Checks which teams the user is on
- uses: tspascoal/get-user-teams-membership@v2
Expand Down

0 comments on commit cbdfaa3

Please sign in to comment.