Struct Repository

Source
pub struct Repository {
Show 95 fields pub allow_auto_merge: bool, pub allow_forking: Option<bool>, pub allow_merge_commit: bool, pub allow_rebase_merge: bool, pub allow_squash_merge: bool, pub allow_update_branch: Option<bool>, pub archive_url: String, pub archived: bool, pub assignees_url: String, pub blobs_url: String, pub branches_url: String, pub clone_url: String, pub collaborators_url: String, pub comments_url: String, pub commits_url: String, pub compare_url: String, pub contents_url: String, pub contributors_url: String, pub created_at: RepositoryCreatedAt, pub default_branch: String, pub delete_branch_on_merge: bool, pub deployments_url: String, pub description: Option<String>, pub disabled: Option<bool>, pub downloads_url: String, pub events_url: String, pub fork: bool, pub forks: i64, pub forks_count: i64, pub forks_url: String, pub full_name: String, pub git_commits_url: String, pub git_refs_url: String, pub git_tags_url: String, pub git_url: String, pub has_discussions: bool, pub has_downloads: bool, pub has_issues: bool, pub has_pages: bool, pub has_projects: bool, pub has_wiki: bool, pub homepage: Option<String>, pub hooks_url: String, pub html_url: String, pub id: i64, pub is_template: bool, pub issue_comment_url: String, pub issue_events_url: String, pub issues_url: String, pub keys_url: String, pub labels_url: String, pub language: Option<String>, pub languages_url: String, pub license: Option<License>, pub master_branch: Option<String>, pub merge_commit_message: Option<String>, pub merge_commit_title: Option<String>, pub merges_url: String, pub milestones_url: String, pub mirror_url: Option<String>, pub name: String, pub node_id: String, pub notifications_url: String, pub open_issues: i64, pub open_issues_count: i64, pub organization: Option<String>, pub owner: User, pub permissions: Option<RepositoryPermissions>, pub private: bool, pub public: Option<bool>, pub pulls_url: String, pub pushed_at: RepositoryPushedAt, pub releases_url: String, pub size: i64, pub squash_merge_commit_message: Option<String>, pub squash_merge_commit_title: Option<String>, pub ssh_url: String, pub stargazers: Option<i64>, pub stargazers_count: i64, pub stargazers_url: String, pub statuses_url: String, pub subscribers_url: String, pub subscription_url: String, pub svn_url: String, pub tags_url: String, pub teams_url: String, pub topics: Vec<String>, pub trees_url: String, pub updated_at: DateTime<Utc>, pub url: String, pub use_squash_pr_title_as_default: Option<bool>, pub visibility: RepositoryVisibility, pub watchers: i64, pub watchers_count: i64, pub web_commit_signoff_required: bool,
}
Expand description

A git repository

