Skip to content

Commit 4833294

Browse files
author
Ricardo Amador
committed
Update from upstream
2 parents 0f2422a + 5db0374 commit 4833294

File tree

5 files changed

+115
-3
lines changed

5 files changed

+115
-3
lines changed

.github/workflows/publish_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v1
1515
- name: Publish
16-
uses: sakebook/actions-flutter-pub-publisher@v1.3.1
16+
uses: caseyhillers/actions-flutter-pub-publisher@v1.5.1
1717
with:
1818
credential: ${{ secrets.CREDENTIAL_JSON }}
1919
flutter_package: false
2020
skip_test: true
21-
dry_run: false
21+
dry_run: false

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 9.3.0
2+
3+
* Added a new conclusion state to support flutter autosubmit bot by @ricardoamador in https://github.com/SpinlockLabs/github.dart/pull/315
4+
5+
## New Contributors
6+
* @ricardoamador made their first contribution in https://github.com/SpinlockLabs/github.dart/pull/315
7+
8+
**Full Changelog**: https://github.com/SpinlockLabs/github.dart/compare/9.2.0...9.3.0
9+
110
## 9.2.0
211

312
* test auto-release by @robrbecker in https://github.com/SpinlockLabs/github.dart/pull/307

lib/src/common/model/checks.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CheckRunConclusion extends EnumWithValue {
4747
static const neutral = CheckRunConclusion._('neutral');
4848
static const cancelled = CheckRunConclusion._('cancelled');
4949
static const timedOut = CheckRunConclusion._('timed_out');
50+
static const skipped = CheckRunConclusion._('skipped');
5051
static const actionRequired = CheckRunConclusion._('action_required');
5152
static const empty = CheckRunConclusion._(null);
5253

@@ -62,6 +63,7 @@ class CheckRunConclusion extends EnumWithValue {
6263
neutral,
6364
cancelled,
6465
timedOut,
66+
skipped,
6567
actionRequired
6668
]) {
6769
if (level.value == value) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: github
2-
version: 9.2.0
2+
version: 9.3.0
33
description: A high-level GitHub API Client Library that uses Github's v3 API
44
homepage: https://github.com/SpinlockLabs/github.dart
55

test/unit/checks_test.dart

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,107 @@ void main() {
110110
expect(checkRun.conclusion, CheckRunConclusion.neutral);
111111
});
112112

113+
test('CheckRun fromJson for skipped conclusion', () {
114+
/// The checkRun Json is the official Github values
115+
///
116+
/// Github api url: https://docs.github.com/en/rest/reference/checks#get-a-check-run
117+
const checkRunJson = '''{
118+
"id": 10,
119+
"head_sha": "ce587453ced02b1526dfb4cb910479d431683101",
120+
"node_id": "MDg6Q2hlY2tSdW40",
121+
"external_id": "",
122+
"url": "https://api.github.com/repos/github/hello-world/check-runs/4",
123+
"html_url": "https://github.com/github/hello-world/runs/4",
124+
"details_url": "https://example.com",
125+
"status": "completed",
126+
"conclusion": "skipped",
127+
"started_at": "2018-05-04T01:14:52Z",
128+
"completed_at": "2018-05-04T01:14:52Z",
129+
"output": {
130+
"title": "Mighty Readme report",
131+
"summary": "There are 0 failures, 2 warnings, and 1 notice.",
132+
"text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.",
133+
"annotations_count": 2,
134+
"annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations"
135+
},
136+
"name": "mighty_readme",
137+
"check_suite": {
138+
"id": 5
139+
},
140+
"app": {
141+
"id": 1,
142+
"slug": "octoapp",
143+
"node_id": "MDExOkludGVncmF0aW9uMQ==",
144+
"owner": {
145+
"login": "github",
146+
"id": 1,
147+
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
148+
"url": "https://api.github.com/orgs/github",
149+
"repos_url": "https://api.github.com/orgs/github/repos",
150+
"events_url": "https://api.github.com/orgs/github/events",
151+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
152+
"gravatar_id": "",
153+
"html_url": "https://github.com/octocat",
154+
"followers_url": "https://api.github.com/users/octocat/followers",
155+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
156+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
157+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
158+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
159+
"organizations_url": "https://api.github.com/users/octocat/orgs",
160+
"received_events_url": "https://api.github.com/users/octocat/received_events",
161+
"type": "User",
162+
"site_admin": true
163+
},
164+
"name": "Octocat App",
165+
"description": "",
166+
"external_url": "https://example.com",
167+
"html_url": "https://github.com/apps/octoapp",
168+
"created_at": "2017-07-08T16:18:44-04:00",
169+
"updated_at": "2017-07-08T16:18:44-04:00",
170+
"permissions": {
171+
"metadata": "read",
172+
"contents": "read",
173+
"issues": "write",
174+
"single_file": "write"
175+
},
176+
"events": [
177+
"push",
178+
"pull_request"
179+
]
180+
},
181+
"pull_requests": [
182+
{
183+
"url": "https://api.github.com/repos/github/hello-world/pulls/1",
184+
"id": 1934,
185+
"number": 3956,
186+
"head": {
187+
"ref": "say-hello",
188+
"sha": "3dca65fa3e8d4b3da3f3d056c59aee1c50f41390",
189+
"repo": {
190+
"id": 526,
191+
"url": "https://api.github.com/repos/github/hello-world",
192+
"name": "hello-world"
193+
}
194+
},
195+
"base": {
196+
"ref": "master",
197+
"sha": "e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f",
198+
"repo": {
199+
"id": 526,
200+
"url": "https://api.github.com/repos/github/hello-world",
201+
"name": "hello-world"
202+
}
203+
}
204+
}
205+
]
206+
}''';
207+
final checkRun = CheckRun.fromJson(jsonDecode(checkRunJson));
208+
209+
expect(checkRun.id, 10);
210+
expect(checkRun.name, 'mighty_readme');
211+
expect(checkRun.conclusion, CheckRunConclusion.skipped);
212+
});
213+
113214
test('CheckRun toString', () {
114215
// indirectly tests the toJson method as well.
115216
final checkRun = CheckRun.fromJson(jsonDecode(checkRunJson));

0 commit comments

Comments
 (0)