RepositoriesService class Null safety

The RepositoriesService handles communication with repository related methods of the GitHub API.

API docs:



RepositoriesService(GitHub github)


github GitHub
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


addCollaborator(RepositorySlug slug, String user) Future<bool>
compareCommits(RepositorySlug slug, String refBase, String refHead) Future<GitHubComparison>
refBase and refHead can be the same value for a branch, commit, or ref in slug or specify other repositories by using repo:ref syntax. [...]
createCommitComment(RepositorySlug slug, RepositoryCommit commit, {required String body, String? path, int? position, int? line}) Future<CommitComment>
Create a comment for a commit using its sha. [...]
createDeployKey(RepositorySlug slug, CreatePublicKey key) Future<PublicKey>
Adds a deploy key for a repository. [...]
createFile(RepositorySlug slug, CreateFile file) Future<ContentCreation>
Creates a new file in a repository. [...]
createFork(RepositorySlug slug, [CreateFork? fork]) Future<Repository>
Creates a fork for the authenticated user. [...]
createHook(RepositorySlug slug, CreateHook hook) Future<Hook>
Creates a repository hook based on the specified hook. [...]
createRelease(RepositorySlug slug, CreateRelease createRelease, {bool getIfExists = true}) Future<Release>
Creates a Release based on the specified createRelease. [...]
createRepository(CreateRepository repository, {String? org}) Future<Repository>
Creates a repository with repository. If an org is specified, the new repository will be created under that organization. If no org is specified, it will be created for the authenticated user. [...]
createStatus(RepositorySlug slug, String ref, CreateStatus request) Future<RepositoryStatus>
Creates a new status for a repository at the specified reference. The ref can be a SHA, a branch name, or a tag name. [...]
deleteCommitComment(RepositorySlug slug, {required int id}) Future<bool>
Delete a commit comment. *id: id of the comment to delete. [...]
deleteDeployKey({required RepositorySlug slug, required PublicKey key}) Future<bool>
Delete a deploy key. [...]
deleteFile(RepositorySlug slug, String path, String message, String sha, String branch) Future<ContentCreation>
Deletes the specified file. [...]
deleteHook(RepositorySlug slug, int id) Future<bool>
deleteRelease(RepositorySlug slug, Release release) Future<bool>
Delete the release. [...]
deleteReleaseAsset(RepositorySlug slug, ReleaseAsset asset) Future<bool>
Delete a release asset. [...]
deleteRepository(RepositorySlug slug) Future<bool>
Deletes a repository. [...]
editHook(RepositorySlug slug, Hook hookToEdit, {String? configUrl, String? configContentType, String? configSecret, bool? configInsecureSsl, List<String>? events, List<String>? addEvents, List<String>? removeEvents, bool? active}) Future<Hook>
Edits a hook. [...]
editRelease(RepositorySlug slug, Release releaseToEdit, {String? tagName, String? targetCommitish, String? name, String? body, bool? draft, bool? preRelease}) Future<Release>
Edits the given release with new fields. [...]
editReleaseAsset(RepositorySlug slug, ReleaseAsset assetToEdit, {String? name, String? label}) Future<ReleaseAsset>
Edits a release asset. [...]
editRepository(RepositorySlug slug, {String? name, String? description, String? homepage, bool? private, bool? hasIssues, bool? hasWiki, bool? hasDownloads}) Future<Repository>
Edit a Repository. [...]
Gets an archive link for the specified repository and reference. [...]
getBranch(RepositorySlug slug, String branch) Future<Branch>
Fetches the specified branch. [...]
getCombinedStatus(RepositorySlug slug, String ref) Future<CombinedRepositoryStatus>
Gets a Combined Status for the specified repository and ref. [...]
getCommit(RepositorySlug slug, String sha) Future<RepositoryCommit>
Fetches the specified commit. [...]
getCommitComment(RepositorySlug slug, {required int id}) Future<CommitComment>
Retrieve a commit comment by its id. [...]
getCommitDiff(RepositorySlug slug, String sha) Future<String>
getContents(RepositorySlug slug, String path, {String? ref}) Future<RepositoryContents>
Fetches content in a repository at the specified path. [...]
getDeployKey(RepositorySlug slug, {required int id}) Future<PublicKey>
Get a deploy key. [...]
getHook(RepositorySlug slug, int id) Future<Hook>
Fetches a single hook by id. [...]
getLatestPagesBuild(RepositorySlug slug) Future<PageBuild>
Get latest Pages build. [...]
getLatestRelease(RepositorySlug slug) Future<Release>
Lists the latest release for the specified repository. [...]
getLicense(RepositorySlug slug) Future<LicenseDetails>
getPagesInfo(RepositorySlug slug) Future<RepositoryPages>
Fetches the GitHub pages information for the specified repository. [...]
getParticipation(RepositorySlug slug) Future<ContributorParticipation>
Fetches Participation Breakdowns. [...]
getReadme(RepositorySlug slug, {String? ref}) Future<GitHubFile>
Fetches the readme file for a repository. [...]
getReleaseAsset(RepositorySlug slug, Release release, {required int assetId}) Future<ReleaseAsset>
Get a single release asset. [...]
getReleaseById(RepositorySlug slug, int id) Future<Release>
Fetches a single release by the release ID. [...]
getReleaseByTagName(RepositorySlug slug, String? tagName) Future<Release>
Fetches a single release by the release tag name. [...]
getRepositories(List<RepositorySlug> slugs) Stream<Repository>
Fetches a list of repositories specified by slugs.
getRepository(RepositorySlug slug) Future<Repository>
Fetches the repository specified by the slug. [...]
isCollaborator(RepositorySlug slug, String user) Future<bool>
listBranches(RepositorySlug slug) Stream<Branch>
Lists the branches of the specified repository. [...]
listCodeFrequency(RepositorySlug slug) Stream<WeeklyChangesCount>
Fetches weekly addition and deletion counts. [...]
listCollaborators(RepositorySlug slug) Stream<Collaborator>
Lists the users that have access to the repository identified by slug. [...]
listCommitActivity(RepositorySlug slug) Stream<YearCommitCountWeek>
Fetches commit counts for the past year. [...]
listCommitComments(RepositorySlug slug) Stream<CommitComment>
Returns a list of all commit comments in a repository. [...]
listCommits(RepositorySlug slug) Stream<RepositoryCommit>
Lists the commits of the provided repository slug. [...]
listContributors(RepositorySlug slug, {bool anon = false}) Stream<Contributor>
Lists the contributors of the specified repository. [...]
listContributorStats(RepositorySlug slug) Future<List<ContributorStatistics>>
Lists repository contributor statistics. [...]
listDeployKeys(RepositorySlug slug) Stream<PublicKey>
Lists the deploy keys for a repository. [...]
listForks(RepositorySlug slug) Stream<Repository>
Lists the forks of the specified repository. [...]
listHooks(RepositorySlug slug) Stream<Hook>
Lists the hooks of the specified repository. [...]
listLanguages(RepositorySlug slug) Future<LanguageBreakdown>
Gets a language breakdown for the specified repository. [...]
listOrganizationRepositories(String org, {String type = 'all'}) Stream<Repository>
List repositories for the specified org. [...]
listPagesBuilds(RepositorySlug slug) Stream<PageBuild>
List Pages builds. [...]
listPublicRepositories({int limit = 50, DateTime? since}) Stream<Repository>
Lists all the public repositories on GitHub, in the order that they were created. [...]
listPunchcard(RepositorySlug slug) Stream<PunchcardEntry>
Fetches Punchcard. [...]
listReleaseAssets(RepositorySlug slug, Release release) Stream<ReleaseAsset>
Lists assets for a release. [...]
listReleases(RepositorySlug slug) Stream<Release>
Lists releases for the specified repository. [...]
listRepositories({String type = 'owner', String sort = 'full_name', String direction = 'asc'}) Stream<Repository>
Lists the repositories of the currently authenticated user. [...]
listSingleCommitComments(RepositorySlug slug, RepositoryCommit commit) Stream<CommitComment>
Returns a list of all comments for a specific commit. [...]
listStatuses(RepositorySlug slug, String ref) Stream<RepositoryStatus>
Lists the statuses of a repository at the specified reference. The ref can be a SHA, a branch name, or a tag name. [...]
listTags(RepositorySlug slug, {int page = 1, int? pages, int perPage = 30}) Stream<Tag>
Lists the tags of the specified repository. [...]
listTeams(RepositorySlug slug) Stream<Team>
Lists the teams of the specified repository. [...]
listUserRepositories(String user, {String type = 'owner', String sort = 'full_name', String direction = 'asc'}) Stream<Repository>
Lists the repositories of the user specified by user in a streamed fashion. [...]
merge(RepositorySlug slug, CreateMerge merge) Future<RepositoryCommit>
Merges a branch in the specified repository. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
pingHook(RepositorySlug slug, int id) Future<bool>
Pings the hook. [...]
removeCollaborator(RepositorySlug slug, String user) Future<bool>
testPushHook(RepositorySlug slug, int id) Future<bool>
Triggers a hook with the latest push. [...]
toString() String
A string representation of this object. [...]
updateCommitComment(RepositorySlug slug, {required int id, required String body}) Future<CommitComment>
Update a commit comment [...]
updateFile(RepositorySlug slug, String path, String message, String content, String sha, {String? branch}) Future<ContentCreation>
Updates the specified file. [...]
uploadReleaseAssets(Release release, Iterable<CreateReleaseAsset> createReleaseAssets) Future<List<ReleaseAsset>>


operator ==(Object other) bool
The equality operator. [...]