JSON schema
{
 "title": "Repository",
 "description": "A git repository",
 "type": "object",
 "required": [
   "archive_url",
   "archived",
   "assignees_url",
   "blobs_url",
   "branches_url",
   "clone_url",
   "collaborators_url",
   "comments_url",
   "commits_url",
   "compare_url",
   "contents_url",
   "contributors_url",
   "created_at",
   "default_branch",
   "deployments_url",
   "description",
   "downloads_url",
   "events_url",
   "fork",
   "forks",
   "forks_count",
   "forks_url",
   "full_name",
   "git_commits_url",
   "git_refs_url",
   "git_tags_url",
   "git_url",
   "has_downloads",
   "has_issues",
   "has_pages",
   "has_projects",
   "has_wiki",
   "homepage",
   "hooks_url",
   "html_url",
   "id",
   "is_template",
   "issue_comment_url",
   "issue_events_url",
   "issues_url",
   "keys_url",
   "labels_url",
   "language",
   "languages_url",
   "license",
   "merges_url",
   "milestones_url",
   "mirror_url",
   "name",
   "node_id",
   "notifications_url",
   "open_issues",
   "open_issues_count",
   "owner",
   "private",
   "pulls_url",
   "pushed_at",
   "releases_url",
   "size",
   "ssh_url",
   "stargazers_count",
   "stargazers_url",
   "statuses_url",
   "subscribers_url",
   "subscription_url",
   "svn_url",
   "tags_url",
   "teams_url",
   "topics",
   "trees_url",
   "updated_at",
   "url",
   "visibility",
   "watchers",
   "watchers_count",
   "web_commit_signoff_required"
 ],
 "properties": {
   "allow_auto_merge": {
     "description": "Whether to allow auto-merge for pull requests.",
     "default": false,
     "type": "boolean"
   },
   "allow_forking": {
     "description": "Whether to allow private forks",
     "type": "boolean"
   },
   "allow_merge_commit": {
     "description": "Whether to allow merge commits for pull requests.",
     "default": true,
     "type": "boolean"
   },
   "allow_rebase_merge": {
     "description": "Whether to allow rebase merges for pull requests.",
     "default": true,
     "type": "boolean"
   },
   "allow_squash_merge": {
     "description": "Whether to allow squash merges for pull requests.",
     "default": true,
     "type": "boolean"
   },
   "allow_update_branch": {
     "type": "boolean"
   },
   "archive_url": {
     "description": "A template for the API URL to download the repository as an archive.",
     "type": "string",
     "format": "uri-template"
   },
   "archived": {
     "description": "Whether the repository is archived.",
     "default": false,
     "type": "boolean"
   },
   "assignees_url": {
     "description": "A template for the API URL to list the available assignees for issues in the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "blobs_url": {
     "description": "A template for the API URL to create or retrieve a raw Git blob in the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "branches_url": {
     "description": "A template for the API URL to get information about branches in the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "clone_url": {
     "type": "string",
     "format": "uri"
   },
   "collaborators_url": {
     "description": "A template for the API URL to get information about collaborators of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "comments_url": {
     "description": "A template for the API URL to get information about comments on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "commits_url": {
     "description": "A template for the API URL to get information about commits on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "compare_url": {
     "description": "A template for the API URL to compare two commits or refs.",
     "type": "string",
     "format": "uri-template"
   },
   "contents_url": {
     "description": "A template for the API URL to get the contents of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "contributors_url": {
     "description": "A template for the API URL to list the contributors to the repository.",
     "type": "string",
     "format": "uri"
   },
   "created_at": {
     "oneOf": [
       {
         "type": "integer"
       },
       {
         "type": "string",
         "format": "date-time"
       }
     ]
   },
   "default_branch": {
     "description": "The default branch of the repository.",
     "type": "string"
   },
   "delete_branch_on_merge": {
     "description": "Whether to delete head branches when pull requests are merged",
     "default": false,
     "type": "boolean"
   },
   "deployments_url": {
     "description": "The API URL to list the deployments of the repository.",
     "type": "string",
     "format": "uri"
   },
   "description": {
     "description": "The repository description.",
     "type": [
       "string",
       "null"
     ]
   },
   "disabled": {
     "description": "Returns whether or not this repository is disabled.",
     "type": "boolean"
   },
   "downloads_url": {
     "description": "The API URL to list the downloads on the repository.",
     "type": "string",
     "format": "uri"
   },
   "events_url": {
     "description": "The API URL to list the events of the repository.",
     "type": "string",
     "format": "uri"
   },
   "fork": {
     "description": "Whether the repository is a fork.",
     "type": "boolean"
   },
   "forks": {
     "type": "integer"
   },
   "forks_count": {
     "type": "integer"
   },
   "forks_url": {
     "description": "The API URL to list the forks of the repository.",
     "type": "string",
     "format": "uri"
   },
   "full_name": {
     "description": "The full, globally unique, name of the repository.",
     "type": "string"
   },
   "git_commits_url": {
     "description": "A template for the API URL to get information about Git commits of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "git_refs_url": {
     "description": "A template for the API URL to get information about Git refs of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "git_tags_url": {
     "description": "A template for the API URL to get information about Git tags of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "git_url": {
     "type": "string",
     "format": "uri"
   },
   "has_discussions": {
     "description": "Whether discussions are enabled.",
     "default": true,
     "type": "boolean"
   },
   "has_downloads": {
     "description": "Whether downloads are enabled.",
     "default": true,
     "type": "boolean"
   },
   "has_issues": {
     "description": "Whether issues are enabled.",
     "default": true,
     "type": "boolean"
   },
   "has_pages": {
     "type": "boolean"
   },
   "has_projects": {
     "description": "Whether projects are enabled.",
     "default": true,
     "type": "boolean"
   },
   "has_wiki": {
     "description": "Whether the wiki is enabled.",
     "default": true,
     "type": "boolean"
   },
   "homepage": {
     "type": [
       "string",
       "null"
     ]
   },
   "hooks_url": {
     "description": "The API URL to list the hooks on the repository.",
     "type": "string",
     "format": "uri"
   },
   "html_url": {
     "description": "The URL to view the repository on GitHub.com.",
     "type": "string",
     "format": "uri"
   },
   "id": {
     "description": "Unique identifier of the repository",
     "type": "integer"
   },
   "is_template": {
     "type": "boolean"
   },
   "issue_comment_url": {
     "description": "A template for the API URL to get information about issue comments on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "issue_events_url": {
     "description": "A template for the API URL to get information about issue events on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "issues_url": {
     "description": "A template for the API URL to get information about issues on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "keys_url": {
     "description": "A template for the API URL to get information about deploy keys on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "labels_url": {
     "description": "A template for the API URL to get information about labels of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "language": {
     "type": [
       "string",
       "null"
     ]
   },
   "languages_url": {
     "description": "The API URL to get information about the languages of the repository.",
     "type": "string",
     "format": "uri"
   },
   "license": {
     "oneOf": [
       {
         "$ref": "#/definitions/license"
       },
       {
         "type": "null"
       }
     ]
   },
   "master_branch": {
     "type": "string"
   },
   "merge_commit_message": {
     "type": "string"
   },
   "merge_commit_title": {
     "type": "string"
   },
   "merges_url": {
     "description": "The API URL to merge branches in the repository.",
     "type": "string",
     "format": "uri"
   },
   "milestones_url": {
     "description": "A template for the API URL to get information about milestones of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "mirror_url": {
     "type": [
       "string",
       "null"
     ],
     "format": "uri"
   },
   "name": {
     "description": "The name of the repository.",
     "type": "string"
   },
   "node_id": {
     "description": "The GraphQL identifier of the repository.",
     "type": "string"
   },
   "notifications_url": {
     "description": "A template for the API URL to get information about notifications on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "open_issues": {
     "type": "integer"
   },
   "open_issues_count": {
     "type": "integer"
   },
   "organization": {
     "type": "string"
   },
   "owner": {
     "$ref": "#/definitions/user"
   },
   "permissions": {
     "type": "object",
     "required": [
       "admin",
       "pull",
       "push"
     ],
     "properties": {
       "admin": {
         "type": "boolean"
       },
       "maintain": {
         "type": "boolean"
       },
       "pull": {
         "type": "boolean"
       },
       "push": {
         "type": "boolean"
       },
       "triage": {
         "type": "boolean"
       }
     },
     "additionalProperties": false
   },
   "private": {
     "description": "Whether the repository is private or public.",
     "type": "boolean"
   },
   "public": {
     "type": "boolean"
   },
   "pulls_url": {
     "description": "A template for the API URL to get information about pull requests on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "pushed_at": {
     "oneOf": [
       {
         "type": "integer"
       },
       {
         "type": "string",
         "format": "date-time"
       },
       {
         "type": "null"
       }
     ]
   },
   "releases_url": {
     "description": "A template for the API URL to get information about releases on the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "size": {
     "type": "integer"
   },
   "squash_merge_commit_message": {
     "type": "string"
   },
   "squash_merge_commit_title": {
     "type": "string"
   },
   "ssh_url": {
     "type": "string"
   },
   "stargazers": {
     "type": "integer"
   },
   "stargazers_count": {
     "type": "integer"
   },
   "stargazers_url": {
     "description": "The API URL to list the stargazers on the repository.",
     "type": "string",
     "format": "uri"
   },
   "statuses_url": {
     "description": "A template for the API URL to get information about statuses of a commit.",
     "type": "string",
     "format": "uri-template"
   },
   "subscribers_url": {
     "description": "The API URL to list the subscribers on the repository.",
     "type": "string",
     "format": "uri"
   },
   "subscription_url": {
     "description": "The API URL to subscribe to notifications for this repository.",
     "type": "string",
     "format": "uri"
   },
   "svn_url": {
     "type": "string",
     "format": "uri"
   },
   "tags_url": {
     "description": "The API URL to get information about tags on the repository.",
     "type": "string",
     "format": "uri"
   },
   "teams_url": {
     "description": "The API URL to list the teams on the repository.",
     "type": "string",
     "format": "uri"
   },
   "topics": {
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "trees_url": {
     "description": "A template for the API URL to create or retrieve a raw Git tree of the repository.",
     "type": "string",
     "format": "uri-template"
   },
   "updated_at": {
     "type": "string",
     "format": "date-time"
   },
   "url": {
     "description": "The URL to get more information about the repository from the GitHub API.",
     "type": "string",
     "format": "uri"
   },
   "use_squash_pr_title_as_default": {
     "type": "boolean"
   },
   "visibility": {
     "type": "string",
     "enum": [
       "public",
       "private",
       "internal"
     ]
   },
   "watchers": {
     "type": "integer"
   },
   "watchers_count": {
     "type": "integer"
   },
   "web_commit_signoff_required": {
     "type": "boolean"
   }
 },
 "additionalProperties": false,
 "$schema": "http://json-schema.org/draft-07/schema"
}

Fields§

§allow_auto_merge: bool

Whether to allow auto-merge for pull requests.

§allow_forking: Option<bool>

Whether to allow private forks

§allow_merge_commit: bool

Whether to allow merge commits for pull requests.

§allow_rebase_merge: bool

Whether to allow rebase merges for pull requests.

§allow_squash_merge: bool

Whether to allow squash merges for pull requests.

§allow_update_branch: Option<bool>§archive_url: String

A template for the API URL to download the repository as an archive.

§archived: bool

Whether the repository is archived.

§assignees_url: String

A template for the API URL to list the available assignees for issues in the repository.

§blobs_url: String

A template for the API URL to create or retrieve a raw Git blob in the repository.

§branches_url: String

A template for the API URL to get information about branches in the repository.

§clone_url: String§collaborators_url: String

A template for the API URL to get information about collaborators of the repository.

§comments_url: String

A template for the API URL to get information about comments on the repository.

§commits_url: String

A template for the API URL to get information about commits on the repository.

§compare_url: String

A template for the API URL to compare two commits or refs.

§contents_url: String

A template for the API URL to get the contents of the repository.

§contributors_url: String

A template for the API URL to list the contributors to the repository.

§created_at: RepositoryCreatedAt§default_branch: String

The default branch of the repository.

§delete_branch_on_merge: bool

Whether to delete head branches when pull requests are merged

§deployments_url: String

The API URL to list the deployments of the repository.

§description: Option<String>

The repository description.

§disabled: Option<bool>

Returns whether or not this repository is disabled.

§downloads_url: String

The API URL to list the downloads on the repository.

§events_url: String

The API URL to list the events of the repository.

§fork: bool

Whether the repository is a fork.

§forks: i64§forks_count: i64§forks_url: String

The API URL to list the forks of the repository.

§full_name: String

The full, globally unique, name of the repository.

§git_commits_url: String

A template for the API URL to get information about Git commits of the repository.

§git_refs_url: String

A template for the API URL to get information about Git refs of the repository.

§git_tags_url: String

A template for the API URL to get information about Git tags of the repository.

§git_url: String§has_discussions: bool

Whether discussions are enabled.

§has_downloads: bool

Whether downloads are enabled.

§has_issues: bool

Whether issues are enabled.

§has_pages: bool§has_projects: bool

Whether projects are enabled.

§has_wiki: bool

Whether the wiki is enabled.

§homepage: Option<String>§hooks_url: String

The API URL to list the hooks on the repository.

§html_url: String

The URL to view the repository on GitHub.com.

§id: i64

Unique identifier of the repository

§is_template: bool§issue_comment_url: String

A template for the API URL to get information about issue comments on the repository.

§issue_events_url: String

A template for the API URL to get information about issue events on the repository.

§issues_url: String

A template for the API URL to get information about issues on the repository.

§keys_url: String

A template for the API URL to get information about deploy keys on the repository.

§labels_url: String

A template for the API URL to get information about labels of the repository.

§language: Option<String>§languages_url: String

The API URL to get information about the languages of the repository.

§license: Option<License>§master_branch: Option<String>§merge_commit_message: Option<String>§merge_commit_title: Option<String>§merges_url: String

The API URL to merge branches in the repository.

§milestones_url: String

A template for the API URL to get information about milestones of the repository.

§mirror_url: Option<String>§name: String

The name of the repository.

§node_id: String

The GraphQL identifier of the repository.

§notifications_url: String

A template for the API URL to get information about notifications on the repository.

§open_issues: i64§open_issues_count: i64§organization: Option<String>§owner: User§permissions: Option<RepositoryPermissions>§private: bool

Whether the repository is private or public.

§public: Option<bool>§pulls_url: String

A template for the API URL to get information about pull requests on the repository.

§pushed_at: RepositoryPushedAt§releases_url: String

A template for the API URL to get information about releases on the repository.

§size: i64§squash_merge_commit_message: Option<String>§squash_merge_commit_title: Option<String>§ssh_url: String§stargazers: Option<i64>§stargazers_count: i64§stargazers_url: String

The API URL to list the stargazers on the repository.

§statuses_url: String

A template for the API URL to get information about statuses of a commit.

§subscribers_url: String

The API URL to list the subscribers on the repository.

§subscription_url: String

The API URL to subscribe to notifications for this repository.

§svn_url: String§tags_url: String

The API URL to get information about tags on the repository.

§teams_url: String

The API URL to list the teams on the repository.

§topics: Vec<String>§trees_url: String

A template for the API URL to create or retrieve a raw Git tree of the repository.

§updated_at: DateTime<Utc>§url: String

The URL to get more information about the repository from the GitHub API.

§use_squash_pr_title_as_default: Option<bool>§visibility: RepositoryVisibility§watchers: i64§watchers_count: i64§web_commit_signoff_required: bool

Implementations§

Trait Implementations§

Source§

impl Clone for Repository

Source§

fn clone(&self) -> Repository

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Repository

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Repository

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Repository> for Repository

Source§

fn from(value: &Repository) -> Self

Converts to this type from the input type.
Source§

impl From<Repository> for Repository

Source§

fn from(value: Repository) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Repository

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Repository> for Repository

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(value: Repository) -> Result<Self, String>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,