infra: add posibility to skip issue validation
This commit is contained in:
		
							
								
								
									
										7
									
								
								.github/scripts/validate.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/scripts/validate.js
									
									
									
									
										vendored
									
									
								
							| @@ -28,6 +28,8 @@ const BOT_LABELS = [ | |||||||
|   ...Object.values(PLATFORM_LABELS), |   ...Object.values(PLATFORM_LABELS), | ||||||
| ]; | ]; | ||||||
|  |  | ||||||
|  | const SKIP_LABEL = "No Validation" | ||||||
|  |  | ||||||
| const MESSAGE = { | const MESSAGE = { | ||||||
|   FEATURE_REQUEST: `Thank you for your feature request. We will review it and get back to you if we need more information.`, |   FEATURE_REQUEST: `Thank you for your feature request. We will review it and get back to you if we need more information.`, | ||||||
|   BUG_REPORT: `Thank you for your bug report. We will review it and get back to you if we need more information.`, |   BUG_REPORT: `Thank you for your bug report. We will review it and get back to you if we need more information.`, | ||||||
| @@ -151,6 +153,11 @@ const handleIssue = async ({github, context}) => { | |||||||
|   const {body} = issue; |   const {body} = issue; | ||||||
|   const labels = new Set(issue.labels.map((label) => label.name)); |   const labels = new Set(issue.labels.map((label) => label.name)); | ||||||
|  |  | ||||||
|  |   if(labels.has(SKIP_LABEL)) { | ||||||
|  |     console.log("Skiping Issue Validation") | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  |  | ||||||
|   // Clear out labels that are added by the bot |   // Clear out labels that are added by the bot | ||||||
|   BOT_LABELS.forEach((label) => labels.delete(label)); |   BOT_LABELS.forEach((label) => labels.delete(label)); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user