Update Github handle for Santiago Vidal: Website #25280
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Issue Trigger | |
| on: | |
| issues: | |
| types: [opened, transferred, assigned, labeled, unlabeled] | |
| jobs: | |
| # Adds missing labels to newly-created or transferred issues | |
| Add-Missing-Labels-To-Issues: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.action == 'opened' || github.event.action == 'transferred' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Checks if user is on the 'website-write' team, else halts workflow | |
| - name: Check Team Membership | |
| id: check-team-membership | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} | |
| script: | | |
| const username = '${{ github.actor }}' | |
| const team = 'website-write' | |
| const script = require('./github-actions/utils/check-team-membership.js') | |
| return script(github, context, username, team) | |
| # If user is team member: checks if the issue has required labels | |
| - if: ${{ steps.check-team-membership.outputs.result == 'true' }} | |
| name: Check Labels | |
| id: check-labels | |
| uses: actions/github-script@v8 | |
| 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 | |
| # If user is a team member: posts comment | |
| - if: ${{ steps.check-team-membership.outputs.result == 'true' }} | |
| name: Post Comment | |
| id: post-comment | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const results = ${{ steps.check-labels.outputs.result }} | |
| const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/post-labels-comment.js') | |
| script({g: github, c:context}, results) | |
| # Asks for preliminary update when issue is assigned | |
| Ask-For-Preliminary-update: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.action == 'assigned' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Checks if the issue has the required roles (front end, back end/devOps, design, or user research) | |
| - name: Check Labels Prelim | |
| uses: actions/github-script@v8 | |
| id: check-labels-prelim | |
| with: | |
| script: | | |
| const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') | |
| const checklabels = script({g: github, c: context}) | |
| return checklabels | |
| # Posts the comment based on the result of the previous step | |
| - name: Post assigning issue comment | |
| id: assigned-comment | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} | |
| script: | | |
| const results = ${{ steps.check-labels-prelim.outputs.result }} | |
| const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') | |
| script({g: github, c:context}, results) | |
| # The following steps only apply to issues with `Feature: Feature Branch` label | |
| # Note: These steps will be unnecessary and should be removed once Feature Branch goes live | |
| Add-Feature-Branch-Comment: | |
| runs-on: ubuntu-latest | |
| if: "${{ github.event.action == 'labeled' && github.event.label.name == 'Feature: Feature Branch' }}" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Add feature branch comment | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const script = require('./github-actions/trigger-issue/feature-branch-comment/add-feature-branch-comment.js') | |
| script({g: github, c: context}) | |
| Hide-Feature-Branch-Comment: | |
| runs-on: ubuntu-latest | |
| if: "${{ github.event.action == 'unlabeled' && github.event.label.name == 'Feature: Feature Branch' }}" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Hide feature branch comment | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const script = require('./github-actions/trigger-issue/feature-branch-comment/hide-feature-branch-comment.js') | |
| script({g: github, c: context}) |