A git repository.
| 9595 | |
| 9596 | @typecheck |
| 9597 | class GitRepository(Type): |
| 9598 | """A git repository.""" |
| 9599 | |
| 9600 | def branch(self, name: str) -> GitRef: |
| 9601 | """Returns details of a branch. |
| 9602 | |
| 9603 | Parameters |
| 9604 | ---------- |
| 9605 | name: |
| 9606 | Branch's name (e.g., "main"). |
| 9607 | """ |
| 9608 | _args = [ |
| 9609 | Arg("name", name), |
| 9610 | ] |
| 9611 | _ctx = self._select("branch", _args) |
| 9612 | return GitRef(_ctx) |
| 9613 | |
| 9614 | async def branches( |
| 9615 | self, |
| 9616 | *, |
| 9617 | patterns: list[str] | None = None, |
| 9618 | ) -> list[str]: |
| 9619 | """branches that match any of the given glob patterns. |
| 9620 | |
| 9621 | Parameters |
| 9622 | ---------- |
| 9623 | patterns: |
| 9624 | Glob patterns (e.g., "refs/tags/v*"). |
| 9625 | |
| 9626 | Returns |
| 9627 | ------- |
| 9628 | list[str] |
| 9629 | The `String` scalar type represents textual data, represented as |
| 9630 | UTF-8 character sequences. The String type is most often used by |
| 9631 | GraphQL to represent free-form human-readable text. |
| 9632 | |
| 9633 | Raises |
| 9634 | ------ |
| 9635 | ExecuteTimeoutError |
| 9636 | If the time to execute the query exceeds the configured timeout. |
| 9637 | QueryError |
| 9638 | If the API returns an error. |
| 9639 | """ |
| 9640 | _args = [ |
| 9641 | Arg("patterns", patterns, None), |
| 9642 | ] |
| 9643 | _ctx = self._select("branches", _args) |
| 9644 | return await _ctx.execute(list[str]) |
| 9645 | |
| 9646 | def commit(self, id: str) -> GitRef: |
| 9647 | """Returns details of a commit. |
| 9648 | |
| 9649 | Parameters |
| 9650 | ---------- |
| 9651 | id: |
| 9652 | Identifier of the commit (e.g., |
| 9653 | "b6315d8f2810962c601af73f86831f6866ea798b"). |
| 9654 | """ |
no outgoing calls
no test coverage detected