Rename default branch to ‘main’
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
							parent
							
								
									285a946a1f
								
							
						
					
					
						commit
						53e59c8c09
					
				
					 13 changed files with 39 additions and 39 deletions
				
			
		|  | @ -28,7 +28,7 @@ client = zulip.Client( | |||
| def get_deployment_details() -> Dict[str, str]: | ||||
|     # "gear deployments" output example: | ||||
|     #   Activation time - Deployment ID - Git Ref - Git SHA1 | ||||
|     #   2017-01-07 15:40:30 -0500 - 9e2b7143 - master - b9ce57c - ACTIVE | ||||
|     #   2017-01-07 15:40:30 -0500 - 9e2b7143 - main - b9ce57c - ACTIVE | ||||
|     dep = subprocess.check_output(["gear", "deployments"], universal_newlines=True).splitlines()[1] | ||||
|     splits = dep.split(" - ") | ||||
| 
 | ||||
|  |  | |||
|  | @ -15,12 +15,12 @@ ZULIP_API_KEY = "0123456789abcdef0123456789abcdef" | |||
| # Returns a dictionary encoding the stream and subject to send the | ||||
| # notification to (or None to send no notification). | ||||
| # | ||||
| # The default code below will send every commit pushed to "master" to | ||||
| # The default code below will send every commit pushed to "main" to | ||||
| # * stream "deployments" | ||||
| # * topic "master" | ||||
| # * topic "main" | ||||
| # And similarly for branch "test-post-receive" (for use when testing). | ||||
| def deployment_notice_destination(branch: str) -> Optional[Dict[str, str]]: | ||||
|     if branch in ["master", "test-post-receive"]: | ||||
|     if branch in ["main", "master", "test-post-receive"]: | ||||
|         return dict(stream="deployments", subject=f"{branch}") | ||||
| 
 | ||||
|     # Return None for cases where you don't want a notice sent | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Anders Kaseorg
						Anders Kaseorg