This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"action": "created", | |
"issue": { | |
"url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2", | |
"labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/labels{/name}", | |
"comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/comments", | |
"events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/events", | |
"html_url": "https://github.com/baxterthehacker/public-repo/issues/2", | |
"id": 73464126, | |
"number": 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BountyfulUser | |
{ | |
public int Id { get; set; } | |
public string UserName { get; set; } | |
public int BountiesCompleted { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DashboardController : Controller | |
{ | |
UserBounty db = new UserBounty(); | |
// GET: Dashboard | |
public ActionResult Index() | |
{ | |
var topUsers = db.Users | |
.OrderByDescending(x => x.BountiesCompleted) | |
.Take(10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<BountyCount.BountyfulUser> | |
@{ | |
ViewBag.Title = "Dashboard"; | |
} | |
<h2>Top Bounty Hunters!</h2> | |
<table class="table"> | |
<tr> | |
<th> | |
@Html.DisplayNameFor(model => model.UserName) | |
</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | |
xmlns:spring="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd | |
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | |
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | |
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd | |
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin tran | |
if exists (select * from dbo.BountyfulUsers with (updlock,serializable) where dbo.BountyfulUsers.UserName = '#[payload.userId]') | |
begin | |
update dbo.BountyfulUsers set BountiesCompleted += 1 | |
where dbo.BountyfulUsers.UserName = '#[payload.userId]' | |
end | |
else | |
begin | |
insert into dbo.BountyfulUsers (UserName, BountiesCompleted) | |
values ('#[payload.userId]', 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pull_request" : { | |
}, | |
"action": "opened" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pull_request":{ | |
}, | |
"action":"closed" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"expression": { | |
"issue": { | |
"%exists": true | |
} | |
}, | |
"action": { | |
"%in": [ | |
"opened" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"projection": { | |
"issue.html_url": 1, | |
"issue.id": 1, | |
"issue.title": 1, | |
"issue.comments": 1, | |
"issue.created_at": 1, | |
"repository.name": 1, | |
"repository.html_url": 1, | |
} |
OlderNewer