* reworks all number parameter names to represent what they actually are. Refactors some types to be the appropriate types based on OpenAPI and docs.
* updates interfaces and implementations for id naming
* updates reactive to match sync SDKs
* Fixes ids for Releases, Collaborators, and Contributors
* updates the interface for releases
* update the obverable release client
* updates ids from int to long based on GH database schema
* converts a test condition to use the proper type
* updates generated paging and observable classes
* fix: added `RequiredSignatures` to the `BranchProtectionSettingsUpdate` types.
- Fixes#2855
- Updated `BranchProtectionSettingsUpdate` by adding `RequiredSignatures`.
- Update all integration `xUnit` tests to check for the `RequiredSignatures` property.
* docs: add comment documenting the `RequiredSignatures` property
* initial tests and implementation of Copilot for Business client API
* updated billing settings documentation
* renames and refactors - clarity and simplified
* using context to ensure license clean up
* extra documentation and used ApiOptions instead of custom class
* implemented observable clients
* Fixing convention issues
* renaming for clarity
---------
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.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>
* 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
* 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)
* Add new AcceptsHeader
add Parent field to Team
add ParentId field to NewTeam and UpdateTeam
update Create Edit and Delete Team methods to use preview header
* Implement new API call GetAllChildTeams()
* Implement GetAllChildTeams for ObservableClient
* add integration test for observable client
* Add pagination tests for GetAllChildTeams
* Add NestedTeams preview header to all the API calls that use it
* Update tests for accepts header
* Add accepts header to observable client calls
* Fix DELETE implementation to use correct overload
* Fix tests - parent and child teams must be visibility Closed whereas the default if not specified is Private
* make sure all tests are flagged as [OrganizationTest]
* Make sure Update tests change the parent of the team
* Update new methods with NesterTeams preview API header and adjust tests
* Fixup TeamContext helper name
* Implement overload for GetAllMembers to take request parameter
* Update tests
* Implement Obersvable client changes
* Observable tests
* Implement AddOrEditMembership function returning a new response model, and obsolete the old AddMembership function returning an enum
* Implement GetMembershipDetails function returning new TeamMembershipDetails response model, and obsolete the old GetMembership function returning an enum
* Clarify that an exception is thrown when not a member
* Add integration tests for AddOrEditMembership and GetMembershipDetails
* fixup exception test for observable client
* Update wording of obsolete message
* Add `BranchProtectionRequiredPullRequestReviews` and `BranchProtectionRequiredPullRequestReviewsUpdate` models
* Add missing ctors and fix naming
Tests where updated to use the minimum nesseccary constructor
* Fix debugger display
* Update BranchProtection response model to include new dismissal restrictions fields and tidy up existing properties ctors and DebuggerDisplay
* Update BranchProtectionUpdate request model to include new dismissal restrictions fields/classes and tidy up existing properties and DebuggerDisplay
* Update BranchProtection tests to use new RequiredReviews and dismissal restrictions options
* Add specific client endpoints for GetReviewEnforcement UpdateReviewEnforcement and RemoveReviewEnforcement
* Add unit and integration tests for new client methods
* Implement Observable client methods and unit tests
* Add integration tests for Observable client
* Run CodeFormatter to fix up whitespace
* Clarify review dismissal restriction behaviour in code comments
* First Iteration Need to finish tests and docs
* Mostly Complete
* Fixing tests and adding review comments
* Added tests for reactive client
* Moved Reviews inside fo the Pull request client for better organization and began initial intigration testing
* Fixing bad recursive function breaking tests
* test fixes
* Add paging support to review comments call
* Fixing recursive function
* Addressing comments from PR
* fixing CI break
* Typo build break
* Fixing Convention Tests
* Adding correct nameof() usage in Ensure
* Small consitancy changes
* Trigger build
* Address PR Comments
* Fixup test naming
* Fix sub client ordering and incorrect URL
* Tidy up comments and remove StringEnum wrapper from Request models as it is only for Response models
* Rename GetReview to Get
* tweak debugger display
* Rework integration tests - implement the easy Get/GetAll ones first...
* Implement integration tests for Create method.
Move helpers to create PR/review into SetupHelper class
Fixed up review status enum to contain correct values
Tests for Approve/RequestChanges currently failing as a user cant approve/request changes on their own PR
* Implement secondary account settings for integration tests and a new [DualAccountTest] attribute for discovery when configured
Change integration test to create PR from the 2nd account, so the main test account is able to perform review actions on the PR
* Add integration tests for Delete, Dismiss and Submit methods
Fixed up API client implementation for delete (was looking for incorrect 201 http status)
Removed unnecessary await/async calls from client implementations that dont need to do anything with the result
* Attempting to add comments as part of a review revealed that we cant use the existing PullRequestReviewCommentCreate class as the API throws a validation error due to the CommitId field
These newer review APIs need a DraftPullRequestReviewComment (that doesnt have a commitId) instead
* add second test account user/password to configure-integration-tests script
* Add methods for listing pending organization invites
* Add unit/integration tests
* Add methods for getting all pending invites for a team
* Add unit/integration tests
* 🔥 whitespace 🔥
* Move new enum to it's own correct file and location
* Invite(s) -> Invitation(s)
* Add helper functions for adding invitations and cleaning the invitations up at the end of the test
* Add methods with ApiOptions
* Fix helper methods for adding/removing invitations
* Forgot to actually pass in the ApiOptions to the API call
* Add tests for new ApiOptions methods
* tweak integration tests
* Update outside collaborator tests to use [OrganizationTest] attribute for consistency
* Update test accounts used
* use octokitnet-test2 account now it has 2FA turned on
* remove obsolete "Branches" methods from RepositoryClient (all were previuosly moved to RepositoryBranchesClient)
* Remove obsolete DeploymentStatus fields
* Remove obsoleteMergePullRequest.Squash parameter
* Remove obsolete request ctor
* Remove tests
* Not sure how I missed these test references
* Add BranchProtection.EnforceAdmins object
* Add EnforceAdmin related methods to RepoBranch clients
* Add unit tests
* Add unit tests for Observable client
* Add integration tests for enforce admin methods
* Tweak integration test to ensure that they actually do something
The `CreateRepositoryWithProtectedBranch` helper method currently sets `EnforceAdmins` as true, so delete it before adding.
* add missing docs
* rename tests
* Add missing ctor
* Remove property that is no longer supported
https://developer.github.com/changes/2017-05-02-adoption-of-admin-enforced/
* Fix failing unit tests
* Add release notes and bump version to 0.24
* run "build FormatCode" to fix up whitespace/formatting issues
* Fix failing Ssh key tests due to "validation exception". This key must be in use on github (under another user, most likely from these tests failing). Changed to a new SSH key and tweaked tests to reduce chance of a key being created and not destroyed
* Assignee and Assignees cant both be specified on NewIssue. We missed this one in the PR. Marked Assignee as [Obsolete] and fixed tests to use Assignees
* Fix a couple of Reactions tests that were calling the wrong client methods
* Fix timeline tests - looks like the response class has changed shape a bit, it now has an Issue object in the payload and Id field isnt present (leaving Id field there in case other timeline events do use it)
* Fix some following tests that require the test user to follow more than 1 other user
* Unskip these Event tests now because apparently they work!
* add breaking changes notes
* Update ApiErrorMessageSafe to return null for empty and whitespace strings (#1540)
* return null if ApiError.Message is empty or whitespace
* Uncomment test, which now passes
* update release notes to include PR1540
* Add "Bot" AccountType, was causing a deserialization exception when running the integration test "SearchForExcludedLanguage" (#1541)
* Update to include PR1541
* add bullets to make release notes easier to read
* markup additional code mentions in notes
* Fix grammar
fields => field
Change team and user lists to specific classes derived from Collection<T> so we can offer better configuration of BranchProtectionPushRestriction via multiple ctors (teams only, users only, teams and users, etc)
Add another ctor to BranchProtectionPushRestrictions for the case where no teams/users are specified (ie admin only)
Change organization update tests to use this new ctor and assert we get empty lists rather than no push restrictions