Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch protection impl is based on an api that's no longer supported #87

Open
softprops opened this issue Oct 12, 2017 · 1 comment
Open

Comments

@softprops
Copy link
Owner

softprops commented Oct 12, 2017

/// update branch production for a given branch
///
/// https://developer.github.com/v3/repos/branches/#update-branch-protection
pub fn protection<B>(&self, branch: B, pro: &Protection) -> Future<ProtectionState>
where
B: Into<String>,
{
self.github.put(
&format!(
"/repos/{owner}/{repo}/branches/{branch}/protection",
owner = self.owner,
repo = self.repo,
branch = branch.into()
),
json!(pro),
)
}
}

See https://developer.github.com/changes/2017-09-06-protected-branches-preview-end/

@keirlawson
Copy link
Contributor

I tested out the example with branch protection and it seemed to work just fine against my own repo. If there is a more subtle issue here then I'd be up for looking at fixing it, but from the description above and linked blog post I'm not entirely clear what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants