Skip to content

Update set-pr-labels.js #89

Update set-pr-labels.js

Update set-pr-labels.js #89

Workflow file for this run

name: Pull Request Verification
on:
pull_request:
types: [opened]
jobs:
Check-Team-Membership:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
# Check if PR author is team member
- name: Verify membership
id: verify-membership
uses: actions/github-script@v7
with:
github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }}
script: |
const script = require('./github-actions/utils/check-team-membership.js');
membershipStatus = script({ github, context }, team:'website-write', prAuthor:context.payload.sender.login);
return membershipStatus
# If PR author not a team member, comment and close PR
- if: ${{ steps.verify-membership.outputs.result == 'true' }}
name: Comment and Close PR
id: comment-and-close-pr
uses: actions/github-script@v7
with:
script: |
const script = require('./github-actions/trigger-pr-target/verify-pr.js');
script({ g: github, c: context })