mirror of
				https://github.com/Mibew/simple-icons.git
				synced 2025-10-31 18:41:07 +03:00 
			
		
		
		
	Get labels at runtime in assign-to-project workflow (#6612)
This commit is contained in:
		
							parent
							
								
									40108ff5cb
								
							
						
					
					
						commit
						9292184b91
					
				
							
								
								
									
										10
									
								
								.github/workflows/add-labels-priority.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/add-labels-priority.yml
									
									
									
									
										vendored
									
									
								
							| @ -18,16 +18,22 @@ jobs: | |||||||
|     env: |     env: | ||||||
|       MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }} |       MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }} | ||||||
|     steps: |     steps: | ||||||
|  |     - id: get-labels | ||||||
|  |       name: Get labels | ||||||
|  |       run: | | ||||||
|  |         labels="$(curl --retry 5 -s https://api.github.com/repos/simple-icons/simple-icons/pulls/${{ github.event.pull_request.number }} | jq '.labels[].name' | tr '\n' ',' | sed 's/"//g' | sed 's/,$//')" | ||||||
|  |         echo "::set-output name=labels::$labels" | ||||||
|  | 
 | ||||||
|     - name: Assign pull requests to "Unprioritised" |     - name: Assign pull requests to "Unprioritised" | ||||||
|       uses: srggrs/assign-one-project-github-action@1.2.1 |       uses: srggrs/assign-one-project-github-action@1.2.1 | ||||||
|       if: contains(github.event.pull_request.labels.*.name, 'icon outdated') == false |       if: contains(steps.get-labels.outputs.labels, 'icon outdated') == false | ||||||
|       with: |       with: | ||||||
|         project: https://github.com/orgs/simple-icons/projects/2 |         project: https://github.com/orgs/simple-icons/projects/2 | ||||||
|         column_name: Unprioritised |         column_name: Unprioritised | ||||||
| 
 | 
 | ||||||
|     - name: Assign `icon outdated` pull requests to "Priority 1" |     - name: Assign `icon outdated` pull requests to "Priority 1" | ||||||
|       uses: srggrs/assign-one-project-github-action@1.2.1 |       uses: srggrs/assign-one-project-github-action@1.2.1 | ||||||
|       if: contains(github.event.pull_request.labels.*.name, 'icon outdated') |       if: contains(steps.get-labels.outputs.labels, 'icon outdated') | ||||||
|       with: |       with: | ||||||
|         project: https://github.com/orgs/simple-icons/projects/2 |         project: https://github.com/orgs/simple-icons/projects/2 | ||||||
|         column_name: Priority 1 |         column_name: Priority 1 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user