File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Backport PR 
2+ on :
3+   pull_request :
4+     types : [ labeled, closed ] 
5+ 
6+ permissions : {} 
7+ 
8+ jobs :
9+   backport :
10+     name : Backport PR 
11+     runs-on : ubuntu-latest 
12+     if : > 
13+       github.event.pull_request.merged 
14+       && ( 
15+         ( github.event.action == 'closed' && contains(github.event.label.name, 'backport') ) 
16+         ||  
17+         ( github.event.action == 'labeled' && contains(github.event.label.name, 'backport') ) 
18+       ) 
19+ permissions :
20+       contents : write 
21+       pull-requests : write 
22+     steps :
23+       - uses : actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e  #  v1.11.6
24+         id : app-token 
25+         with :
26+           app-id : ${{ vars.DD_GITHUB_TOKEN_GENERATOR_APP_ID }} 
27+           private-key : ${{ secrets.DD_GITHUB_TOKEN_GENERATOR_PRIVATE_KEY }} 
28+       - uses : tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e  #  v2.0.4
29+         with :
30+           label_pattern : " ^backport/(?<base>([^ ]+))$" 
31+           labels_template : " <%= JSON.stringify([...labels, 'backport', 'bot'])  % >" 
32+           github_token : ${{ steps.app-token.outputs.token }} 
33+           title_template : " [ Backport <%- base  % > ] <%- title  % >" 
34+           body_template : | 
35+             Backport <%- mergeCommitSha  % > from #<%- number  % >. 
36+ 
37+             ___ 
38+ 
39+             <%- body  % > 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments