Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

fix: fix the build #134

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

import {ReposUpdateBranchProtectionParamsRequiredStatusChecks} from '@octokit/rest';
import {GetBranchResult} from './types';
import {octo, repos} from './util';

export async function syncRepoSettings() {
Expand Down Expand Up @@ -52,15 +51,13 @@ export async function syncRepoSettings() {
const [owner, name] = repo.repo.split('/');
return octo.repos.getBranch({branch: 'master', owner, repo: name})
.then(result => {
const branch = result.data as GetBranchResult;
let statusChecks:
ReposUpdateBranchProtectionParamsRequiredStatusChecks = {
strict: true,
contexts: []
};
const branch = result.data;
const statusChecks = {strict: true, contexts: []};
if (branch.protection &&
branch.protection.required_status_checks) {
statusChecks = branch.protection.required_status_checks;
// tslint:disable-next-line no-any
(statusChecks as any) =
branch.protection.required_status_checks;
statusChecks.strict = true;
}
return octo.repos
Expand Down