mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[CI] Rename and expand needs-docs workflow (#10299)
This commit is contained in:
		
							
								
								
									
										24
									
								
								.github/workflows/needs-docs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/needs-docs.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,24 +0,0 @@ | |||||||
| name: Needs Docs |  | ||||||
|  |  | ||||||
| on: |  | ||||||
|   pull_request: |  | ||||||
|     types: [labeled, unlabeled] |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   check: |  | ||||||
|     name: Check |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - name: Check for needs-docs label |  | ||||||
|         uses: actions/github-script@v7.0.1 |  | ||||||
|         with: |  | ||||||
|           script: | |  | ||||||
|             const { data: labels } = await github.rest.issues.listLabelsOnIssue({ |  | ||||||
|               owner: context.repo.owner, |  | ||||||
|               repo: context.repo.repo, |  | ||||||
|               issue_number: context.issue.number |  | ||||||
|             }); |  | ||||||
|             const needsDocs = labels.find(label => label.name === 'needs-docs'); |  | ||||||
|             if (needsDocs) { |  | ||||||
|               core.setFailed('Pull request needs docs'); |  | ||||||
|             } |  | ||||||
							
								
								
									
										30
									
								
								.github/workflows/status-check-labels.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/status-check-labels.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | |||||||
|  | name: Status check labels | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   pull_request: | ||||||
|  |     types: [labeled, unlabeled] | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   check: | ||||||
|  |     name: Check ${{ matrix.label }} | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     strategy: | ||||||
|  |       fail-fast: false | ||||||
|  |       matrix: | ||||||
|  |         label: | ||||||
|  |           - needs-docs | ||||||
|  |           - merge-after-release | ||||||
|  |     steps: | ||||||
|  |       - name: Check for ${{ matrix.label }} label | ||||||
|  |         uses: actions/github-script@v7.0.1 | ||||||
|  |         with: | ||||||
|  |           script: | | ||||||
|  |             const { data: labels } = await github.rest.issues.listLabelsOnIssue({ | ||||||
|  |               owner: context.repo.owner, | ||||||
|  |               repo: context.repo.repo, | ||||||
|  |               issue_number: context.issue.number | ||||||
|  |             }); | ||||||
|  |             const hasLabel = labels.find(label => label.name === '${{ matrix.label }}'); | ||||||
|  |             if (hasLabel) { | ||||||
|  |               core.setFailed('Pull request cannot be merged, it is labeled as ${{ matrix.label }}'); | ||||||
|  |             } | ||||||
		Reference in New Issue
	
	Block a user