diff --git a/.gitignore b/.gitignore index 04f07c74a2..4184f93872 100644 --- a/.gitignore +++ b/.gitignore @@ -72,11 +72,6 @@ Generated_Code #added for RIA/Silverlight projects nunit-*.xml *.userprefs packaging/ -tools/FAKE.Core -tools/SourceLink.Fake -tools/xunit.runner.console -tools/Octokit.CodeFormatter -tools/FSharp.Data *.ncrunch* *.GhostDoc.xml @@ -94,4 +89,20 @@ docs/_build Backup/ # .NET Core -project.lock.json \ No newline at end of file +*.lock.json + +# VSCode +**/.vscode/* +!**/.vscode/settings.json +!**/.vscode/tasks.json +!**/.vscode/launch.json + +# CAKE +.dotnet/* +tools/* +!tools/gitversion_wrapper.sh +!tools/LINQPad +coverage-results/* + +# Rider +**/.idea/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 811de032f1..de538fc67c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,26 @@ language: csharp +notifications: + email: false + matrix: include: - os: linux - dist: trusty + dist: xenial sudo: required - mono: 4.2.3 - dotnet: 1.0.0-preview2-003121 + dotnet: 2.2 - os: osx - osx_image: xcode8 - mono: 4.2.3 - dotnet: 1.0.0-preview2-003121 + osx_image: xcode8.3 + dotnet: 2.2.402 -before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi +branches: + only: + - "master" -install: - - nuget restore Octokit-Mono.sln +before_script: + - if test "$TRAVIS_OS_NAME" == "osx"; then export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/; else export FrameworkPathOverride=/usr/lib/mono/4.5/; fi script: - - mono tools/nuget/NuGet.exe restore Octokit-Mono.sln - - ./build.sh BuildMono - - ./build.sh - - dotnet --info - - ./build.sh UnitTestsDotNetCore + - git fetch --unshallow --tags + # disengage core only switch because mono ships .NETFramework targets + - ./build.sh --coreonly=false --linksources=true --verbosity=verbose diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f55ffc71e2..61788160a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ easiest way to do this. You can then clone down your fork instead: `git clone https://github.com/MY-USERNAME-HERE/Octokit.net.git Octokit` -After doing that, run the `.\build` script at the root of the repository +After doing that, run the `.\build.ps1` or `./build.sh` script at the root of the repository to ensure everything builds and the tests pass. ## How can I get involved? @@ -56,23 +56,31 @@ potential conflicts that may occur in the future. If you make focused commits (instead of one monolithic commit) and have descriptive commit messages, this will help speed up the review process. -### Adding New files +At any time you can build the project with -To ensure new files are available in the various projects, we have a helper script -to synchronize these changes across all the projects in the solution. +`.\build.ps1 -Target Build` +or +`./build.sh --target=build` -If you need to create new files: +this will also run code analysis rules. - - add the file to the main `Octokit` project - - build the project (to ensure the `csproj` change is saved) - - run this command: `.\build FixProjects` +### Running builds cross platform -At any time you can build the project with `.\build BuildApp` - this will also -run FxCop analysis. +Octokit.net uses a CAKE build script and can be built on multiple platforms. + +To install dependencies and run the CAKE build script use the following wrapper scripts and parameter syntax: + +- Windows (Powershell) + +`.\build.ps1 -Target -Configuration Release -LinkSources [Additional Parameters]` + +- Linux/OSX (bash) + +`./build.sh --target= --configuration==Release --linksources=true [Additional Parameters]` ### Running Tests -Octokit.net also has a suite of tests which you can run to ensure existing +Octokit.net has a suite of tests which you can run to ensure existing behaviour is not affected. If you're adding new features, please add some tests alongside so the maintainers can sleep at night, knowing their safety blanket is nice and green! @@ -81,13 +89,21 @@ The test suite is arranged into fast and slow tests. #### Fast Tests -**Unit Tests:** `.\build UnitTests` +**Unit Tests:** + +`.\build.ps1 -Target UnitTests` or `./build.sh --target=UnitTests` + +Alternatively, you can run the `Octokit.Tests` assembly in the Visual Studio test runner. These tests verify specific behaviour while being isolated from the rest of the library. If you are not familiar with unit testing, have a look at the existing examples - they should be easy to apply to your work. -**Convention Tests:** `.\build ConventionTests` +**Convention Tests:** + +`.\build.ps1 -Target ConventionTests` or `./build.sh --target=ConventionTests` + +Alternatively, you can run the `Octokit.Tests.Conventions` assembly in the Visual Studio test runner. These tests verify conventions and structure across the entire codebase - ensuring everything is consistent and predictable. When writing new features, @@ -108,17 +124,21 @@ variables: `.\script\configure-integration-tests.ps1` +NOTE: On Linux/OSX the environment variables currently need to be configured manually. + After running this, ensure any existing instances of Visual Studio are restarted so they pick up the new environment variables are detected. With these variables set, you can run the integration tests locally using -`.\build IntegrationTests` or by running the `Octokit.Tests.Integration` -assembly in the Visual Studio test runner. -**Note:** as the integration tests rely on using the actual GitHub API, you may -encounter issues if running the tests too frequently. Please use a test account -so that you're not impacted in the unlikely scenario of your account being -flagged as a spammer. +`.\build.ps1 -Target IntegrationTests` or `./build.sh --target=IntegrationTests` + +Alternatively, you can run the `Octokit.Tests.Integration` assembly in the Visual Studio test runner. + +**Note:** as the integration tests rely on using the actual GitHub API, you will encounter +API rate limit/abuse detection issues if running the tests too frequently. Please use a test account +so that your main account is not impacted in the event that the tests trigger the GitHub abuse +detection mechanism. ### Testing Documentation diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000000..b67ea5a1c4 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,13 @@ +mode: ContinuousDeployment +branches: + master: + mode: ContinuousDeployment + increment: Minor + tag: beta + develop: + mode: ContinuousDeployment + increment: Minor + tag: alpha + source-branches: ['dotnetcore'] +ignore: + sha: [] \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 332c368624..f8ef24fa72 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2012 GitHub, Inc. +Copyright (c) 2017 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/Octokit-Mono.sln b/Octokit-Mono.sln deleted file mode 100644 index 50b39d264f..0000000000 --- a/Octokit-Mono.sln +++ /dev/null @@ -1,59 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit", "Octokit\Octokit.csproj", "{08DD4305-7787-4823-A53F-4D0F725A07F3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit-Portable", "Octokit\Octokit-Portable.csproj", "{DDB20481-E17D-4E0A-B2C0-FFFF78D4ED71}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit-Mono", "Octokit\Octokit-Mono.csproj", "{49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Reactive", "Octokit.Reactive\Octokit.Reactive.csproj", "{674B69B8-0780-4D54-AE2B-C15821FA51CB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Reactive-Mono", "Octokit.Reactive\Octokit.Reactive-Mono.csproj", "{59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Tests", "Octokit.Tests\Octokit.Tests.csproj", "{149448D4-C2F2-4DF9-86BD-03E3272F093B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Tests-Portable", "Octokit.Tests\Octokit.Tests-Portable.csproj", "{CBE29DDD-F15C-46CC-A250-E6ECF55BEED4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Tests.Conventions", "Octokit.Tests.Conventions\Octokit.Tests.Conventions.csproj", "{5345E2E6-4E7C-40F8-831B-E491F6051D3C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|x86.ActiveCfg = Debug|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|x86.Build.0 = Debug|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|x86.ActiveCfg = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|x86.Build.0 = Release|Any CPU - {149448D4-C2F2-4DF9-86BD-03E3272F093B}.Debug|x86.ActiveCfg = Debug|Any CPU - {149448D4-C2F2-4DF9-86BD-03E3272F093B}.Debug|x86.Build.0 = Debug|Any CPU - {149448D4-C2F2-4DF9-86BD-03E3272F093B}.Release|x86.ActiveCfg = Release|Any CPU - {149448D4-C2F2-4DF9-86BD-03E3272F093B}.Release|x86.Build.0 = Release|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|x86.ActiveCfg = Debug|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|x86.Build.0 = Debug|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|x86.ActiveCfg = Release|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|x86.Build.0 = Release|Any CPU - {5345E2E6-4E7C-40F8-831B-E491F6051D3C}.Debug|x86.ActiveCfg = Debug|Any CPU - {5345E2E6-4E7C-40F8-831B-E491F6051D3C}.Debug|x86.Build.0 = Debug|Any CPU - {5345E2E6-4E7C-40F8-831B-E491F6051D3C}.Release|x86.ActiveCfg = Release|Any CPU - {5345E2E6-4E7C-40F8-831B-E491F6051D3C}.Release|x86.Build.0 = Release|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|x86.ActiveCfg = Debug|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|x86.Build.0 = Debug|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|x86.ActiveCfg = Release|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|x86.Build.0 = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|x86.ActiveCfg = Debug|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|x86.Build.0 = Debug|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|x86.ActiveCfg = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|x86.Build.0 = Release|Any CPU - {CBE29DDD-F15C-46CC-A250-E6ECF55BEED4}.Debug|x86.ActiveCfg = Debug|Any CPU - {CBE29DDD-F15C-46CC-A250-E6ECF55BEED4}.Debug|x86.Build.0 = Debug|Any CPU - {CBE29DDD-F15C-46CC-A250-E6ECF55BEED4}.Release|x86.ActiveCfg = Release|Any CPU - {CBE29DDD-F15C-46CC-A250-E6ECF55BEED4}.Release|x86.Build.0 = Release|Any CPU - {DDB20481-E17D-4E0A-B2C0-FFFF78D4ED71}.Debug|x86.ActiveCfg = Debug|Any CPU - {DDB20481-E17D-4E0A-B2C0-FFFF78D4ED71}.Debug|x86.Build.0 = Debug|Any CPU - {DDB20481-E17D-4E0A-B2C0-FFFF78D4ED71}.Release|x86.ActiveCfg = Release|Any CPU - {DDB20481-E17D-4E0A-B2C0-FFFF78D4ED71}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/Octokit-XamarinStudio.sln b/Octokit-XamarinStudio.sln deleted file mode 100644 index 87a2a3ec46..0000000000 --- a/Octokit-XamarinStudio.sln +++ /dev/null @@ -1,83 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit-MonoAndroid", "Octokit\Octokit-MonoAndroid.csproj", "{B24FC6FA-B80C-4EC7-8AFF-05DE2C923869}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Reactive-MonoAndroid", "Octokit.Reactive\Octokit.Reactive-MonoAndroid.csproj", "{B24FC6FF-0801-4FC7-8AFF-05DE2C923869}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit-Monotouch", "Octokit\Octokit-Monotouch.csproj", "{E4AD1421-8844-4236-9A0B-C4D96AF53908}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Reactive-Monotouch", "Octokit.Reactive\Octokit.Reactive-Monotouch.csproj", "{F4ADA431-8344-4B36-9A0B-C4D96AF53908}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit-Mono", "Octokit\Octokit-Mono.csproj", "{49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Reactive-Mono", "Octokit.Reactive\Octokit.Reactive-Mono.csproj", "{59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49EF16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|Any CPU.Build.0 = Release|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59AB16A2-5ED1-480F-80A1-D1D05D6C1BE4}.Release|Any CPU.Build.0 = Release|Any CPU - {B24FC6FA-B80C-4EC7-8AFF-05DE2C923869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B24FC6FA-B80C-4EC7-8AFF-05DE2C923869}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B24FC6FA-B80C-4EC7-8AFF-05DE2C923869}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B24FC6FA-B80C-4EC7-8AFF-05DE2C923869}.Release|Any CPU.Build.0 = Release|Any CPU - {B24FC6FF-0801-4FC7-8AFF-05DE2C923869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B24FC6FF-0801-4FC7-8AFF-05DE2C923869}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B24FC6FF-0801-4FC7-8AFF-05DE2C923869}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B24FC6FF-0801-4FC7-8AFF-05DE2C923869}.Release|Any CPU.Build.0 = Release|Any CPU - {E4AD1421-8844-4236-9A0B-C4D96AF53908}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E4AD1421-8844-4236-9A0B-C4D96AF53908}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E4AD1421-8844-4236-9A0B-C4D96AF53908}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E4AD1421-8844-4236-9A0B-C4D96AF53908}.Release|Any CPU.Build.0 = Release|Any CPU - {F4ADA431-8344-4B36-9A0B-C4D96AF53908}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F4ADA431-8344-4B36-9A0B-C4D96AF53908}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F4ADA431-8344-4B36-9A0B-C4D96AF53908}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F4ADA431-8344-4B36-9A0B-C4D96AF53908}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = Octokit\Octokit-MonoAndroid.csproj - Policies = $0 - $0.TextStylePolicy = $1 - $1.inheritsSet = VisualStudio - $1.inheritsScope = text/plain - $1.scope = text/plain - $0.CSharpFormattingPolicy = $2 - $2.IndentSwitchBody = True - $2.IndentBlocksInsideExpressions = True - $2.AnonymousMethodBraceStyle = NextLine - $2.PropertyBraceStyle = NextLine - $2.PropertyGetBraceStyle = NextLine - $2.PropertySetBraceStyle = NextLine - $2.EventBraceStyle = NextLine - $2.EventAddBraceStyle = NextLine - $2.EventRemoveBraceStyle = NextLine - $2.StatementBraceStyle = NextLine - $2.ElseNewLinePlacement = NewLine - $2.CatchNewLinePlacement = NewLine - $2.FinallyNewLinePlacement = NewLine - $2.WhileNewLinePlacement = DoNotCare - $2.ArrayInitializerWrapping = DoNotChange - $2.ArrayInitializerBraceStyle = NextLine - $2.BeforeMethodDeclarationParentheses = False - $2.BeforeMethodCallParentheses = False - $2.BeforeConstructorDeclarationParentheses = False - $2.NewLineBeforeConstructorInitializerColon = NewLine - $2.NewLineAfterConstructorInitializerColon = SameLine - $2.BeforeDelegateDeclarationParentheses = False - $2.NewParentheses = False - $2.SpacesBeforeBrackets = False - $2.inheritsSet = Mono - $2.inheritsScope = text/x-csharp - $2.scope = text/x-csharp - EndGlobalSection -EndGlobal diff --git a/Octokit.Core.sln b/Octokit.Core.sln deleted file mode 100644 index ed6aab0995..0000000000 --- a/Octokit.Core.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Octokit.Next", "Octokit.Next\Octokit.Next.xproj", "{4052AF53-4C1B-48D1-B873-BFD0351481C3}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Octokit.Next.Tests", "Octokit.Next.Tests\Octokit.Next.Tests.xproj", "{2740AF44-CB2E-4FD8-A221-248693978A0C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4052AF53-4C1B-48D1-B873-BFD0351481C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4052AF53-4C1B-48D1-B873-BFD0351481C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4052AF53-4C1B-48D1-B873-BFD0351481C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4052AF53-4C1B-48D1-B873-BFD0351481C3}.Release|Any CPU.Build.0 = Release|Any CPU - {2740AF44-CB2E-4FD8-A221-248693978A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2740AF44-CB2E-4FD8-A221-248693978A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2740AF44-CB2E-4FD8-A221-248693978A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2740AF44-CB2E-4FD8-A221-248693978A0C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Octokit.Next.Tests/CalculatorTests.cs b/Octokit.Next.Tests/CalculatorTests.cs deleted file mode 100644 index 7060e73723..0000000000 --- a/Octokit.Next.Tests/CalculatorTests.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Octokit.Next.Tests -{ - using Xunit; - - public class CalculatorTests - { - private readonly Calculator _sut; - - public CalculatorTests() - { - _sut = new Calculator(); - } - - [Theory] - [InlineData(1, 1, 2)] - [InlineData(1, 2, 3)] - [InlineData(2, 1, 3)] - [InlineData(-1, 1, 0)] - public void AddingTwoIntegers_ShouldReturnExpectedResult(int x, int y, int expected) - { - Assert.Equal(expected, _sut.Add(x, y)); - } - } -} diff --git a/Octokit.Next.Tests/Octokit.Next.Tests.xproj b/Octokit.Next.Tests/Octokit.Next.Tests.xproj deleted file mode 100644 index 17d797e1c4..0000000000 --- a/Octokit.Next.Tests/Octokit.Next.Tests.xproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 2740af44-cb2e-4fd8-a221-248693978a0c - Octokit.Next.Tests - .\obj - .\bin\ - v4.5 - - - 2.0 - - - - - - \ No newline at end of file diff --git a/Octokit.Next.Tests/Properties/AssemblyInfo.cs b/Octokit.Next.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index cc74232ec0..0000000000 --- a/Octokit.Next.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Octokit.Next.Tests")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2740af44-cb2e-4fd8-a221-248693978a0c")] diff --git a/Octokit.Next.Tests/project.json b/Octokit.Next.Tests/project.json deleted file mode 100644 index ca49aeeff0..0000000000 --- a/Octokit.Next.Tests/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0.0-*", - "testRunner": "xunit", - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - }, - "Octokit.Next": "*", - "dotnet-test-xunit": "2.2.0-preview2-build1029", - "xunit": "2.2.0-beta2-build3300" - }, - "frameworks": { - "netcoreapp1.0": {} - } -} diff --git a/Octokit.Next/Calculator.cs b/Octokit.Next/Calculator.cs deleted file mode 100644 index 588dd52355..0000000000 --- a/Octokit.Next/Calculator.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Octokit.Next -{ - public class Calculator - { - public int Add(int x, int y) - { - return x + y; - } - } -} diff --git a/Octokit.Next/Octokit.Next.xproj b/Octokit.Next/Octokit.Next.xproj deleted file mode 100644 index 4f649fe3e8..0000000000 --- a/Octokit.Next/Octokit.Next.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - 4052af53-4c1b-48d1-b873-bfd0351481c3 - Octokit.Next - .\obj - .\bin\ - v4.5 - - - - 2.0 - - - diff --git a/Octokit.Next/Properties/AssemblyInfo.cs b/Octokit.Next/Properties/AssemblyInfo.cs deleted file mode 100644 index 22c1c95109..0000000000 --- a/Octokit.Next/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Octokit.Next")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4052af53-4c1b-48d1-b873-bfd0351481c3")] diff --git a/Octokit.Next/project.json b/Octokit.Next/project.json deleted file mode 100644 index ae9aa1c119..0000000000 --- a/Octokit.Next/project.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "1.0.0-*", - - "dependencies": { - "NETStandard.Library": "1.6.0" - }, - - "frameworks": { - "netstandard1.1": {} - } -} diff --git a/Octokit.Reactive.nuspec b/Octokit.Reactive.nuspec deleted file mode 100644 index 260c104509..0000000000 --- a/Octokit.Reactive.nuspec +++ /dev/null @@ -1,19 +0,0 @@ - - - - @project@ - @build.number@ - @authors@ - @authors@ - @summary@ - https://github.com/octokit/octokit.net/blob/master/LICENSE.txt - https://github.com/octokit/octokit.net - https://f.cloud.github.com/assets/19977/1510987/64af2b26-4a9d-11e3-89fc-96a185171c75.png - false - @description@ - @releaseNotes@ - Copyright GitHub 2013 - GitHub API Octokit linqpad-samples - @dependencies@ - - diff --git a/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseClient.cs b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseClient.cs index 018c48e8de..f3aa7fdcc3 100644 --- a/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseClient.cs @@ -13,7 +13,7 @@ public interface IObservableEnterpriseClient /// /// /// See the Enterprise Admin Stats API documentation for more information. - /// + /// IObservableEnterpriseAdminStatsClient AdminStats { get; } /// @@ -21,7 +21,7 @@ public interface IObservableEnterpriseClient /// /// /// See the Enterprise LDAP API documentation for more information. - /// + /// IObservableEnterpriseLdapClient Ldap { get; } /// @@ -29,15 +29,23 @@ public interface IObservableEnterpriseClient /// /// /// See the Enterprise License API documentation for more information. - /// + /// IObservableEnterpriseLicenseClient License { get; } + /// + /// A client for GitHub's Enterprise Management Console API + /// + /// + /// See the Enterprise Management Console API documentation for more information. + /// + IObservableEnterpriseManagementConsoleClient ManagementConsole { get; } + /// /// A client for GitHub's Enterprise Organization API /// /// /// See the Enterprise Organization API documentation for more information. - /// + /// IObservableEnterpriseOrganizationClient Organization { get; } /// @@ -45,7 +53,15 @@ public interface IObservableEnterpriseClient /// /// /// See the Enterprise Search Indexing API documentation for more information. - /// + /// IObservableEnterpriseSearchIndexingClient SearchIndexing { get; } + + /// + /// A client for GitHub's Enterprise Pre-receive Environments API + /// + /// + /// See the Enterprise Pre-receive Environments API documentation for more information. + /// + IObservableEnterprisePreReceiveEnvironmentsClient PreReceiveEnvironment { get; } } } diff --git a/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseManagementConsoleClient.cs b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseManagementConsoleClient.cs new file mode 100644 index 0000000000..816f850e6d --- /dev/null +++ b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseManagementConsoleClient.cs @@ -0,0 +1,33 @@ +using System; +using System.Diagnostics.CodeAnalysis; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Enterprise Management Console API + /// + /// + /// See the Enterprise Management Console API documentation for more information. + /// + public interface IObservableEnterpriseManagementConsoleClient + { + /// + /// Gets GitHub Enterprise Maintenance Mode Status + /// + /// + /// https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status + /// + /// The . + [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] + IObservable GetMaintenanceMode(string managementConsolePassword); + + /// + /// Sets GitHub Enterprise Maintenance Mode + /// + /// + /// https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status + /// + /// The . + IObservable EditMaintenanceMode(UpdateMaintenanceRequest maintenance, string managementConsolePassword); + } +} diff --git a/Octokit.Reactive/Clients/Enterprise/IObservableEnterprisePreReceiveEnvironmentsClient.cs b/Octokit.Reactive/Clients/Enterprise/IObservableEnterprisePreReceiveEnvironmentsClient.cs new file mode 100644 index 0000000000..2bc29fa2bb --- /dev/null +++ b/Octokit.Reactive/Clients/Enterprise/IObservableEnterprisePreReceiveEnvironmentsClient.cs @@ -0,0 +1,100 @@ +using System; +using System.Reactive; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Enterprise Pre-receive Environments API + /// + /// + /// See the Enterprise Pre-receive Environments API documentation for more information. + /// + public interface IObservableEnterprisePreReceiveEnvironmentsClient + { + /// + /// Gets all s. + /// + /// + /// See the API documentation for more information. + /// + /// Thrown when a general API error occurs. + IObservable GetAll(); + + /// + /// Gets all s. + /// + /// + /// See the API documentation for more information. + /// + /// Options for changing the API response + /// Thrown when a general API error occurs. + IObservable GetAll(ApiOptions options); + + /// + /// Gets a single . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + IObservable Get(long environmentId); + + /// + /// Creates a new . + /// + /// + /// See the API documentation for more information. + /// + /// A description of the pre-receive environment to create + /// Thrown when a general API error occurs. + IObservable Create(NewPreReceiveEnvironment newPreReceiveEnvironment); + + /// + /// Edits an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// A description of the pre-receive environment to edit + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + IObservable Edit(long environmentId, UpdatePreReceiveEnvironment updatePreReceiveEnvironment); + + /// + /// Deletes an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + IObservable Delete(long environmentId); + + /// + /// Gets the download status for an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + IObservable DownloadStatus(long environmentId); + + /// + /// Triggers a new download of the 's tarball from the environment's . + /// When the download is finished, the newly downloaded tarball will overwrite the existing environment. + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + IObservable TriggerDownload(long environmentId); + } +} diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs index 1ae1f61682..0de02bff46 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs @@ -15,7 +15,7 @@ public class ObservableEnterpriseAdminStatsClient : IObservableEnterpriseAdminSt public ObservableEnterpriseAdminStatsClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Enterprise.AdminStats; } diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs index a463212a72..e9d01ae29e 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs @@ -10,13 +10,15 @@ public class ObservableEnterpriseClient : IObservableEnterpriseClient { public ObservableEnterpriseClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); AdminStats = new ObservableEnterpriseAdminStatsClient(client); Ldap = new ObservableEnterpriseLdapClient(client); License = new ObservableEnterpriseLicenseClient(client); + ManagementConsole = new ObservableEnterpriseManagementConsoleClient(client); Organization = new ObservableEnterpriseOrganizationClient(client); SearchIndexing = new ObservableEnterpriseSearchIndexingClient(client); + PreReceiveEnvironment = new ObservableEnterprisePreReceiveEnvironmentsClient(client); } /// @@ -24,7 +26,7 @@ public ObservableEnterpriseClient(IGitHubClient client) /// /// /// See the Enterprise Admin Stats API documentation for more information. - /// + /// public IObservableEnterpriseAdminStatsClient AdminStats { get; private set; } /// @@ -32,7 +34,7 @@ public ObservableEnterpriseClient(IGitHubClient client) /// /// /// See the Enterprise LDAP API documentation for more information. - /// + /// public IObservableEnterpriseLdapClient Ldap { get; private set; } /// @@ -40,15 +42,23 @@ public ObservableEnterpriseClient(IGitHubClient client) /// /// /// See the Enterprise License API documentation for more information. - /// + /// public IObservableEnterpriseLicenseClient License { get; private set; } + /// + /// A client for GitHub's Enterprise Management Console API + /// + /// + /// See the Enterprise Management Console API documentation for more information. + /// + public IObservableEnterpriseManagementConsoleClient ManagementConsole { get; private set; } + /// /// A client for GitHub's Enterprise Organization API /// /// /// See the Enterprise Organization API documentation for more information. - /// + /// public IObservableEnterpriseOrganizationClient Organization { get; private set; } /// @@ -56,7 +66,15 @@ public ObservableEnterpriseClient(IGitHubClient client) /// /// /// See the Enterprise Search Indexing API documentation for more information. - /// + /// public IObservableEnterpriseSearchIndexingClient SearchIndexing { get; private set; } + + /// + /// A client for GitHub's Enterprise Pre-receive Environments API + /// + /// + /// See the Enterprise Pre-receive Environments API documentation for more information. + /// + public IObservableEnterprisePreReceiveEnvironmentsClient PreReceiveEnvironment { get; private set; } } } diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs index 0a037406f0..b6fb718455 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs @@ -3,7 +3,6 @@ using System.Reactive.Threading.Tasks; using Octokit; - namespace Octokit.Reactive { /// @@ -18,7 +17,7 @@ public class ObservableEnterpriseLdapClient : IObservableEnterpriseLdapClient public ObservableEnterpriseLdapClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Enterprise.Ldap; } diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs index bf85248392..d3ca1e8e1b 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs @@ -2,7 +2,6 @@ using System.Reactive.Threading.Tasks; using Octokit; - namespace Octokit.Reactive { /// @@ -17,7 +16,7 @@ public class ObservableEnterpriseLicenseClient : IObservableEnterpriseLicenseCli public ObservableEnterpriseLicenseClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Enterprise.License; } diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseManagementConsoleClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseManagementConsoleClient.cs new file mode 100644 index 0000000000..b887da76b9 --- /dev/null +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseManagementConsoleClient.cs @@ -0,0 +1,52 @@ +using System; +using System.Reactive.Threading.Tasks; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Enterprise Management Console API + /// + /// + /// See the Enterprise Management Console API documentation for more information. + /// + public class ObservableEnterpriseManagementConsoleClient : IObservableEnterpriseManagementConsoleClient + { + readonly IEnterpriseManagementConsoleClient _client; + + public ObservableEnterpriseManagementConsoleClient(IGitHubClient client) + { + Ensure.ArgumentNotNull(client, "client"); + + _client = client.Enterprise.ManagementConsole; + } + + /// + /// Gets GitHub Enterprise Maintenance Mode Status + /// + /// + /// https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status + /// + /// The . + public IObservable GetMaintenanceMode(string managementConsolePassword) + { + Ensure.ArgumentNotNullOrEmptyString(managementConsolePassword, "managementConsolePassword"); + + return _client.GetMaintenanceMode(managementConsolePassword).ToObservable(); + } + + /// + /// Sets GitHub Enterprise Maintenance Mode + /// + /// + /// https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status + /// + /// The . + public IObservable EditMaintenanceMode(UpdateMaintenanceRequest maintenance, string managementConsolePassword) + { + Ensure.ArgumentNotNull(maintenance, "maintenance"); + Ensure.ArgumentNotNullOrEmptyString(managementConsolePassword, "managementConsolePassword"); + + return _client.EditMaintenanceMode(maintenance, managementConsolePassword).ToObservable(); + } + } +} diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs index 1f78574c2b..6beaf279de 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs @@ -2,7 +2,6 @@ using System.Reactive.Threading.Tasks; using Octokit; - namespace Octokit.Reactive { /// @@ -17,7 +16,7 @@ public class ObservableEnterpriseOrganizationClient : IObservableEnterpriseOrgan public ObservableEnterpriseOrganizationClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Enterprise.Organization; } diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClient.cs new file mode 100644 index 0000000000..f49b337c06 --- /dev/null +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClient.cs @@ -0,0 +1,143 @@ +using System; +using System.Reactive; +using System.Reactive.Threading.Tasks; +using Octokit.Reactive.Internal; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Enterprise Pre-receive Environments API + /// + /// + /// See the Enterprise Pre-receive Environments API documentation for more information. + /// + public class ObservableEnterprisePreReceiveEnvironmentsClient : IObservableEnterprisePreReceiveEnvironmentsClient + { + readonly IEnterprisePreReceiveEnvironmentsClient _client; + readonly IConnection _connection; + + public ObservableEnterprisePreReceiveEnvironmentsClient(IGitHubClient client) + { + Ensure.ArgumentNotNull(client, nameof(client)); + + _client = client.Enterprise.PreReceiveEnvironment; + _connection = client.Connection; + } + + /// + /// Gets all s. + /// + /// + /// See the API documentation for more information. + /// + /// Thrown when a general API error occurs. + public IObservable GetAll() + { + return GetAll(ApiOptions.None); + } + + /// + /// Gets all s. + /// + /// + /// See the API documentation for more information. + /// + /// Options for changing the API response + /// Thrown when a general API error occurs. + public IObservable GetAll(ApiOptions options) + { + Ensure.ArgumentNotNull(options, nameof(options)); + + return _connection.GetAndFlattenAllPages(ApiUrls.AdminPreReceiveEnvironments(), null, AcceptHeaders.PreReceiveEnvironmentsPreview, options); + } + + /// + /// Gets a single . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + public IObservable Get(long environmentId) + { + return _client.Get(environmentId).ToObservable(); + } + + /// + /// Creates a new . + /// + /// + /// See the API documentation for more information. + /// + /// A description of the pre-receive environment to create + /// Thrown when a general API error occurs. + public IObservable Create(NewPreReceiveEnvironment newPreReceiveEnvironment) + { + Ensure.ArgumentNotNull(newPreReceiveEnvironment, nameof(newPreReceiveEnvironment)); + + return _client.Create(newPreReceiveEnvironment).ToObservable(); + } + + /// + /// Edits an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// A description of the pre-receive environment to edit + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + public IObservable Edit(long environmentId, UpdatePreReceiveEnvironment updatePreReceiveEnvironment) + { + Ensure.ArgumentNotNull(updatePreReceiveEnvironment, nameof(updatePreReceiveEnvironment)); + + return _client.Edit(environmentId, updatePreReceiveEnvironment).ToObservable(); + } + + /// + /// Deletes an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + public IObservable Delete(long environmentId) + { + return _client.Delete(environmentId).ToObservable(); + } + + /// + /// Gets the download status for an existing . + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + public IObservable DownloadStatus(long environmentId) + { + return _client.DownloadStatus(environmentId).ToObservable(); + } + + /// + /// Triggers a new download of the 's tarball from the environment's . + /// When the download is finished, the newly downloaded tarball will overwrite the existing environment. + /// + /// + /// See the API documentation for more information. + /// + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. + /// Thrown when a general API error occurs. + public IObservable TriggerDownload(long environmentId) + { + return _client.TriggerDownload(environmentId).ToObservable(); + } + } +} diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs index feb093db73..974f66638b 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs @@ -16,7 +16,7 @@ public class ObservableEnterpriseSearchIndexingClient : IObservableEnterpriseSea public ObservableEnterpriseSearchIndexingClient(IGitHubClient client) { - Ensure.ArgumentNotNull(client, "client"); + Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Enterprise.SearchIndexing; } diff --git a/Octokit.Reactive/Clients/IObservableCheckRunsClient.cs b/Octokit.Reactive/Clients/IObservableCheckRunsClient.cs new file mode 100644 index 0000000000..9980baf349 --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableCheckRunsClient.cs @@ -0,0 +1,261 @@ +using System; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Check Runs API + /// + /// + /// See the Check Runs API documentation for more information. + /// + public interface IObservableCheckRunsClient + { + /// + /// Creates a new check run for a specific commit in a repository + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// Details of the Check Run to create + IObservable Create(string owner, string name, NewCheckRun newCheckRun); + + /// + /// Creates a new check run for a specific commit in a repository + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// Details of the Check Run to create + IObservable Create(long repositoryId, NewCheckRun newCheckRun); + + /// + /// Updates a check run for a specific commit in a repository + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check run + /// The updates to the check run + IObservable Update(string owner, string name, long checkRunId, CheckRunUpdate checkRunUpdate); + + /// + /// Updates a check run for a specific commit in a repository + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check run + /// The updates to the check run + IObservable Update(long repositoryId, long checkRunId, CheckRunUpdate checkRunUpdate); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + IObservable GetAllForReference(string owner, string name, string reference); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + IObservable GetAllForReference(long repositoryId, string reference); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + /// Details to filter the request, such as by check name + IObservable GetAllForReference(string owner, string name, string reference, CheckRunRequest checkRunRequest); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + /// Details to filter the request, such as by check name + IObservable GetAllForReference(long repositoryId, string reference, CheckRunRequest checkRunRequest); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + /// Details to filter the request, such as by check name + /// Options to change the API response + IObservable GetAllForReference(string owner, string name, string reference, CheckRunRequest checkRunRequest, ApiOptions options); + + /// + /// Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The commit reference (can be a SHA, branch name, or a tag name) + /// Details to filter the request, such as by check name + /// Options to change the API response + IObservable GetAllForReference(long repositoryId, string reference, CheckRunRequest checkRunRequest, ApiOptions options); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check suite + IObservable GetAllForCheckSuite(string owner, string name, long checkSuiteId); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check suite + IObservable GetAllForCheckSuite(long repositoryId, long checkSuiteId); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check suite + /// Details to filter the request, such as by check name + IObservable GetAllForCheckSuite(string owner, string name, long checkSuiteId, CheckRunRequest checkRunRequest); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check suite + /// Details to filter the request, such as by check name + IObservable GetAllForCheckSuite(long repositoryId, long checkSuiteId, CheckRunRequest checkRunRequest); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check suite + /// Details to filter the request, such as by check name + /// Options to change the API response + IObservable GetAllForCheckSuite(string owner, string name, long checkSuiteId, CheckRunRequest checkRunRequest, ApiOptions options); + + /// + /// Lists check runs for a check suite using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check suite + /// Details to filter the request, such as by check name + /// Options to change the API response + IObservable GetAllForCheckSuite(long repositoryId, long checkSuiteId, CheckRunRequest checkRunRequest, ApiOptions options); + + /// + /// Gets a single check run using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check run + IObservable Get(string owner, string name, long checkRunId); + + /// + /// Gets a single check run using its Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check run + IObservable Get(long repositoryId, long checkRunId); + + /// + /// Lists annotations for a check run using the check run Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check run + IObservable GetAllAnnotations(string owner, string name, long checkRunId); + + /// + /// Lists annotations for a check run using the check run Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check run + /// + IObservable GetAllAnnotations(long repositoryId, long checkRunId); + + /// + /// Lists annotations for a check run using the check run Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check run + /// Options to change the API response + IObservable GetAllAnnotations(string owner, string name, long checkRunId, ApiOptions options); + + /// + /// Lists annotations for a check run using the check run Id + /// + /// + /// See the Check Runs API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check run + /// Options to change the API response + IObservable GetAllAnnotations(long repositoryId, long checkRunId, ApiOptions options); + } +} \ No newline at end of file diff --git a/Octokit.Reactive/Clients/IObservableCheckSuitesClient.cs b/Octokit.Reactive/Clients/IObservableCheckSuitesClient.cs new file mode 100644 index 0000000000..a40f3853c6 --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableCheckSuitesClient.cs @@ -0,0 +1,189 @@ +using System; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Check Suites API. + /// + /// + /// See the Check Suites API documentation for more information. + /// + public interface IObservableCheckSuitesClient + { + /// + /// Gets a single Check Suite by Id + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check suite + IObservable Get(string owner, string name, long checkSuiteId); + + /// + /// Gets a single Check Suite by Id + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check suite + IObservable Get(long repositoryId, long checkSuiteId); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + IObservable GetAllForReference(string owner, string name, string reference); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + IObservable GetAllForReference(long repositoryId, string reference); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + /// Details to filter the request, such as by App Id or Check Name + IObservable GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + /// Details to filter the request, such as by App Id or Check Name + IObservable GetAllForReference(long repositoryId, string reference, CheckSuiteRequest request); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + /// Details to filter the request, such as by App Id or Check Name + /// Options to change the API response + IObservable GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request, ApiOptions options); + + /// + /// Lists Check Suites for a commit reference (SHA, branch name or tag name) + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The reference (SHA, branch name or tag name) to list check suites for + /// Details to filter the request, such as by App Id or Check Name + /// Options to change the API response + IObservable GetAllForReference(long repositoryId, string reference, CheckSuiteRequest request, ApiOptions options); + + /// + /// Updates Check Suites prefrences on a repository, such as disabling automatic creation when code is pushed + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The check suite preferences + IObservable UpdatePreferences(string owner, string name, CheckSuitePreferences preferences); + + /// + /// Updates Check Suites prefrences on a repository, such as disabling automatic creation when code is pushed + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The check suite preferences + IObservable UpdatePreferences(long repositoryId, CheckSuitePreferences preferences); + + /// + /// Creates a new Check Suite + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// Details of the Check Suite to create + IObservable Create(string owner, string name, NewCheckSuite newCheckSuite); + + /// + /// Creates a new Check Suite + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// Details of the Check Suite to create + IObservable Create(long repositoryId, NewCheckSuite newCheckSuite); + + /// + /// Triggers GitHub to create a new check suite, without pushing new code to a repository + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// Details of the Check Suite request + [Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")] + IObservable Request(string owner, string name, CheckSuiteTriggerRequest request); + + /// + /// Triggers GitHub to create a new check suite, without pushing new code to a repository + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// Details of the Check Suite request + [Obsolete("This method has been deprecated in the GitHub Api, however can still be used on GitHub Enterprise 2.14")] + IObservable Request(long repositoryId, CheckSuiteTriggerRequest request); + + /// + /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The owner of the repository + /// The name of the repository + /// The Id of the check suite + IObservable Rerequest(string owner, string name, long checkSuiteId); + + /// + /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository + /// + /// + /// See the Check Suites API documentation for more information. + /// + /// The Id of the repository + /// The Id of the check suite + IObservable Rerequest(long repositoryId, long checkSuiteId); + } +} \ No newline at end of file diff --git a/Octokit.Reactive/Clients/IObservableChecksClient.cs b/Octokit.Reactive/Clients/IObservableChecksClient.cs new file mode 100644 index 0000000000..ad64e42214 --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableChecksClient.cs @@ -0,0 +1,27 @@ +namespace Octokit.Reactive +{ + /// + /// A client for GitHub's Checks API. + /// + /// + /// See the Checks API documentation for more information. + /// + public interface IObservableChecksClient + { + /// + /// A client for GitHub's Check Runs API. + /// + /// + /// See the Check Runs API documentation for more information. + /// + IObservableCheckRunsClient Run { get; } + + /// + /// A client for GitHub's Check Suites API. + /// + /// + /// See the Check Suites API documentation for more information. + /// + IObservableCheckSuitesClient Suite { get; } + } +} diff --git a/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs index 4771f2ef67..2488a6fa00 100644 --- a/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs @@ -40,7 +40,18 @@ public interface IObservableCommitCommentReactionsClient /// The comment id /// IObservable GetAll(string owner, string name, int number); - + + /// + /// List reactions for a specified Commit Comment + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment + /// The owner of the repository + /// The name of the repository + /// The comment id + /// Options for changing the API response + /// + IObservable GetAll(string owner, string name, int number, ApiOptions options); + /// /// List reactions for a specified Commit Comment /// @@ -49,5 +60,15 @@ public interface IObservableCommitCommentReactionsClient /// The comment id /// IObservable GetAll(long repositoryId, int number); + + /// + /// List reactions for a specified Commit Comment + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment + /// The owner of the repository + /// The comment id + /// Options for changing the API response + /// + IObservable GetAll(long repositoryId, int number, ApiOptions options); } } diff --git a/Octokit.Reactive/Clients/IObservableCommitStatusClient.cs b/Octokit.Reactive/Clients/IObservableCommitStatusClient.cs index 356ac10f1c..ed0eb37307 100644 --- a/Octokit.Reactive/Clients/IObservableCommitStatusClient.cs +++ b/Octokit.Reactive/Clients/IObservableCommitStatusClient.cs @@ -19,7 +19,7 @@ public interface IObservableCommitStatusClient /// The name of the repository /// The reference (SHA, branch name, or tag name) to list commits for IObservable GetAll(string owner, string name, string reference); - + /// /// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or /// a tag name. diff --git a/Octokit.Reactive/Clients/IObservableCommitsClient.cs b/Octokit.Reactive/Clients/IObservableCommitsClient.cs index 213b1d7f94..832f8e4dc8 100644 --- a/Octokit.Reactive/Clients/IObservableCommitsClient.cs +++ b/Octokit.Reactive/Clients/IObservableCommitsClient.cs @@ -46,7 +46,7 @@ public interface IObservableCommitsClient /// The name of the repository /// The commit to create IObservable Create(string owner, string name, NewCommit commit); - + /// /// Create a commit for a given repository /// diff --git a/Octokit.Reactive/Clients/IObservableDeploymentsClient.cs b/Octokit.Reactive/Clients/IObservableDeploymentsClient.cs index 361a1346a9..250e0e0948 100644 --- a/Octokit.Reactive/Clients/IObservableDeploymentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableDeploymentsClient.cs @@ -21,7 +21,7 @@ public interface IObservableDeploymentsClient /// The owner of the repository /// The name of the repository IObservable GetAll(string owner, string name); - + /// /// Gets all the deployments for the specified repository. Any user with pull access /// to a repository can view deployments. @@ -43,7 +43,7 @@ public interface IObservableDeploymentsClient /// The name of the repository /// Options for changing the API response IObservable GetAll(string owner, string name, ApiOptions options); - + /// /// Gets all the deployments for the specified repository. Any user with pull access /// to a repository can view deployments. diff --git a/Octokit.Reactive/Clients/IObservableGitHubAppInstallationsClient.cs b/Octokit.Reactive/Clients/IObservableGitHubAppInstallationsClient.cs new file mode 100644 index 0000000000..58b173f7c4 --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableGitHubAppInstallationsClient.cs @@ -0,0 +1,41 @@ +using System; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub Applications Installations API. + /// + /// + /// See the GitHub Apps Installations API documentation for more information. + /// + public interface IObservableGitHubAppInstallationsClient + { + /// + /// List repositories of the authenticated GitHub App Installation (requires GitHubApp Installation-Token auth). + /// + /// https://developer.github.com/v3/apps/installations/#list-repositories + IObservable GetAllRepositoriesForCurrent(); + + /// + /// List repositories of the authenticated GitHub App Installation (requires GitHubApp Installation-Token auth). + /// + /// Options for changing the API response + /// https://developer.github.com/v3/apps/installations/#list-repositories + IObservable GetAllRepositoriesForCurrent(ApiOptions options); + + /// + /// List repositories accessible to the user for an installation (requires GitHubApp User-To-Server Auth). + /// + /// The Id of the installation + /// https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation + IObservable GetAllRepositoriesForCurrentUser(long installationId); + + /// + /// List repositories accessible to the user for an installation (requires GitHubApp User-To-Server Auth). + /// + /// The Id of the installation + /// Options for changing the API response + /// https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation + IObservable GetAllRepositoriesForCurrentUser(long installationId, ApiOptions options); + } +} \ No newline at end of file diff --git a/Octokit.Reactive/Clients/IObservableGitHubAppsClient.cs b/Octokit.Reactive/Clients/IObservableGitHubAppsClient.cs new file mode 100644 index 0000000000..30a7e70d3f --- /dev/null +++ b/Octokit.Reactive/Clients/IObservableGitHubAppsClient.cs @@ -0,0 +1,114 @@ +using System; + +namespace Octokit.Reactive +{ + /// + /// A client for GitHub Applications API. + /// + /// + /// See the GitHub Apps API documentation for more information. + /// + public interface IObservableGitHubAppsClient + { + /// + /// Access GitHub's Apps Installations API. + /// + /// + /// Refer to the API documentation for more information: https://developer.github.com/v3/apps/installations/ + /// + IObservableGitHubAppInstallationsClient Installation { get; } + + /// + /// Get a single GitHub App (if private, requires Personal Access Token or GitHubApp auth) + /// + /// https://developer.github.com/v3/apps/#get-a-single-github-app + /// The URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App. + IObservable Get(string slug); + + /// + /// Returns the GitHub App associated with the authentication credentials used (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#get-the-authenticated-github-app + IObservable GetCurrent(); + + /// + /// List installations of the authenticated GitHub App (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#find-installations + IObservable GetAllInstallationsForCurrent(); + + /// + /// List installations of the authenticated GitHub App (requires GitHubApp auth). + /// + /// Options for changing the API response + /// https://developer.github.com/v3/apps/#find-installations + IObservable GetAllInstallationsForCurrent(ApiOptions options); + + /// + /// Get a single GitHub App Installation (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#get-a-single-installation + /// The Id of the GitHub App Installation + [Obsolete("This method will be removed in a future release. Please use GetInstallationForCurrent() instead")] + IObservable GetInstallation(long installationId); + + /// + /// Get a single GitHub App Installation (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#get-a-single-installation + /// The Id of the GitHub App Installation + IObservable GetInstallationForCurrent(long installationId); + + /// + /// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth). + /// + /// https://developer.github.com/v3/apps/#list-installations-for-user + IObservable GetAllInstallationsForCurrentUser(); + + /// + /// List installations for the currently authenticated user (requires GitHubApp User-To-Server Auth). + /// + /// https://developer.github.com/v3/apps/#list-installations-for-user + IObservable GetAllInstallationsForCurrentUser(ApiOptions options); + + /// + /// Create a time bound access token for a GitHubApp Installation that can be used to access other API endpoints (requires GitHubApp auth). + /// + /// + /// https://developer.github.com/v3/apps/#create-a-new-installation-token + /// https://developer.github.com/apps/building-github-apps/authentication-options-for-github-apps/#authenticating-as-an-installation + /// https://developer.github.com/v3/apps/available-endpoints/ + /// + /// The Id of the GitHub App Installation + IObservable CreateInstallationToken(long installationId); + + /// + /// Enables an authenticated GitHub App to find the organization's installation information (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#find-organization-installation + /// The name of the organization + IObservable GetOrganizationInstallationForCurrent(string organization); + + /// + /// Enables an authenticated GitHub App to find the repository's installation information (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#find-repository-installation + /// The owner of the repo + /// The name of the repo + IObservable GetRepositoryInstallationForCurrent(string owner, string repo); + + /// + /// Enables an authenticated GitHub App to find the repository's installation information (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#find-repository-installation + /// The Id of the repository + IObservable GetRepositoryInstallationForCurrent(long repositoryId); + + /// + /// Enables an authenticated GitHub App to find the users's installation information (requires GitHubApp auth). + /// + /// https://developer.github.com/v3/apps/#find-user-installation + /// The name of the user + IObservable GetUserInstallationForCurrent(string user); + } +} diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs index 24294d70b4..6a8f032b90 100644 --- a/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs @@ -38,6 +38,16 @@ public interface IObservableIssueCommentReactionsClient /// The comment id IObservable GetAll(string owner, string name, int number); + /// + /// List reactions for a specified Issue Comment + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment + /// The owner of the repository + /// The name of the repository + /// The comment id + /// Options for changing the API response + IObservable GetAll(string owner, string name, int number, ApiOptions options); + /// /// List reactions for a specified Issue Comment /// @@ -45,5 +55,14 @@ public interface IObservableIssueCommentReactionsClient /// The Id of the repository /// The comment id IObservable GetAll(long repositoryId, int number); + + /// + /// List reactions for a specified Issue Comment + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment + /// The Id of the repository + /// The comment id + /// Options for changing the API response + IObservable GetAll(long repositoryId, int number, ApiOptions options); } } diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs index 9f0c2783e8..0744d57a17 100644 --- a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs @@ -137,6 +137,46 @@ public interface IObservableIssueCommentsClient /// Options for changing the API response IObservable GetAllForIssue(long repositoryId, int number, ApiOptions options); + /// + /// Gets Issue Comments for a specified Issue. + /// + /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// The sorting parameters + IObservable GetAllForIssue(string owner, string name, int number, IssueCommentRequest request); + + /// + /// Gets Issue Comments for a specified Issue. + /// + /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + /// The Id of the repository + /// The issue number + /// The sorting parameters + IObservable GetAllForIssue(long repositoryId, int number, IssueCommentRequest request); + + /// + /// Gets Issue Comments for a specified Issue. + /// + /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// The sorting parameters + /// Options for changing the API response + IObservable GetAllForIssue(string owner, string name, int number, IssueCommentRequest request, ApiOptions options); + + /// + /// Gets Issue Comments for a specified Issue. + /// + /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + /// The Id of the repository + /// The issue number + /// The sorting parameters + /// Options for changing the API response + IObservable GetAllForIssue(long repositoryId, int number, IssueCommentRequest request, ApiOptions options); + /// /// Creates a new Issue Comment for a specified Issue. /// diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index 4414327365..8d76206408 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -19,6 +19,16 @@ public interface IObservableIssueReactionsClient /// The issue id IObservable GetAll(string owner, string name, int number); + /// + /// List reactions for a specified Issue. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue id + /// Options for changing the API response + IObservable GetAll(string owner, string name, int number, ApiOptions options); + /// /// List reactions for a specified Issue. /// @@ -27,6 +37,15 @@ public interface IObservableIssueReactionsClient /// The issue id IObservable GetAll(long repositoryId, int number); + /// + /// List reactions for a specified Issue. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The Id of the repository + /// The issue id + /// Options for changing the API response + IObservable GetAll(long repositoryId, int number, ApiOptions options); + /// /// Creates a reaction for a specified Issue. /// diff --git a/Octokit.Reactive/Clients/IObservableIssueTimelineClient.cs b/Octokit.Reactive/Clients/IObservableIssueTimelineClient.cs index 053c1221f1..f60a824731 100644 --- a/Octokit.Reactive/Clients/IObservableIssueTimelineClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueTimelineClient.cs @@ -32,7 +32,7 @@ public interface IObservableIssueTimelineClient /// The issue number /// Options for changing the API response IObservable GetAllForIssue(string owner, string repo, int number, ApiOptions options); - + /// /// Gets all the various events that have occurred around an issue or pull request. /// diff --git a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs index 0307f84629..44c714e3bf 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs @@ -21,7 +21,7 @@ public interface IObservableIssuesEventsClient /// The name of the repository /// The issue number IObservable GetAllForIssue(string owner, string name, int number); - + /// /// Gets all events for the issue. /// diff --git a/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs index 4fe6f11d73..aa84153ee5 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs @@ -263,7 +263,7 @@ public interface IObservableIssuesLabelsClient /// The name of the repository /// The number of the issue /// The name of the label to remove - IObservable RemoveFromIssue(string owner, string name, int number, string labelName); + IObservable