mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	.github: Update github-script to v7 and fix a rest bug
Need to update the github-script to v7 to squash deprecation warnings. Also fixed the API name for github.rest.pulls.requestReviewers.
This commit is contained in:
		
							
								
								
									
										10
									
								
								.github/workflows/PRSubmitActions.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/PRSubmitActions.yml
									
									
									
									
										vendored
									
									
								
							@@ -17,7 +17,7 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Get PR Number
 | 
					      - name: Get PR Number
 | 
				
			||||||
        id: getpr
 | 
					        id: getpr
 | 
				
			||||||
        uses: actions/github-script@v6
 | 
					        uses: actions/github-script@v7
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          retries: 5
 | 
					          retries: 5
 | 
				
			||||||
          script: |
 | 
					          script: |
 | 
				
			||||||
@@ -35,7 +35,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      - name: Set Label
 | 
					      - name: Set Label
 | 
				
			||||||
        id: setlabel
 | 
					        id: setlabel
 | 
				
			||||||
        uses: actions/github-script@v6
 | 
					        uses: actions/github-script@v7
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          PR_NUMBER:  ${{ steps.getpr.outputs.PR_NUMBER }}
 | 
					          PR_NUMBER:  ${{ steps.getpr.outputs.PR_NUMBER }}
 | 
				
			||||||
          LABEL_TIP:  ${{ vars.PR_SUBMIT_TESTING_IN_PROGRESS }}
 | 
					          LABEL_TIP:  ${{ vars.PR_SUBMIT_TESTING_IN_PROGRESS }}
 | 
				
			||||||
@@ -75,7 +75,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      - name: Add cherry-pick reminder
 | 
					      - name: Add cherry-pick reminder
 | 
				
			||||||
        if: github.event.action == 'completed'
 | 
					        if: github.event.action == 'completed'
 | 
				
			||||||
        uses: actions/github-script@v6
 | 
					        uses: actions/github-script@v7
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          PR_NUMBER:            ${{steps.getpr.outputs.PR_NUMBER}}
 | 
					          PR_NUMBER:            ${{steps.getpr.outputs.PR_NUMBER}}
 | 
				
			||||||
          CHERRY_PICK_REMINDER: ${{vars.CHERRY_PICK_REMINDER}}
 | 
					          CHERRY_PICK_REMINDER: ${{vars.CHERRY_PICK_REMINDER}}
 | 
				
			||||||
@@ -117,7 +117,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      - name: Add reviewers
 | 
					      - name: Add reviewers
 | 
				
			||||||
        if: github.event.action == 'completed'
 | 
					        if: github.event.action == 'completed'
 | 
				
			||||||
        uses: actions/github-script@v6
 | 
					        uses: actions/github-script@v7
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          PR_NUMBER: ${{steps.getpr.outputs.PR_NUMBER}}
 | 
					          PR_NUMBER: ${{steps.getpr.outputs.PR_NUMBER}}
 | 
				
			||||||
          REVIEWERS: ${{vars.PR_REVIEWERS}}
 | 
					          REVIEWERS: ${{vars.PR_REVIEWERS}}
 | 
				
			||||||
@@ -137,7 +137,7 @@ jobs:
 | 
				
			|||||||
            if (teams.length > 0 || users.length > 0) {
 | 
					            if (teams.length > 0 || users.length > 0) {
 | 
				
			||||||
              core.info(`Adding user reviewers ${users}`);
 | 
					              core.info(`Adding user reviewers ${users}`);
 | 
				
			||||||
              core.info(`Adding team reviewers ${teams}`);
 | 
					              core.info(`Adding team reviewers ${teams}`);
 | 
				
			||||||
              await github.pulls.requestReviewers({
 | 
					              await github.rest.pulls.requestReviewers({
 | 
				
			||||||
                pull_number: process.env.PR_NUMBER,
 | 
					                pull_number: process.env.PR_NUMBER,
 | 
				
			||||||
                owner: context.repo.owner,
 | 
					                owner: context.repo.owner,
 | 
				
			||||||
                repo: context.repo.repo,
 | 
					                repo: context.repo.repo,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user