* Provide easy alternative to create App JWT token
* Make it clear that its the key content
* Commit suggested changes by @kfcampbell
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* Add a reminder regarding the required using statements
---------
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* reoves the old implemetnation of sourcelink and uses the newer one present in the .net SDK
* cleans up appveyor
* updates proj with sourcelink props
* adds deterministic build check as well.
* Update docs/debugging-source.md
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
---------
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* update models with updated permission enum
* add suppress message attribute
* update integration tests
* refactor: new and legacy update teams endpint
* refactor: add new delete team endpoint
* use TeamPermission on NewTeam
* use updated delete on team context dispose
* add permission enum for team response object
* refactor: remove legacy suffix from method names
* introduce permissions object on Team
* refactor: rename enum to TeamRepositoryPermission
* fix formatting
* change Permission to string to match api specs
* add TeamRepository
* add CheckTeamPermission endpoint support
* fix convention tests
* update comments on TeamRepository props
* add two new endpoints in TeamsClient
* refactor: rename ApiUrl for TeamPermission
* fix test
* implement methods for new endpoints
* add the integration tests
* fix spelling
* update comments
* refactor: rename method name
* fix: add end tag for remarks
* refactor: remove unused method param
* fix docstring comment
* the unit tests are in finally
* add docs for teams api
* split CheckTeamPermissions into two methods
* Update ObservableTeamsClientTests.cs based on review
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* add cref to legacy update and delete endpoints
* remove editorconfig file
* Update Octokit.Tests/Clients/TeamsClientTests.cs
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* remove unused line
* rename variable based on review
* rename prop to match constructor param
* add comment to explain TeamPermission enum values on update
Co-authored-by: notauserx <notauserx@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* Update getting-started.md
Edited the section on Authentication to remove Basic Auth, which GitHub no longer supports, with instructions for using a Personal Access Token.
* Update getting-started.md
Second commit: Removed "/en" from links.
* Update docs/getting-started.md
Co-authored-by: Tim Rogers <timrogers@github.com>
* Update docs/getting-started.md
Co-authored-by: Tim Rogers <timrogers@github.com>
* Update getting-started.md
Removed the two bullet pointed items because the sentence preceding them provided a clearer description of the options.
Co-authored-by: Tim Rogers <timrogers@github.com>
* add active lock reason to PR
* update docs
* refactor: extract lock and unlock from IIssuesClient
create ILockUnlockClient so both IIssuesClient and IPullRequestClient can
access lock and unlock methods.
* refactor LockUnlock for reactive clients
* Update doc to include lock unlock sample code
* Use Assert.Null to check null value in test
Co-authored-by: notauserx <notauserx@users.noreply.github.com>
* Initial implementation of ManagementConsole - maintenance mode
* Add environment var support for management console password for integration tests
* Add reactive client and unit tests
* Update some xmlDoc
* I think this is a better way to setup the underlying baseUri on IConneciton, to achieve managemet console access rather than requiring a specific GitHubClient that cant call normal API's
Instead, the management client methods can check the base Url and if it contains /api/v3/ they can set their relative endpoint Uri to include a leading "/" which will cause the /api/v3/ to be removed.
* Update EnterpriseClient.cs
Fix xml comments
* Update IEnterpriseClient.cs
Fix xml comments
* Still trying to get the xmDoc perfect, thanks app veyor :)
* XmlDoc'ing my way to success
* Add specific test attribute for management console tests
* check chronic string empty/null
* Use helper's password field in test
* Tidy up maintenance mode tests by using a context/destructor to manage the initial/end state of maintenance mode
* make internal and tidy up URL concatenation
* move GHE endpoint fixup inside ApiUrls methods
* Rework request object to be the correct structure so SimpleJsonSerializer can be used to serialize it. Remove MaintenanceDate class and just pass in the Date/string for when
Still need to use UrlFormEncoding rather than json in the POST body though...
* Create abstract base class for FormUrlEncoded parameters (similar to existing RequetParameters) and inherit from it in UpdateMaintenanceRequest
* Fix maintenance context logic - destructor should always turn maintenance OFF regardless of initial requested state
* Fix xml comment
* Fix Xml comment
* Those pesky xml comments!
* Fine, I give up!
* Fix string.Format
* fix bad rebase
* fix failing convention tests
* restore missing whitespace
* writing some docs
* some edits
* edit
In implementing this, I found that `appClient.GetCurrent()` (etc.) don't work, but that there is a subclass, so that `appClient.GitHubApps.GetCurrent()` etc does work. Took me a while to figure it out, thought that updated docs might help others.
* Added authentication using bearer token.
* Added Installation and AccessToken clients.
* Added new clients to Reactive project
* added support for DateTime serialized as FileTime
* added support for StatusEventPayload
* added support for StatusEventPayload
* Added test for StatusEventPayload and fixed serializer to return that event payload type.
* WIP - added ApplicationClient and related Api Urls.
* Continued implementing Installations support.
* Fixing build (WIP)
* fixed build
* added Account property to Installation. prefer nameof(x) over literal "x".
* fixed according to code review.
* fixed build.
* switched Installation ID from int to long.
* added Permissions and Events properties to Installation.
* added documentation to Application and Installation properties in IGitHubClient.
* wip - added tests to new clients
* wip - fix build
* wip - fixed build.
* added InstallationsClient tests.
* added integration test for InstallationsClient.
* changes requested in code review.
* add Get method for App
* Create GitHubApp response model instead of re-using existing Application response model
* add Get method to observable client
* fixed build (both locally and failed test).
* Fixed documentation and added some missing XML docs.
* added DebuggerDisplay to StatusEventPayload
* updated XML docs and added some missing bits. prefer nameof(x) over literal "x".
* Add xml comments to AccessToken response model and use DateTimeOffset rather than DateTime
* Tidy up XmlComments and make consistent across client and observable client and interfaces
* fixup unit tests to independently verify preview header
* Implement GetInstallation method
* revert commits unrelated to GitHubApps - these can be done on a separate PR if required
* this extra authenticator class doesnt appear to be used anywhere
* undo project file change as it doesnt appear to be necessary
* Revert "Merge remote-tracking branch 'remote/GitHubApps' into GitHubApps"
This reverts commit c53cc110b8d807f62fdfeaa7df19e1532d050007, reversing
changes made to 0c9e413d420a4725738644ea5b13af6ec102d456.
* Revert "Revert "Merge remote-tracking branch 'remote/GitHubApps' into GitHubApps""
This reverts commit 02d52b8adf814b6945c60cb59a907a8cd34b1ce7.
* add XmlDoc comments to response models and flesh out installation permissions
* name AcceptHeaders member consistently
* accidentally lost changes to Credentials.cs
* Enhance Intergation test framework to handle GitHubApp settings and discoer tests appropriately
Get code ready for GitHubJWT nuget package but for now just hardcode a JWT in ENV VAR
Add 1 integration test for each method and ensure they are working!
* fixed compiler warnings.
* Added support for Installation=>Id field that arrives in a Pull Request Event payload.
(See the last field in the sample JSON of https://developer.github.com/v3/activity/events/types/#pullrequestevent)
* Change integration test project to netcoreapp2.0 so we can use GitHubJwt nuget package in integration tests
* First cut at some GitHubApp doco
* update mkdocs config
* Moved the Installation property to ActivityPayload, so it's available in all payloads.
This feature is not undocumented, unfortunately, but valid:
https://platform.github.community/t/determining-which-installation-an-event-came-from/539/11
* Split Installation to Installation and InstallationId, and added a comfort method for gaining its AccessToken.
* fixed InstallationId CreateAccessToken to receive IGitHubAppsClient. added (and fixed) docs.
* reverted object-oriented style comfort method and it's docs.
* update all test projects to netcoreapp2.0
* tweak build configs to use 2.0.3 SDK
* also need to update cake frosting build to netcoreapp2.0
* tweak docs some more
* fix convention test failures
* test projects still had some old runtime parts in them!
* travis osx image needs to be at least 10.12 for .NET Core 2.0
* shell script might need the same argument tweak for cake
* more doc tweaks
* Make sure compiler warning output isnt somehow causing Linux and OSX builds to fail
* moar logging for linux/OSX builds
* stop sourcelink on linux/OSX builds to see if that is the problem
* set verbosity to detailed for the dotnet build step
* try new sourcelink and list out remotes
* is travis being weird with git clone?
* SourceLink may be defaulting to true on CI server so explicitly set it as false rather than omitting it
* detailed is a bit too verbose for travis, try normal
* turn sourcelink back on for Linux/OSX
* fix compiler warning
* Try SourceLink.Create.CommandLine instead of SourceLink.Create.GitHub
* CliToolReferences did not update to latest versions
* remove debug origin info
* turn off msbuild output
* go back to SourceLink.Create.GitHub!
* time diff between dev PC and API causes issues if specifying a full 600 second token
* handle extra date format that Installation end point now returns
* field needs to be protected in order to be deserialized
* provide even more buffer for client vs server clock drift
* Update to latest GitHubJwt reference
* go back to SDK 1 since SDK 2 is having sporadic travisCI faliures in TestSourceLink build step
* get appveyor working
* update sourcelink back to latest, and use SDK 1.04 (runtime 1.0.5)
* Update README and shipping-releases as they are a bit out of date
* Update year/copyright info
* Update cake.frosting to latest for newest dotnet tooling support, and adjust builds for new configuration parameters
* update xunit packages so codelens works for nested test classes (VS2017 15.3 update is also required)
* Fixup VS version and remove win debugging tools
* Added StringEnum<TEnum>
* Added tests
* Make sure the serializer can work with StringEnum
* Use StringEnum for EventInfo.Event
* Add convention test to assert that all Response models use StringEnum<> to wrap enum properties
* Add Stringnum<> to all response types failing convention test
* Handle StringEnum to Enum conversion when Issue response model populates IssueUpdate request model
* Fix unit test
* Refactor SimpleJsonSerializer to expose the DeserializeEnum strategy so it can be used in StringEnum class
* Need to expose/use SerializeEnum functionality too, so we use the correct string representation of enum values that have custom properties (eg ReactionType Plus1 to "+1")
* fix unit tests, since the string is now the "correct" upstream api value
* Add a couple of tests for the Enum serialize/deserialize when underscores, hyphens and custom property attributes are present
* Compare parsed values for equality
* add convention test to ensure enum members all have Parameter property set
* update test to cover implicit conversions too
* this test should work but fails at the moment due to magic hyphen removal in deserializer causing a one way trip from utf-8 to EncodingType.Utf8 with no way to get back
* (unsuccesfully) expand event info test to try to catch more cases of unknown event types
* fix broken integration test while im here
* Fixed build errors after .NET Core merge
* Value -> StringValue, ParsedValue -> Value
* Don't allow StringValue to be null
* Ignore enums not used in request/response models
* Added ParameterAttribute to almost all enum values
* Ignore Language enum
* Fix failing tests
* Fix milestone sort parameter and tests
* whitespace
* fix milestone unit tests
* Fix StringEnum.Equals ... This could've been embarrassing!
* Change SimpleJsonSerializer Enum handling to only use `[Parameter()]` attributes (no more magic removal of hyphen/underscores from strings)
* Tidy up this integration test while im here
* Only test request/response enums in convention test
* Keep skipping Language
* Remove unused method
* Remove excluded enum types
* Removed unnecessary ParameterAttributes
* Remove unused enum
* Add StringEnum test for string-comparison of two invalid values
* Bring back IssueCommentSort and use it in IssueCommentRequest
This reverts commit 38a4a291d1476ef8c992fe0f76956974b6f32a49.
* Use assembly instead of namespace for Octokit check
* Add failing test to reproduce the issue where only the first enum paramter/value was added to the cache
* Fix deserializer enum cache to include all enum members rather than only the first member encountered
* Use a static SimpleJsonSerializer in StringEnum
* Remove serializer instance in StringEnum
* Add some documentation on StringEnum<TEnum>
* Fix parameter value to resolve failing integration test
* Update label docs to reflect color information
Resolves#790
* Clarify doc language
Because I couldn't just have a one-commit PR. No, that'd be too easy.
* Futher clarification
I guess we might as well make it right.
* Draft section on ApiInfo in getting started
* typo: to --> do
* Add link to github api
* Add note on authenticated client limits
* wording tweak
* Point to better API doc link
* change variable init in code sample
* Code to test URL for an enterprise instance.
Based on code we use in GitHub Desktop for Windows.
* Add an example of the enterprise probe
* Add helpful constructor to EnterpriseProbe
* Suppress code analysis warning
Add xml comments to ctors and make consistent with GitHubClient/Connection etc
* Update getting started to use the new EnterpriseProbe ctor