Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to capture codeowner plus ability to run on existing PRs #4958

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/add-prs-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: 'Add PR to Project Board - Wallet Framework Team'

on:
workflow_dispatch:
inputs:
scan_existing_prs:
description: 'Scan existing open PRs'
type: boolean
default: false
pull_request:
types: [opened, labeled, review_requested]

Expand All @@ -14,11 +19,25 @@ jobs:
TEAM_LABEL: 'team-wallet-framework'

steps:
- name: Get existing PRs
if: github.event.inputs.scan_existing_prs == 'true'
id: get-prs
desi marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/github-script@v6
with:
script: |
const prs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
return prs.data;

- name: Add PR to project board
uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e
if: |
github.event.requested_team.name == env.TEAM_NAME ||
contains(github.event.pull_request.labels.*.name, env.TEAM_LABEL)
contains(github.event.pull_request.labels.*.name, env.TEAM_LABEL) ||
contains(github.event.pull_request.requested_teams.*.name, env.TEAM_NAME)
with:
project-url: https://github.com/orgs/MetaMask/projects/113
github-token: ${{ secrets.CORE_ADD_PRS_TO_PROJECT }}
Loading