File tree Expand file tree Collapse file tree 4 files changed +48
-19
lines changed Expand file tree Collapse file tree 4 files changed +48
-19
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,17 @@ name: (Compiler) Discord Notify
22
33on :
44  pull_request_target :
5-     types : [labeled] 
65    paths :
76      - compiler/** 
87      - .github/workflows/compiler_**.yml 
98
109jobs :
10+   check_maintainer :
11+     uses : facebook/react/.github/workflows/shared_check_maintainer.yml@main 
12+ 
1113  notify :
12-     if : ${{ github.event.label.name == 'React Core Team' }} 
14+     if : ${{ needs.check_maintainer.outputs.is_core_team }} 
15+     needs : check_maintainer 
1316    runs-on : ubuntu-latest 
1417    steps :
1518      - name : Discord Webhook Action 
Original file line number Diff line number Diff line change @@ -2,14 +2,17 @@ name: (Runtime) Discord Notify
22
33on :
44  pull_request_target :
5-     types : [labeled] 
65    paths-ignore :
76      - compiler/** 
87      - .github/workflows/compiler_**.yml 
98
109jobs :
10+   check_maintainer :
11+     uses : facebook/react/.github/workflows/shared_check_maintainer.yml@main 
12+ 
1113  notify :
12-     if : ${{ github.event.label.name == 'React Core Team' }} 
14+     if : ${{ needs.check_maintainer.outputs.is_core_team }} 
15+     needs : check_maintainer 
1316    runs-on : ubuntu-latest 
1417    steps :
1518      - name : Discord Webhook Action 
Original file line number Diff line number Diff line change 1- name : (Shared) Core Label  
1+ name : (Shared) Check maintainer  
22
33on :
4-   pull_request_target :
4+   workflow_call :
5+     outputs :
6+       is_core_team :
7+         value : ${{ jobs.check_maintainer.outputs.is_core_team }} 
58
69env :
710  TZ : /usr/share/zoneinfo/America/Los_Angeles 
811  #  https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
912  SEGMENT_DOWNLOAD_TIMEOUT_MINS : 1 
1013
1114jobs :
12-   core_label :
15+   check_maintainer :
1316    runs-on : ubuntu-latest 
17+     outputs :
18+       is_core_team : ${{ steps.check_if_actor_is_maintainer.outputs.result }} 
1419    steps :
1520      - uses : actions/checkout@v4 
1621      - name : Check if actor is maintainer 
17-         id : check_maintainer 
22+         id : check_if_actor_is_maintainer 
1823        uses : actions/github-script@v7 
1924        with :
2025          script : | 
2833            } 
2934            console.log(`🔴 ${actor} is NOT a maintainer`); 
3035            return null; 
31-        - name : Label PR as React Core Team 
32-         if : ${{ steps.check_maintainer.outputs.result }} 
33-         uses : actions/github-script@v7 
34-         with :
35-           script : | 
36-             github.rest.issues.addLabels({ 
37-               owner: context.repo.owner, 
38-               repo: context.repo.repo, 
39-               issue_number: ${{ github.event.number }}, 
40-               labels: ['React Core Team'] 
41-             }); 
Original file line number Diff line number Diff line change 1+ name : (Shared) Label Core Team PRs 
2+ 
3+ on :
4+   pull_request_target :
5+ 
6+ env :
7+   TZ : /usr/share/zoneinfo/America/Los_Angeles 
8+   #  https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
9+   SEGMENT_DOWNLOAD_TIMEOUT_MINS : 1 
10+ 
11+ jobs :
12+   check_maintainer :
13+     uses : facebook/react/.github/workflows/shared_check_maintainer.yml@main 
14+ 
15+   label :
16+     if : ${{ needs.check_maintainer.outputs.is_core_team }} 
17+     runs-on : ubuntu-latest 
18+     needs : check_maintainer 
19+     steps :
20+       - name : Label PR as React Core Team 
21+         uses : actions/github-script@v7 
22+         with :
23+           script : | 
24+             github.rest.issues.addLabels({ 
25+               owner: context.repo.owner, 
26+               repo: context.repo.repo, 
27+               issue_number: ${{ github.event.number }}, 
28+               labels: ['React Core Team'] 
29+             }); 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments