Skip to content

Commit 2537ac7

Browse files
Implement queueing try builds via GitHub comment
1 parent 0c4d201 commit 2537ac7

File tree

5 files changed

+230
-8
lines changed

5 files changed

+230
-8
lines changed

Cargo.lock

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ chrono = "0.4"
1919
flate2 = "1.0.1"
2020
rmp-serde = "0.13.7"
2121
semver = "0.9"
22+
ring = "0.13.0-alpha5"
23+
hex = "0.3.2"
24+
regex = "1"
25+
lazy_static = "1"
26+
reqwest = "0.8"
2227

2328
[dependencies.collector]
2429
path = "../collector"

site/src/api.rs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,60 @@ pub mod status {
208208
}
209209
}
210210

211+
pub mod github {
212+
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
213+
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
214+
pub enum Association {
215+
Owner,
216+
Member,
217+
Contributor,
218+
Collaborator,
219+
FirstTimer,
220+
FirstTimeContributor,
221+
None,
222+
}
223+
224+
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
225+
pub struct User {
226+
pub login: String,
227+
}
228+
229+
#[derive(Debug, Clone, Serialize, Deserialize)]
230+
pub struct Comment {
231+
pub html_url: String,
232+
pub author_association: Association,
233+
pub user: User,
234+
pub body: String,
235+
}
236+
237+
#[derive(Debug, Clone, Serialize, Deserialize)]
238+
pub struct Issue {
239+
pub comments_url: String,
240+
pub repository_url: String,
241+
}
242+
243+
#[derive(Debug, Clone, Serialize, Deserialize)]
244+
pub struct Request {
245+
pub issue: Issue,
246+
pub comment: Comment,
247+
}
248+
249+
#[derive(Debug, Clone, Serialize, Deserialize)]
250+
pub struct Response;
251+
252+
#[derive(Debug, Clone, Serialize, Deserialize)]
253+
pub struct CommitParent {
254+
pub sha: String,
255+
}
256+
257+
#[derive(Debug, Clone, Serialize, Deserialize)]
258+
pub struct Commit {
259+
pub sha: String,
260+
pub parents: Vec<CommitParent>,
261+
}
262+
263+
#[derive(Debug, Clone, Serialize)]
264+
pub struct PostComment {
265+
pub body: String,
266+
}
267+
}

site/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ extern crate collector;
1313
extern crate flate2;
1414
extern crate futures;
1515
extern crate futures_cpupool;
16+
#[macro_use]
1617
extern crate hyper;
1718
#[macro_use]
1819
extern crate log;
@@ -26,6 +27,12 @@ extern crate url;
2627
extern crate semver;
2728
#[macro_use]
2829
extern crate failure;
30+
extern crate ring;
31+
extern crate hex;
32+
extern crate regex;
33+
#[macro_use]
34+
extern crate lazy_static;
35+
extern crate reqwest;
2936

3037
#[derive(Fail, Debug)]
3138
#[fail(display = "command failed: {}", command)]

0 commit comments

Comments
 (0)