Example #1
0
        public static ICheckResult CheckNewReleaseNotes(
            this ICakeContext context,
            CheckSettings checkSettings)
        {
            if (!checkSettings.RequireReleaseNotes)
            {
                return(new CheckSkipped());
            }

            if (context.AnyReleaseNotes(checkSettings.ReleaseNotesVNextFile))
            {
                return(new CheckPassed());
            }

            return(CheckFailed.WithReason(
                       $"No new release notes found in {checkSettings.ReleaseNotesVNextFile}"));
        }