We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4196991 + 8f2e5d6 commit dba284bCopy full SHA for dba284b
lib/src/common/repos_service.dart
@@ -942,6 +942,18 @@ class RepositoriesService extends Service {
942
);
943
}
944
945
+ /// Lists the latest release for the specified repository.
946
+ ///
947
+ /// API docs: https://developer.github.com/v3/repos/releases/#get-the-latest-release
948
+ Future<Release> getLatestRelease(RepositorySlug slug) {
949
+ ArgumentError.checkNotNull(slug);
950
+ return github.getJSON<Map<String, dynamic>, Release>(
951
+ '/repos/${slug.fullName}/releases/latest',
952
+ convert: (i) => Release.fromJson(i),
953
+ statusCode: StatusCodes.OK,
954
+ );
955
+ }
956
+
957
/// Fetches a single release by the release ID.
958
///
959
/// API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release
0 commit comments