This file contains hidden or 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
type CommitInfoCsv = CsvProvider<"Hash,Author,Date,Message", HasHeaders = false, Schema = "Hash,Author,Date(date),Message"> | |
let infoRow = CommitInfoCsv.Parse(commitInfoLine).Rows |> Seq.head | |
let commitInfo = {Hash = infoRow.Hash; Author = infoRow.Author; TimeStamp = infoRow.Date; Message = infoRow.Message} |
This file contains hidden or 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
let isCommitInfoLine (line: string) = | |
line.StartsWith("[") | |
let commitLines = commit.Split([|lineBreak|], StringSplitOptions.RemoveEmptyEntries) | |
let commitInfoLine = commitLines |> Array.takeWhile(isCommitInfoLine) |> Array.last | |
let fileLines = commitLines |> Array.skipWhile(isCommitInfoLine) |
This file contains hidden or 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
[<Literal>] | |
let lineBreak = "\r\n" | |
let filePath =Path.Combine(__SOURCE_DIRECTORY__, "..\..\Data\gitLog.log") | |
let file = File.ReadAllText(filePath) | |
let commits = file.Split([|lineBreak + lineBreak|], StringSplitOptions.RemoveEmptyEntries) |
This file contains hidden or 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
type CommitInfo = {Hash : string; Author : string; TimeStamp : DateTime; Message : string} | |
type CommittedFile = {LinesAdded: int option; LinesDeleted: int option; FileName: string} | |
type Commit = {CommitInfo: CommitInfo; Files: CommittedFile[]} |
This file contains hidden or 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
[5ecc4f7],David Winchurch,2015-12-04,Merge branch 'hotfix/caching' | |
[f31f572],David Winchurch,2015-12-04,Disabling caching in web.config to fix css isues | |
0 1 src/SFA.Apprenticeships.Web.Manage/Web.config | |
0 1 src/SFA.Apprenticeships.Web.Recruit/Web.config | |
[2510743],David Winchurch,2015-12-04,Merge branch 'release/v2.6.0' | |
[dce63ed],David Winchurch,2015-12-04,Fixing changing employer for all paths. VacancyGuid was not being passed through | |
3 1 src/SFA.Apprenticeships.Web.Raa.Common/ViewModels/VacancyPosting/EmployerSearchViewModel.cs | |
1 1 src/SFA.Apprenticeships.Web.Recruit.UnitTests/Mediators/VacancyPosting/CloneVacancyTests.cs | |
2 2 src/SFA.Apprenticeships.Web.Recruit/Controllers/VacancyPostingController.cs |
This file contains hidden or 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
git log --pretty=format:'[%h],%aN,%ad,%s' --date=short --numstat > gitLog.log |
This file contains hidden or 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
#r "../packages/FSharp.Data.2.2.5/lib/net40/FSharp.Data.dll" | |
open VGA.CodeMaatSharp | |
open System | |
open System.IO | |
open FSharp.Data | |
// Define your library scripting code here | |
// git log --pretty=format:'[%h],%aN,%ad,%s' --date=short --numstat > pollz.log | |
[<Literal>] | |
let lineBreak = "\r\n" |
This file contains hidden or 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
[HttpPost] | |
[MultipleFormActionsButtonWithParameter(SubmitButtonActionName = "SpecifyIngredients")] | |
[FillParameterFromActionName(ParameterName = "ingredientIndex", ParameterType = TypeCode.Int32, SubmitButtonActionName = "SpecifyIngredients")] | |
public ActionResult UseIngredient(RecipeViewModel viewModel, int ingredientIndex) | |
{ | |
... | |
} |
This file contains hidden or 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 FillParameterFromActionName : ActionFilterAttribute | |
{ | |
public string ParameterName { get; set; } | |
public string SubmitButtonActionName { get; set; } | |
public TypeCode ParameterType { get; set; } | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ |