Determine what status to set based on the event.
(config: Config)
| 281 | |
| 282 | |
| 283 | def determine_status(config: Config) -> str: |
| 284 | """Determine what status to set based on the event.""" |
| 285 | if config.event_action == "closed": |
| 286 | return config.status_done |
| 287 | |
| 288 | if ( |
| 289 | config.event_name == "pull_request_target" |
| 290 | and config.is_draft |
| 291 | and config.status_draft |
| 292 | ): |
| 293 | return config.status_draft |
| 294 | |
| 295 | return config.status_todo |
| 296 | |
| 297 | |
| 298 | def main() -> None: |
no outgoing calls