From 3108a8ebdde975ab8254233d6c32ca772d239ff5 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 1 Sep 2016 15:54:46 +1000 Subject: [PATCH] updated notes about branch protection changes --- ReleaseNotes.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index b8719b952a..f2c0f44116 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -21,6 +21,19 @@ usages to the new endpoints as these will be removed in a future release: - `client.Repository.GetAllBranches()` => `client.Repository.Branch.GetAll()` - `client.Repository.EditBranch()` => `client.Repository.Branch.Edit()` +There is also a change in how branch protection works with the API, due to +upstream changes. The existing methods have been marked as obsolete, but for +the sake of brevity here are the details about what you should be doing today. + +The process for inspecting branch protection is now two steps: + + - first, check the branch returned by `client.Repository.Branch.Get()` or + `client.Repository.Branch.GetAll()` has it's `Protected` property set to `true`. + + - then, a call to `client.Repository.Branch.GetBranchProtection()` will return + the details about the protection settings for the given branch. If no protection + is set for this branch, you will received a `HTTP 404` response. + ### New in 0.21.1 (released 2016/07/29) **Features**