Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Arnie/Arnie.svc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ string IRestService.DoItNow(GitHubPushWebhook pushInfo)

try
{
repositories = config.repos.Where(repo => (string)pushInfo.repository[repo.repo_key] == repo.repo_value).ToList();
// get list of repos by matching key
// and ref if present
repositories = config.repos.Where(repo => (string)pushInfo.repository[repo.repo_key] == repo.repo_value
&& (string.IsNullOrEmpty(repo.ref_) ? true : pushInfo.ref_ == repo.ref_)).ToList();
}
catch (Exception exc)
{
Expand Down
3 changes: 3 additions & 0 deletions Arnie/Repos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class RepositoryConfig

[DataMember(Name = "repo_value")]
public string repo_value { get; set; }

[DataMember(Name = "ref")]
public string ref_ { get; set; }
}

[DataContract]
Expand Down
13 changes: 13 additions & 0 deletions Arnie/Web.Release.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,17 @@
</customErrors>
-->
</system.web>

<system.serviceModel>
<bindings>
<webHttpBinding>
<binding>
<!-- Set for https connections when deployed -->
<security mode="Transport" xdt:Transform="SetAttributes(mode)">
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>

</configuration>
13 changes: 11 additions & 2 deletions Arnie/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding>
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
</bindings>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<add binding="webHttpBinding" scheme="http" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
Expand Down