mirror of
				https://github.com/openSUSE/osc.git
				synced 2025-10-31 19:42:16 +01:00 
			
		
		
		
	Dump referenced PRs to metadata/referenced-pull-requests.json
This commit is contained in:
		| @@ -86,6 +86,9 @@ class PullRequest(GiteaModel): | ||||
|         Split <owner>/<repo>#<number> or <owner>/<repo>!<number> into individual components and return them in a tuple. | ||||
|         """ | ||||
|         match = re.match(r"^([^/]+)/([^/]+)[#!]([0-9]+)$", pr_id) | ||||
|         if not match: | ||||
|             match = re.match(r"^([^/]+)/([^/]+)/pulls/([0-9]+)$", pr_id) | ||||
|  | ||||
|         if not match: | ||||
|             raise ValueError(f"Invalid pull request id: {pr_id}") | ||||
|         return match.group(1), match.group(2), int(match.group(3)) | ||||
| @@ -265,6 +268,12 @@ class PullRequest(GiteaModel): | ||||
|  | ||||
|         return str(table) | ||||
|  | ||||
|     def to_light_dict(self, exclude_columns: Optional[list] = None): | ||||
|         x = ["allow_maintainer_edit", "body"] | ||||
|         if exclude_columns: | ||||
|             x += exclude_columns | ||||
|         return self.dict(x) | ||||
|  | ||||
|     def dict(self, exclude_columns: Optional[list] = None): | ||||
|         import inspect | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user