A class responsible for managing the environment associated with submitting PRs at GitHub.
| 275 | |
| 276 | @dataclass(frozen=True) |
| 277 | class Submitter: |
| 278 | """ |
| 279 | A class responsible for managing the environment associated |
| 280 | with submitting PRs at GitHub. |
| 281 | """ |
| 282 | |
| 283 | # --------------------------- |
| 284 | # Direct arguments to submit |
| 285 | |
| 286 | # Message describing the update to the stack that was done |
| 287 | msg: Optional[str] |
| 288 | |
| 289 | # GitHub username who is doing the submitting |
| 290 | username: str |
| 291 | |
| 292 | # Endpoint to access GitHub |
| 293 | github: ghstack.github.GitHubEndpoint |
| 294 | |
| 295 | # Clobber existing PR description with local commit message |
| 296 | update_fields: bool = False |
| 297 | |
| 298 | # Shell inside git checkout that we are submitting |
| 299 | sh: ghstack.shell.Shell = dataclasses.field(default_factory=ghstack.shell.Shell) |
| 300 | |
| 301 | # String used to describe the stack in question |
| 302 | stack_header: str = STACK_HEADER |
| 303 | |
| 304 | # Owner of the repository we are submitting to. Usually 'pytorch' |
| 305 | # Presents as repo_owner kwarg in main |
| 306 | repo_owner_opt: Optional[str] = None |
| 307 | |
| 308 | # Name of the repository we are submitting to. Usually 'pytorch' |
| 309 | # Presents as repo_name kwarg in main |
| 310 | repo_name_opt: Optional[str] = None |
| 311 | |
| 312 | # Print only PR URL to stdout |
| 313 | short: bool = False |
| 314 | |
| 315 | # Force an update to GitHub, even if we think that your local copy |
| 316 | # is stale. |
| 317 | force: bool = False |
| 318 | |
| 319 | # Do not skip unchanged diffs |
| 320 | no_skip: bool = False |
| 321 | |
| 322 | # Create the PR in draft mode if it is going to be created (and not updated). |
| 323 | draft: bool = False |
| 324 | |
| 325 | # Github url (normally github.com) |
| 326 | github_url: str = "github.com" |
| 327 | |
| 328 | # Name of the upstream remote (normally origin) |
| 329 | remote_name: str = "origin" |
| 330 | |
| 331 | base_opt: Optional[str] = None |
| 332 | |
| 333 | revs: Sequence[str] = () |
| 334 |