-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,172 additions
and
44 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These owners will be the default owners for everything in the repo and | ||
# will be requested for review when someone opens a pull request. | ||
* @pascalberger |
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
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
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
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
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
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
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
108 changes: 108 additions & 0 deletions
108
Cake.Issues.Recipe/Content/tasks/buildservers/AppVeyorBuildServer.cake
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/// <summary> | ||
/// Support for AppVeyor builds. | ||
/// </summary> | ||
public class AppVeyorBuildServer : BaseBuildServer | ||
{ | ||
/// <inheritdoc /> | ||
public override Uri DetermineRepositoryRemoteUrl( | ||
ICakeContext context, | ||
DirectoryPath repositoryRootDirectory) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
switch(context.AppVeyor().Environment.Repository.Provider) | ||
{ | ||
case "bitBucket": return new System.Uri($"https://bitbucket.org/{context.AppVeyor().Environment.Repository.Name}/src"); | ||
case "gitHub": return new System.Uri($"https://github.com/{context.AppVeyor().Environment.Repository.Name}.git"); | ||
case "gitLab": return new System.Uri($"https://gitlab.com/{context.AppVeyor().Environment.Repository.Name}.git"); | ||
case "vso": return new System.Uri($"https://dev.azure.com/{context.AppVeyor().Environment.Repository.Name}"); | ||
default: return new System.Uri(context.AppVeyor().Environment.Repository.Name); | ||
} | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override bool DetermineIfPullRequest(ICakeContext context) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
return context.AppVeyor().Environment.PullRequest.IsPullRequest; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override int? DeterminePullRequestId(ICakeContext context) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
return context.AppVeyor().Environment.PullRequest.Number; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void ReportIssuesToBuildServer( | ||
ICakeContext context, | ||
IssuesData data) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
if (data == null) | ||
{ | ||
throw new ArgumentNullException(nameof(data)); | ||
} | ||
|
||
context.ReportIssuesToPullRequest( | ||
data.Issues, | ||
context.AppVeyorBuilds(), | ||
data.RepositoryRootDirectory); | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void CreateSummaryIssuesReport( | ||
ICakeContext context, | ||
IssuesData data, | ||
[System.Runtime.CompilerServices.CallerFilePath] string sourceFilePath = "") | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
if (data == null) | ||
{ | ||
throw new ArgumentNullException(nameof(data)); | ||
} | ||
|
||
// Summary issues report is not supported for AppVeyor. | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void PublishIssuesArtifacts(ICakeContext context, IssuesData data) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
if (data == null) | ||
{ | ||
throw new ArgumentNullException(nameof(data)); | ||
} | ||
|
||
if (IssuesParameters.BuildServer.ShouldPublishFullIssuesReport && | ||
data.FullIssuesReport != null && | ||
context.FileExists(data.FullIssuesReport)) | ||
{ | ||
context.AppVeyor().UploadArtifact(data.FullIssuesReport); | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.