-
-
Couldn't load subscription status.
- Fork 3
Open
Labels
Milestone
Description
We need to create a function to collect the main branch information regarding protection rules. This information will be collected when running the workflow upsert-github-repositories (upsertGithubRepositories) (ref) and stored in new (not nullable) columns in github_repositories.
Change needed
- Create a new function
fetchProtectionForBranchInRepo(ref). This will consume the protection endpointGET https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection(docs) - Add the columns
default_branch_allow_fork_syncing,default_branch_lock_branch,default_branch_required_conversation_resolution,default_branch_allow_deletions,default_branch_allow_force_pushes,default_branch_required_linear_history,default_branch_enforce_admins,default_branch_required_pr_reviews_dismiss_stale_reviews,default_branch_required_pr_reviews_require_code_owner_reviews,default_branch_required_pr_reviews_require_code_required_approving_review_count,default_branch_required_pr_reviews_require_last_push_approvalin the tablegithub_repositories(as NOT NULLABLES) - Include a new JSON Schema validation for this new data that we pull from the API (ref)
- Include sample data in the fixtures (ref)
- Include that step into the seed process (ref)
- Include the new function into
upsertGithubRepositories(ref)