├── .api-version ├── .formatter.exs ├── .github ├── FUNDING.yml └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── config └── config.exs ├── guides └── telemetry.md ├── lib ├── github.ex ├── github │ ├── auth.ex │ ├── auth │ │ └── cache.ex │ ├── client.ex │ ├── config.ex │ ├── encoder.ex │ ├── error.ex │ ├── operation.ex │ ├── plugin.ex │ ├── plugin │ │ ├── httpoison_client.ex │ │ ├── jason_serializer.ex │ │ ├── opentelemetry.ex │ │ ├── redix_full_response_cache.ex │ │ ├── redix_redirect_cache.ex │ │ ├── test_client.ex │ │ └── typed_decoder.ex │ ├── processor.ex │ ├── testing.ex │ ├── testing │ │ ├── call.ex │ │ ├── mock.ex │ │ ├── store.ex │ │ └── store │ │ │ ├── ets.ex │ │ │ └── process.ex │ └── webhook.ex ├── operations │ ├── actions.ex │ ├── activity.ex │ ├── apps.ex │ ├── billing.ex │ ├── checks.ex │ ├── classroom.ex │ ├── code_scanning.ex │ ├── codes_of_conduct.ex │ ├── codespaces.ex │ ├── copilot.ex │ ├── dependabot.ex │ ├── dependency_graph.ex │ ├── emojis.ex │ ├── gists.ex │ ├── git.ex │ ├── gitignore.ex │ ├── interactions.ex │ ├── issues.ex │ ├── licenses.ex │ ├── markdown.ex │ ├── meta.ex │ ├── migrations.ex │ ├── oidc.ex │ ├── orgs.ex │ ├── packages.ex │ ├── projects.ex │ ├── pulls.ex │ ├── rate_limit.ex │ ├── reactions.ex │ ├── repos.ex │ ├── search.ex │ ├── secret_scanning.ex │ ├── security_advisories.ex │ ├── teams.ex │ └── users.ex └── schemas │ ├── actions │ ├── actions │ │ └── job_steps.ex │ ├── billing_usage.ex │ ├── billing_usage_minutes_used_breakdown.ex │ ├── cache_list.ex │ ├── cache_list_actions_caches.ex │ ├── cache_usage_by_repository.ex │ ├── cache_usage_org_enterprise.ex │ ├── get_default_workflow_permissions.ex │ ├── job.ex │ ├── organization_permissions.ex │ ├── public_key.ex │ ├── repository_permissions.ex │ ├── review_custom_gates │ │ ├── comment_required.ex │ │ └── state_required.ex │ ├── runner.ex │ ├── runner │ │ ├── application.ex │ │ ├── jitconfig.ex │ │ ├── label.ex │ │ ├── labels.ex │ │ └── labels_readonly.ex │ ├── secret.ex │ ├── set_default_workflow_permissions.ex │ ├── variable.ex │ ├── workflow.ex │ └── workflow │ │ ├── access_to_repository.ex │ │ ├── run.ex │ │ ├── run_usage.ex │ │ ├── run_usage_billable.ex │ │ ├── run_usage_billable_macos.ex │ │ ├── run_usage_billable_macos_actions │ │ └── job_runs.ex │ │ ├── run_usage_billable_ubuntu.ex │ │ ├── run_usage_billable_ubuntu_actions │ │ └── job_runs.ex │ │ ├── run_usage_billable_windows.ex │ │ ├── run_usage_billable_windows_actions │ │ └── job_runs.ex │ │ ├── usage.ex │ │ ├── usage_billable.ex │ │ ├── usage_billable_macos.ex │ │ ├── usage_billable_ubuntu.ex │ │ └── usage_billable_windows.ex │ ├── actor.ex │ ├── api_overview.ex │ ├── api_overview_domains.ex │ ├── api_overview_ssh_key_fingerprints.ex │ ├── app.ex │ ├── app │ ├── installation_request.ex │ └── permissions.ex │ ├── artifact.ex │ ├── artifact_workflow_run.ex │ ├── authentication_token.ex │ ├── authorization.ex │ ├── authorization_app.ex │ ├── auto_merge.ex │ ├── autolink.ex │ ├── base_gist.ex │ ├── base_gist_files.ex │ ├── basic_error.ex │ ├── blob.ex │ ├── branch │ ├── protection.ex │ ├── protection_allow_deletions.ex │ ├── protection_allow_force_pushes.ex │ ├── protection_allow_fork_syncing.ex │ ├── protection_block_creations.ex │ ├── protection_lock_branch.ex │ ├── protection_required_conversation_resolution.ex │ ├── protection_required_linear_history.ex │ ├── protection_required_signatures.ex │ ├── restriction_policy.ex │ ├── restriction_policy_apps.ex │ ├── restriction_policy_apps_owner.ex │ ├── restriction_policy_apps_permissions.ex │ ├── restriction_policy_teams.ex │ ├── restriction_policy_users.ex │ ├── short.ex │ ├── short_commit.ex │ ├── with_protection.ex │ └── with_protection_links.ex │ ├── check │ ├── annotation.ex │ ├── automated_security_fixes.ex │ ├── run.ex │ ├── run_check_suite.ex │ ├── run_output.ex │ ├── suite.ex │ ├── suite_preference.ex │ ├── suite_preference_preferences.ex │ └── suite_preference_preferences_auto_trigger_checks.ex │ ├── classroom │ ├── accepted_assignment.ex │ ├── assignment.ex │ ├── assignment_grade.ex │ ├── organization.ex │ ├── repository.ex │ └── user.ex │ ├── clone_traffic.ex │ ├── code_of_conduct.ex │ ├── code_scanning │ ├── alert.ex │ ├── alert_instance.ex │ ├── alert_instance_message.ex │ ├── alert_items.ex │ ├── alert_location.ex │ ├── alert_rule.ex │ ├── alert_rule_summary.ex │ ├── analysis.ex │ ├── analysis_deletion.ex │ ├── analysis_tool.ex │ ├── codeql_database.ex │ ├── default_setup.ex │ ├── default_setup_update.ex │ ├── default_setup_update_response.ex │ ├── organization_alert_items.ex │ ├── sarifs_receipt.ex │ └── sarifs_status.ex │ ├── code_search_result_item.ex │ ├── codeowners_errors.ex │ ├── codeowners_errors_errors.ex │ ├── codespace.ex │ ├── codespace │ ├── export_details.ex │ ├── git_status.ex │ ├── machine.ex │ ├── org_secret.ex │ ├── permissions_check_for_devcontainer.ex │ ├── public_key.ex │ ├── runtime_constraints.ex │ ├── secret.ex │ ├── user_public_key.ex │ ├── with_full_repository.ex │ ├── with_full_repository_git_status.ex │ └── with_full_repository_runtime_constraints.ex │ ├── collaborator.ex │ ├── collaborator_permissions.ex │ ├── combined_billing_usage.ex │ ├── combined_commit_status.ex │ ├── commit.ex │ ├── commit │ ├── activity.ex │ ├── author.ex │ ├── comment.ex │ ├── commit.ex │ ├── commit_tree.ex │ ├── committer.ex │ ├── comparison.ex │ ├── parents.ex │ ├── search_result_item.ex │ ├── search_result_item_commit.ex │ ├── search_result_item_commit_author.ex │ ├── search_result_item_commit_tree.ex │ ├── search_result_item_parents.ex │ ├── stats.ex │ └── status.ex │ ├── community_health_file.ex │ ├── community_profile.ex │ ├── community_profile_files.ex │ ├── container_metadata.ex │ ├── content │ ├── file.ex │ ├── file_links.ex │ ├── submodule.ex │ ├── submodule_links.ex │ ├── symlink.ex │ ├── symlink_links.ex │ ├── traffic.ex │ ├── tree.ex │ ├── tree_entries.ex │ ├── tree_entries_links.ex │ └── tree_links.ex │ ├── contributor.ex │ ├── contributor_activity.ex │ ├── contributor_activity_weeks.ex │ ├── copilot │ ├── organization_details.ex │ ├── seat_breakdown.ex │ ├── seat_details.ex │ └── usage_metrics.ex │ ├── custom_deployment_rule_app.ex │ ├── custom_property_value.ex │ ├── dependabot │ ├── alert.ex │ ├── alert │ │ ├── dependency.ex │ │ ├── package.ex │ │ ├── security_advisory.ex │ │ ├── security_advisory_cvss.ex │ │ ├── security_advisory_cwes.ex │ │ ├── security_advisory_identifiers.ex │ │ ├── security_advisory_references.ex │ │ ├── security_vulnerability.ex │ │ ├── security_vulnerability_first_patched_version.ex │ │ ├── with_repository.ex │ │ └── with_repository_dependency.ex │ ├── public_key.ex │ └── secret.ex │ ├── dependency_graph │ ├── diff.ex │ ├── diff_vulnerabilities.ex │ ├── spdx_sbom.ex │ ├── spdx_sbom_sbom.ex │ ├── spdx_sbom_sbom_creation_info.ex │ ├── spdx_sbom_sbom_packages.ex │ └── spdx_sbom_sbom_packages_external_refs.ex │ ├── deploy_key.ex │ ├── deployment.ex │ ├── deployment │ ├── branch_policy.ex │ ├── branch_policy_name_pattern.ex │ ├── branch_policy_name_pattern_with_type.ex │ ├── branch_policy_settings.ex │ ├── protection_rule.ex │ └── status.ex │ ├── diff_entry.ex │ ├── docker_metadata.ex │ ├── email.ex │ ├── empty_object.ex │ ├── enterprise.ex │ ├── environment.ex │ ├── environment_approvals.ex │ ├── environment_approvals_environments.ex │ ├── environment_protection_rules.ex │ ├── environment_protection_rules_reviewers.ex │ ├── event.ex │ ├── event_payload.ex │ ├── event_payload_pages.ex │ ├── event_repo.ex │ ├── feed.ex │ ├── feed_links.ex │ ├── file_commit.ex │ ├── file_commit_commit.ex │ ├── file_commit_commit_author.ex │ ├── file_commit_commit_committer.ex │ ├── file_commit_commit_parents.ex │ ├── file_commit_commit_tree.ex │ ├── file_commit_commit_verification.ex │ ├── file_commit_content.ex │ ├── file_commit_content_links.ex │ ├── forbidden_gist.ex │ ├── forbidden_gist_block.ex │ ├── gist.ex │ ├── gist │ ├── comment.ex │ ├── commit.ex │ ├── commit_change_status.ex │ └── files.ex │ ├── git │ ├── commit.ex │ ├── commit_author.ex │ ├── commit_committer.ex │ ├── commit_parents.ex │ ├── commit_tree.ex │ ├── commit_verification.ex │ ├── ignore_template.ex │ ├── ref.ex │ ├── ref_object.ex │ ├── tag.ex │ ├── tag_object.ex │ ├── tag_tagger.ex │ ├── tree.ex │ ├── tree_tree.ex │ └── user.ex │ ├── global_advisory.ex │ ├── global_advisory_cvss.ex │ ├── gpg_key.ex │ ├── gpg_key_emails.ex │ ├── gpg_key_subkeys.ex │ ├── gpg_key_subkeys_emails.ex │ ├── hook.ex │ ├── hook │ ├── delivery.ex │ ├── delivery_item.ex │ ├── delivery_request.ex │ ├── delivery_response.ex │ └── response.ex │ ├── hovercard.ex │ ├── hovercard_contexts.ex │ ├── import.ex │ ├── import_project_choices.ex │ ├── installation.ex │ ├── installation │ └── token.ex │ ├── interaction │ ├── limit.ex │ └── limit │ │ └── response.ex │ ├── issue.ex │ ├── issue │ ├── comment.ex │ ├── event.ex │ ├── event │ │ ├── added_to_project.ex │ │ ├── added_to_project_project_card.ex │ │ ├── assigned.ex │ │ ├── converted_note_to_issue.ex │ │ ├── converted_note_to_issue_project_card.ex │ │ ├── demilestoned.ex │ │ ├── demilestoned_milestone.ex │ │ ├── labeled.ex │ │ ├── labeled_label.ex │ │ ├── locked.ex │ │ ├── milestoned.ex │ │ ├── milestoned_milestone.ex │ │ ├── moved_column_in_project.ex │ │ ├── moved_column_in_project_project_card.ex │ │ ├── removed_from_project.ex │ │ ├── removed_from_project_project_card.ex │ │ ├── renamed.ex │ │ ├── renamed_rename.ex │ │ ├── review_dismissed.ex │ │ ├── review_dismissed_dismissed_review.ex │ │ ├── review_request_removed.ex │ │ ├── review_requested.ex │ │ ├── state_change.ex │ │ ├── unassigned.ex │ │ ├── unlabeled.ex │ │ └── unlabeled_label.ex │ ├── event_dismissed_review.ex │ ├── event_label.ex │ ├── event_milestone.ex │ ├── event_project_card.ex │ ├── event_rename.ex │ ├── labels.ex │ ├── pull_request.ex │ ├── search_result_item.ex │ ├── search_result_item_labels.ex │ └── search_result_item_pull_request.ex │ ├── key.ex │ ├── label.ex │ ├── label_search_result_item.ex │ ├── language.ex │ ├── license.ex │ ├── license │ ├── content.ex │ └── content_links.ex │ ├── link.ex │ ├── link_with_type.ex │ ├── marketplace │ ├── account.ex │ ├── listing_plan.ex │ ├── purchase.ex │ ├── purchase_marketplace_pending_change.ex │ └── purchase_marketplace_purchase.ex │ ├── merged_upstream.ex │ ├── metadata.ex │ ├── migration.ex │ ├── milestone.ex │ ├── oidc_custom_sub.ex │ ├── oidc_custom_sub_repo.ex │ ├── org_custom_property.ex │ ├── org_hook.ex │ ├── org_hook_config.ex │ ├── org_membership.ex │ ├── org_membership_permissions.ex │ ├── org_repo_custom_property_values.ex │ ├── organization.ex │ ├── organization │ ├── actions_secret.ex │ ├── actions_variable.ex │ ├── dependabot_secret.ex │ ├── fine_grained_permission.ex │ ├── invitation.ex │ ├── plan.ex │ ├── programmatic_access_grant.ex │ ├── programmatic_access_grant │ │ ├── permissions.ex │ │ ├── permissions_organization.ex │ │ ├── permissions_other.ex │ │ ├── permissions_repository.ex │ │ ├── request.ex │ │ ├── request_permissions.ex │ │ ├── request_permissions_organization.ex │ │ ├── request_permissions_other.ex │ │ └── request_permissions_repository.ex │ ├── role.ex │ └── secret_scanning_alert.ex │ ├── package.ex │ ├── package_version.ex │ ├── package_version_metadata.ex │ ├── packages_billing_usage.ex │ ├── page.ex │ ├── pages │ ├── build.ex │ ├── build_error.ex │ ├── build_status.ex │ ├── deployment.ex │ ├── deployment_status.ex │ ├── health_check.ex │ ├── health_check_alt_domain.ex │ ├── health_check_domain.ex │ ├── https_certificate.ex │ └── source_hash.ex │ ├── participation_stats.ex │ ├── pending_deployment.ex │ ├── pending_deployment_environment.ex │ ├── pending_deployment_reviewers.ex │ ├── porter_author.ex │ ├── porter_large_file.ex │ ├── private_vulnerability_report │ └── create.ex │ ├── project.ex │ ├── project │ ├── card.ex │ ├── collaborator_permission.ex │ └── column.ex │ ├── protected_branch.ex │ ├── protected_branch │ ├── admin_enforced.ex │ ├── allow_deletions.ex │ ├── allow_force_pushes.ex │ ├── allow_fork_syncing.ex │ ├── block_creations.ex │ ├── enforce_admins.ex │ ├── lock_branch.ex │ ├── pull_request_review.ex │ ├── pull_request_review_bypass_pull_request_allowances.ex │ ├── pull_request_review_dismissal_restrictions.ex │ ├── required_conversation_resolution.ex │ ├── required_linear_history.ex │ ├── required_pull_request_reviews.ex │ ├── required_pull_request_reviews_bypass_pull_request_allowances.ex │ ├── required_pull_request_reviews_dismissal_restrictions.ex │ ├── required_signatures.ex │ ├── required_status_check.ex │ └── required_status_check_checks.ex │ ├── pull_request.ex │ ├── pull_request │ ├── base.ex │ ├── base_repo.ex │ ├── base_repo_owner.ex │ ├── base_repo_permissions.ex │ ├── base_user.ex │ ├── head.ex │ ├── head_repo.ex │ ├── head_repo_license.ex │ ├── head_repo_owner.ex │ ├── head_repo_permissions.ex │ ├── head_user.ex │ ├── labels.ex │ ├── links.ex │ ├── merge_result.ex │ ├── review.ex │ ├── review_comment.ex │ ├── review_comment_links.ex │ ├── review_comment_links_html.ex │ ├── review_comment_links_pull_request.ex │ ├── review_comment_links_self.ex │ ├── review_links.ex │ ├── review_links_html.ex │ ├── review_links_pull_request.ex │ └── review_request.ex │ ├── rate_limit │ ├── overview.ex │ └── overview_resources.ex │ ├── reaction.ex │ ├── reaction │ └── rollup.ex │ ├── referrer_traffic.ex │ ├── release.ex │ ├── release │ ├── asset.ex │ └── notes_content.ex │ ├── repo_codespaces_secret.ex │ ├── repo_search_result_item.ex │ ├── repo_search_result_item_permissions.ex │ ├── repository.ex │ ├── repository │ ├── advisory.ex │ ├── advisory │ │ ├── create.ex │ │ ├── create_vulnerabilities.ex │ │ ├── create_vulnerabilities_package.ex │ │ ├── cvss.ex │ │ ├── identifiers.ex │ │ ├── submission.ex │ │ ├── update.ex │ │ ├── update_vulnerabilities.ex │ │ └── update_vulnerabilities_package.ex │ ├── collaborator_permission.ex │ ├── id_and_ref_name.ex │ ├── id_and_ref_name_repository_id.ex │ ├── invitation.ex │ ├── license.ex │ ├── name_and_ref_name.ex │ ├── name_and_ref_name_repository_name.ex │ ├── permissions.ex │ ├── property_and_ref_name.ex │ ├── property_and_ref_name_repository_property.ex │ ├── rule │ │ ├── branch_name_pattern.ex │ │ ├── commit_author_email_pattern.ex │ │ ├── commit_message_pattern.ex │ │ ├── committer_email_pattern.ex │ │ ├── creation.ex │ │ ├── deletion.ex │ │ ├── non_fast_forward.ex │ │ ├── params_status_check_configuration.ex │ │ ├── params_workflow_file_reference.ex │ │ ├── pull_request.ex │ │ ├── required_deployments.ex │ │ ├── required_linear_history.ex │ │ ├── required_signatures.ex │ │ ├── required_status_checks.ex │ │ ├── tag_name_pattern.ex │ │ ├── update.ex │ │ └── workflows.ex │ ├── ruleset.ex │ ├── ruleset │ │ ├── bypass_actor.ex │ │ ├── conditions.ex │ │ └── conditions_repository_property_spec.ex │ ├── ruleset_links.ex │ ├── ruleset_links_html.ex │ ├── ruleset_links_self.ex │ └── subscription.ex │ ├── review_comment.ex │ ├── review_comment_links.ex │ ├── root.ex │ ├── rule_suite.ex │ ├── rule_suite_rule_evaluations.ex │ ├── rule_suite_rule_evaluations_rule_source.ex │ ├── rule_suites.ex │ ├── scim │ └── error.ex │ ├── search_result_text_matches.ex │ ├── search_result_text_matches_matches.ex │ ├── secret_scanning │ ├── alert.ex │ ├── location.ex │ ├── location_commit.ex │ ├── location_discussion_body.ex │ ├── location_discussion_comment.ex │ ├── location_discussion_title.ex │ ├── location_issue_body.ex │ ├── location_issue_comment.ex │ ├── location_issue_title.ex │ ├── location_pull_request_body.ex │ ├── location_pull_request_comment.ex │ ├── location_pull_request_review.ex │ ├── location_pull_request_review_comment.ex │ ├── location_pull_request_title.ex │ └── location_wiki_commit.ex │ ├── security_and_analysis.ex │ ├── security_and_analysis_advanced_security.ex │ ├── security_and_analysis_dependabot_security_updates.ex │ ├── security_and_analysis_secret_scanning.ex │ ├── security_and_analysis_secret_scanning_push_protection.ex │ ├── selected_actions.ex │ ├── service_unavailable.ex │ ├── short_blob.ex │ ├── short_branch.ex │ ├── short_branch_commit.ex │ ├── snapshot.ex │ ├── snapshot_actions │ └── job.ex │ ├── snapshot_detector.ex │ ├── snapshot_manifests.ex │ ├── social_account.ex │ ├── ssh_signing_key.ex │ ├── starred_repository.ex │ ├── status.ex │ ├── status_check_policy.ex │ ├── status_check_policy_checks.ex │ ├── tag.ex │ ├── tag_commit.ex │ ├── tag_protection.ex │ ├── team.ex │ ├── team │ ├── discussion.ex │ ├── discussion_comment.ex │ ├── membership.ex │ ├── organization.ex │ ├── organization_plan.ex │ ├── permissions.ex │ ├── project.ex │ ├── project_permissions.ex │ ├── repository.ex │ └── repository_permissions.ex │ ├── thread.ex │ ├── thread_subject.ex │ ├── thread_subscription.ex │ ├── timeline │ ├── assigned_issue_event.ex │ ├── comment_event.ex │ ├── commit_commented_event.ex │ ├── committed_event.ex │ ├── committed_event_author.ex │ ├── committed_event_committer.ex │ ├── committed_event_parents.ex │ ├── committed_event_tree.ex │ ├── committed_event_verification.ex │ ├── cross_referenced_event.ex │ ├── cross_referenced_event_source.ex │ ├── line_commented_event.ex │ ├── reviewed_event.ex │ ├── reviewed_event_links.ex │ ├── reviewed_event_links_html.ex │ ├── reviewed_event_links_pull_request.ex │ └── unassigned_issue_event.ex │ ├── topic.ex │ ├── topic_search_result_item.ex │ ├── traffic.ex │ ├── user.ex │ ├── user │ ├── marketplace_purchase.ex │ ├── plan.ex │ └── search_result_item.ex │ ├── validation_error.ex │ ├── validation_error_errors.ex │ ├── verification.ex │ ├── view_traffic.ex │ └── webhook │ └── config.ex ├── mix.exs ├── mix.lock └── test ├── github ├── client_test.exs ├── operation_test.exs ├── testing_test.exs └── webhook_test.exs ├── github_test.exs └── test_helper.exs /.api-version: -------------------------------------------------------------------------------- 1 | 2022-11-28 -------------------------------------------------------------------------------- /.formatter.exs: -------------------------------------------------------------------------------- 1 | locals_without_parens = [ 2 | # GitHub.Testing 3 | assert_gh_called: 1, 4 | assert_gh_called: 2, 5 | mock_gh: 2, 6 | mock_gh: 3 7 | ] 8 | 9 | [ 10 | export: [locals_without_parens: locals_without_parens], 11 | inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"], 12 | locals_without_parens: locals_without_parens 13 | ] 14 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: 2 | - aj-foster 3 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | publish: 10 | name: Publish to Hex.pm 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v3 15 | 16 | - name: Setup BEAM 17 | uses: erlef/setup-beam@v1 18 | with: 19 | otp-version: "25.2" 20 | elixir-version: "1.14.2" 21 | 22 | - name: Publish Package 23 | run: | 24 | mix deps.get 25 | HEX_API_KEY=${{secrets.HEX_API_KEY}} mix hex.publish --yes --replace 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # The directory Mix will write compiled artifacts to. 2 | /_build/ 3 | 4 | # If you run "mix test --cover", coverage assets end up here. 5 | /cover/ 6 | 7 | # The directory Mix downloads your dependencies sources to. 8 | /deps/ 9 | 10 | # Where third-party dependencies like ExDoc output generated docs. 11 | /doc/ 12 | 13 | # Ignore .fetch files in case you like to edit your project deps locally. 14 | /.fetch 15 | 16 | # If the VM crashes, it generates a dump, let's ignore it too. 17 | erl_crash.dump 18 | 19 | # Also ignore archive artifacts (built via "mix archive.build"). 20 | *.ez 21 | 22 | # Ignore package tarball (built via "mix hex.build"). 23 | oapi_github-*.tar 24 | 25 | # Temporary files, for example, from tests. 26 | /tmp/ 27 | -------------------------------------------------------------------------------- /lib/github/encoder.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Encoder do 2 | defmacro __using__(_opts) do 3 | quote do 4 | @derive {Jason.Encoder, except: [:__info__]} 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/github/processor.ex: -------------------------------------------------------------------------------- 1 | if Mix.env() == :dev do 2 | defmodule GitHub.Processor do 3 | @moduledoc false 4 | use OpenAPI.Processor 5 | 6 | def operation_docstring(state, operation_spec, params) do 7 | OpenAPI.Processor.Operation.docstring(state, operation_spec, params) 8 | |> String.replace("](/", "](https://docs.github.com/") 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/github/testing/call.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Testing.Call do 2 | @moduledoc """ 3 | Internal representation of an API call 4 | """ 5 | 6 | @typedoc """ 7 | Recorded API call 8 | """ 9 | @type t :: %__MODULE__{ 10 | args: [any], 11 | function: atom, 12 | module: module, 13 | opts: keyword 14 | } 15 | 16 | defstruct [:args, :function, :module, :opts] 17 | end 18 | -------------------------------------------------------------------------------- /lib/schemas/actions/cache_list.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.CacheList do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.CacheList 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | actions_caches: [GitHub.Actions.CacheListActionsCaches.t()], 10 | total_count: integer 11 | } 12 | 13 | defstruct [:__info__, :actions_caches, :total_count] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [actions_caches: [{GitHub.Actions.CacheListActionsCaches, :t}], total_count: :integer] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/actions/cache_usage_by_repository.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.CacheUsageByRepository do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.CacheUsageByRepository 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | active_caches_count: integer, 10 | active_caches_size_in_bytes: integer, 11 | full_name: String.t() 12 | } 13 | 14 | defstruct [:__info__, :active_caches_count, :active_caches_size_in_bytes, :full_name] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | active_caches_count: :integer, 23 | active_caches_size_in_bytes: :integer, 24 | full_name: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/cache_usage_org_enterprise.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.CacheUsageOrgEnterprise do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.CacheUsageOrgEnterprise 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | total_active_caches_count: integer, 10 | total_active_caches_size_in_bytes: integer 11 | } 12 | 13 | defstruct [:__info__, :total_active_caches_count, :total_active_caches_size_in_bytes] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [total_active_caches_count: :integer, total_active_caches_size_in_bytes: :integer] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/actions/get_default_workflow_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.GetDefaultWorkflowPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.GetDefaultWorkflowPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | can_approve_pull_request_reviews: boolean, 10 | default_workflow_permissions: String.t() 11 | } 12 | 13 | defstruct [:__info__, :can_approve_pull_request_reviews, :default_workflow_permissions] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | can_approve_pull_request_reviews: :boolean, 22 | default_workflow_permissions: {:enum, ["read", "write"]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/actions/repository_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.RepositoryPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.RepositoryPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | allowed_actions: String.t() | nil, 10 | enabled: boolean, 11 | selected_actions_url: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :allowed_actions, :enabled, :selected_actions_url] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | allowed_actions: {:enum, ["all", "local_only", "selected"]}, 23 | enabled: :boolean, 24 | selected_actions_url: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/review_custom_gates/comment_required.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.ReviewCustomGates.CommentRequired do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.ReviewCustomGates.CommentRequired 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, comment: String.t(), environment_name: String.t()} 8 | 9 | defstruct [:__info__, :comment, :environment_name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [comment: {:string, :generic}, environment_name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/review_custom_gates/state_required.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.ReviewCustomGates.StateRequired do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.ReviewCustomGates.StateRequired 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | comment: String.t() | nil, 10 | environment_name: String.t(), 11 | state: String.t() 12 | } 13 | 14 | defstruct [:__info__, :comment, :environment_name, :state] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | comment: {:string, :generic}, 23 | environment_name: {:string, :generic}, 24 | state: {:enum, ["approved", "rejected"]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/runner/jitconfig.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Runner.Jitconfig do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Runner.Jitconfig 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | encoded_jit_config: String.t(), 10 | runner: GitHub.Actions.Runner.t() 11 | } 12 | 13 | defstruct [:__info__, :encoded_jit_config, :runner] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(:json_resp) do 18 | [encoded_jit_config: {:string, :generic}, runner: {GitHub.Actions.Runner, :t}] 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/schemas/actions/runner/label.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Runner.Label do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Runner.Label 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer | nil, 10 | name: String.t(), 11 | type: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :id, :name, :type] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [id: :integer, name: {:string, :generic}, type: {:enum, ["read-only", "custom"]}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/actions/runner/labels.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Runner.Labels do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Runner.Labels 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | labels: [GitHub.Actions.Runner.Label.t()], 10 | total_count: integer 11 | } 12 | 13 | defstruct [:__info__, :labels, :total_count] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(:json_resp) do 18 | [labels: [{GitHub.Actions.Runner.Label, :t}], total_count: :integer] 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/schemas/actions/runner/labels_readonly.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Runner.LabelsReadonly do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Runner.LabelsReadonly 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | labels: [GitHub.Actions.Runner.Label.t()], 10 | total_count: integer 11 | } 12 | 13 | defstruct [:__info__, :labels, :total_count] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(:json_resp) do 18 | [labels: [{GitHub.Actions.Runner.Label, :t}], total_count: :integer] 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/schemas/actions/secret.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Secret do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Secret 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: DateTime.t(), 10 | name: String.t(), 11 | updated_at: DateTime.t() 12 | } 13 | 14 | defstruct [:__info__, :created_at, :name, :updated_at] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | created_at: {:string, :date_time}, 23 | name: {:string, :generic}, 24 | updated_at: {:string, :date_time} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/set_default_workflow_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.SetDefaultWorkflowPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.SetDefaultWorkflowPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | can_approve_pull_request_reviews: boolean | nil, 10 | default_workflow_permissions: String.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :can_approve_pull_request_reviews, :default_workflow_permissions] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | can_approve_pull_request_reviews: :boolean, 22 | default_workflow_permissions: {:enum, ["read", "write"]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/actions/variable.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Variable do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Variable 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: DateTime.t(), 10 | name: String.t(), 11 | updated_at: DateTime.t(), 12 | value: String.t() 13 | } 14 | 15 | defstruct [:__info__, :created_at, :name, :updated_at, :value] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | created_at: {:string, :date_time}, 24 | name: {:string, :generic}, 25 | updated_at: {:string, :date_time}, 26 | value: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/access_to_repository.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.AccessToRepository do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.AccessToRepository 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, access_level: String.t()} 8 | 9 | defstruct [:__info__, :access_level] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [access_level: {:enum, ["none", "user", "organization"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsage do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsage 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | billable: GitHub.Actions.Workflow.RunUsageBillable.t(), 10 | run_duration_ms: integer | nil 11 | } 12 | 13 | defstruct [:__info__, :billable, :run_duration_ms] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [billable: {GitHub.Actions.Workflow.RunUsageBillable, :t}, run_duration_ms: :integer] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_macos.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableMACOS do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableMACOS 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | job_runs: [GitHub.Actions.Workflow.RunUsageBillableMACOSActions.JobRuns.t()] | nil, 10 | jobs: integer, 11 | total_ms: integer 12 | } 13 | 14 | defstruct [:__info__, :job_runs, :jobs, :total_ms] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | job_runs: [{GitHub.Actions.Workflow.RunUsageBillableMACOSActions.JobRuns, :t}], 23 | jobs: :integer, 24 | total_ms: :integer 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_macos_actions/job_runs.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableMACOSActions.JobRuns do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableMACOSActions.JobRuns 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, duration_ms: integer, job_id: integer} 8 | 9 | defstruct [:__info__, :duration_ms, :job_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [duration_ms: :integer, job_id: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_ubuntu.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableUBUNTU do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableUBUNTU 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | job_runs: [GitHub.Actions.Workflow.RunUsageBillableUBUNTUActions.JobRuns.t()] | nil, 10 | jobs: integer, 11 | total_ms: integer 12 | } 13 | 14 | defstruct [:__info__, :job_runs, :jobs, :total_ms] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | job_runs: [{GitHub.Actions.Workflow.RunUsageBillableUBUNTUActions.JobRuns, :t}], 23 | jobs: :integer, 24 | total_ms: :integer 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_ubuntu_actions/job_runs.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableUBUNTUActions.JobRuns do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableUBUNTUActions.JobRuns 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, duration_ms: integer, job_id: integer} 8 | 9 | defstruct [:__info__, :duration_ms, :job_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [duration_ms: :integer, job_id: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_windows.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableWINDOWS do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableWINDOWS 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | job_runs: [GitHub.Actions.Workflow.RunUsageBillableWINDOWSActions.JobRuns.t()] | nil, 10 | jobs: integer, 11 | total_ms: integer 12 | } 13 | 14 | defstruct [:__info__, :job_runs, :jobs, :total_ms] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | job_runs: [{GitHub.Actions.Workflow.RunUsageBillableWINDOWSActions.JobRuns, :t}], 23 | jobs: :integer, 24 | total_ms: :integer 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/run_usage_billable_windows_actions/job_runs.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.RunUsageBillableWINDOWSActions.JobRuns do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.RunUsageBillableWINDOWSActions.JobRuns 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, duration_ms: integer, job_id: integer} 8 | 9 | defstruct [:__info__, :duration_ms, :job_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [duration_ms: :integer, job_id: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/usage.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.Usage do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.Usage 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, billable: GitHub.Actions.Workflow.UsageBillable.t()} 8 | 9 | defstruct [:__info__, :billable] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [billable: {GitHub.Actions.Workflow.UsageBillable, :t}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/usage_billable_macos.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.UsageBillableMACOS do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.UsageBillableMACOS 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, total_ms: integer | nil} 8 | 9 | defstruct [:__info__, :total_ms] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [total_ms: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/usage_billable_ubuntu.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.UsageBillableUBUNTU do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.UsageBillableUBUNTU 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, total_ms: integer | nil} 8 | 9 | defstruct [:__info__, :total_ms] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [total_ms: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/actions/workflow/usage_billable_windows.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Actions.Workflow.UsageBillableWINDOWS do 2 | @moduledoc """ 3 | Provides struct and type for a Actions.Workflow.UsageBillableWINDOWS 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, total_ms: integer | nil} 8 | 9 | defstruct [:__info__, :total_ms] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [total_ms: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/authorization_app.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.AuthorizationApp do 2 | @moduledoc """ 3 | Provides struct and type for a AuthorizationApp 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, client_id: String.t(), name: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :client_id, :name, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [client_id: {:string, :generic}, name: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/auto_merge.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.AutoMerge do 2 | @moduledoc """ 3 | Provides struct and type for a AutoMerge 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | commit_message: String.t(), 10 | commit_title: String.t(), 11 | enabled_by: GitHub.User.simple(), 12 | merge_method: String.t() 13 | } 14 | 15 | defstruct [:__info__, :commit_message, :commit_title, :enabled_by, :merge_method] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | commit_message: {:string, :generic}, 24 | commit_title: {:string, :generic}, 25 | enabled_by: {GitHub.User, :simple}, 26 | merge_method: {:enum, ["merge", "squash", "rebase"]} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/autolink.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Autolink do 2 | @moduledoc """ 3 | Provides struct and type for a Autolink 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer, 10 | is_alphanumeric: boolean, 11 | key_prefix: String.t(), 12 | url_template: String.t() 13 | } 14 | 15 | defstruct [:__info__, :id, :is_alphanumeric, :key_prefix, :url_template] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | id: :integer, 24 | is_alphanumeric: :boolean, 25 | key_prefix: {:string, :generic}, 26 | url_template: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/base_gist_files.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.BaseGistFiles do 2 | @moduledoc """ 3 | Provides struct and type for a BaseGistFiles 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/basic_error.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.BasicError do 2 | @moduledoc """ 3 | Provides struct and type for a BasicError 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | documentation_url: String.t() | nil, 10 | message: String.t() | nil, 11 | status: String.t() | nil, 12 | url: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :documentation_url, :message, :status, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | documentation_url: {:string, :generic}, 24 | message: {:string, :generic}, 25 | status: {:string, :generic}, 26 | url: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_allow_deletions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionAllowDeletions do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionAllowDeletions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_allow_force_pushes.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionAllowForcePushes do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionAllowForcePushes 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_allow_fork_syncing.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionAllowForkSyncing do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionAllowForkSyncing 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_block_creations.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionBlockCreations do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionBlockCreations 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_lock_branch.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionLockBranch do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionLockBranch 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_required_conversation_resolution.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionRequiredConversationResolution do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionRequiredConversationResolution 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_required_linear_history.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionRequiredLinearHistory do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionRequiredLinearHistory 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/protection_required_signatures.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ProtectionRequiredSignatures do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ProtectionRequiredSignatures 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean, url: String.t()} 8 | 9 | defstruct [:__info__, :enabled, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/restriction_policy_apps_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.RestrictionPolicyAppsPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.RestrictionPolicyAppsPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | contents: String.t() | nil, 10 | issues: String.t() | nil, 11 | metadata: String.t() | nil, 12 | single_file: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :contents, :issues, :metadata, :single_file] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | contents: {:string, :generic}, 24 | issues: {:string, :generic}, 25 | metadata: {:string, :generic}, 26 | single_file: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/branch/short.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.Short do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.Short 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | commit: GitHub.Branch.ShortCommit.t(), 10 | name: String.t(), 11 | protected: boolean 12 | } 13 | 14 | defstruct [:__info__, :commit, :name, :protected] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [commit: {GitHub.Branch.ShortCommit, :t}, name: {:string, :generic}, protected: :boolean] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/branch/short_commit.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.ShortCommit do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.ShortCommit 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/branch/with_protection_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Branch.WithProtectionLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Branch.WithProtectionLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, html: String.t(), self: String.t()} 8 | 9 | defstruct [:__info__, :html, :self] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [html: {:string, :generic}, self: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/check/automated_security_fixes.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Check.AutomatedSecurityFixes do 2 | @moduledoc """ 3 | Provides struct and type for a Check.AutomatedSecurityFixes 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean, paused: boolean} 8 | 9 | defstruct [:__info__, :enabled, :paused] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean, paused: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/check/run_check_suite.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Check.RunCheckSuite do 2 | @moduledoc """ 3 | Provides struct and type for a Check.RunCheckSuite 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, id: integer} 8 | 9 | defstruct [:__info__, :id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [id: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/check/suite_preference.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Check.SuitePreference do 2 | @moduledoc """ 3 | Provides struct and type for a Check.SuitePreference 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | preferences: GitHub.Check.SuitePreferencePreferences.t(), 10 | repository: GitHub.Repository.minimal() 11 | } 12 | 13 | defstruct [:__info__, :preferences, :repository] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | preferences: {GitHub.Check.SuitePreferencePreferences, :t}, 22 | repository: {GitHub.Repository, :minimal} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/check/suite_preference_preferences.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Check.SuitePreferencePreferences do 2 | @moduledoc """ 3 | Provides struct and type for a Check.SuitePreferencePreferences 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | auto_trigger_checks: 10 | [GitHub.Check.SuitePreferencePreferencesAutoTriggerChecks.t()] | nil 11 | } 12 | 13 | defstruct [:__info__, :auto_trigger_checks] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [auto_trigger_checks: [{GitHub.Check.SuitePreferencePreferencesAutoTriggerChecks, :t}]] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/check/suite_preference_preferences_auto_trigger_checks.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Check.SuitePreferencePreferencesAutoTriggerChecks do 2 | @moduledoc """ 3 | Provides struct and type for a Check.SuitePreferencePreferencesAutoTriggerChecks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, app_id: integer, setting: boolean} 8 | 9 | defstruct [:__info__, :app_id, :setting] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [app_id: :integer, setting: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/classroom/user.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Classroom.User do 2 | @moduledoc """ 3 | Provides struct and type for a Classroom.User 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type simple :: %__MODULE__{ 8 | __info__: map, 9 | avatar_url: String.t(), 10 | html_url: String.t(), 11 | id: integer, 12 | login: String.t() 13 | } 14 | 15 | defstruct [:__info__, :avatar_url, :html_url, :id, :login] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(:simple) do 20 | [ 21 | avatar_url: {:string, :uri}, 22 | html_url: {:string, :uri}, 23 | id: :integer, 24 | login: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/clone_traffic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CloneTraffic do 2 | @moduledoc """ 3 | Provides struct and type for a CloneTraffic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | clones: [GitHub.Traffic.t()], 10 | count: integer, 11 | uniques: integer 12 | } 13 | 14 | defstruct [:__info__, :clones, :count, :uniques] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [clones: [{GitHub.Traffic, :t}], count: :integer, uniques: :integer] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/alert_instance_message.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.AlertInstanceMessage do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.AlertInstanceMessage 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, text: String.t() | nil} 8 | 9 | defstruct [:__info__, :text] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [text: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/analysis_deletion.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.AnalysisDeletion do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.AnalysisDeletion 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | confirm_delete_url: String.t() | nil, 10 | next_analysis_url: String.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :confirm_delete_url, :next_analysis_url] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | confirm_delete_url: {:union, [{:string, :uri}, :null]}, 22 | next_analysis_url: {:union, [{:string, :uri}, :null]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/analysis_tool.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.AnalysisTool do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.AnalysisTool 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | guid: String.t() | nil, 10 | name: String.t() | nil, 11 | version: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :guid, :name, :version] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | guid: {:union, [{:string, :generic}, :null]}, 23 | name: {:string, :generic}, 24 | version: {:union, [{:string, :generic}, :null]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/default_setup_update_response.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.DefaultSetupUpdateResponse do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.DefaultSetupUpdateResponse 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, run_id: integer | nil, run_url: String.t() | nil} 8 | 9 | defstruct [:__info__, :run_id, :run_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [run_id: :integer, run_url: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/sarifs_receipt.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.SarifsReceipt do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.SarifsReceipt 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, id: String.t() | nil, url: String.t() | nil} 8 | 9 | defstruct [:__info__, :id, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [id: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/code_scanning/sarifs_status.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeScanning.SarifsStatus do 2 | @moduledoc """ 3 | Provides struct and type for a CodeScanning.SarifsStatus 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | analyses_url: String.t() | nil, 10 | errors: [String.t()] | nil, 11 | processing_status: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :analyses_url, :errors, :processing_status] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | analyses_url: {:union, [{:string, :uri}, :null]}, 23 | errors: {:union, [[string: :generic], :null]}, 24 | processing_status: {:enum, ["pending", "complete", "failed"]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/codeowners_errors.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CodeownersErrors do 2 | @moduledoc """ 3 | Provides struct and type for a CodeownersErrors 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, errors: [GitHub.CodeownersErrorsErrors.t()]} 8 | 9 | defstruct [:__info__, :errors] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [errors: [{GitHub.CodeownersErrorsErrors, :t}]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/codespace/permissions_check_for_devcontainer.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Codespace.PermissionsCheckForDevcontainer do 2 | @moduledoc """ 3 | Provides struct and type for a Codespace.PermissionsCheckForDevcontainer 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, accepted: boolean} 8 | 9 | defstruct [:__info__, :accepted] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [accepted: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/codespace/runtime_constraints.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Codespace.RuntimeConstraints do 2 | @moduledoc """ 3 | Provides struct and type for a Codespace.RuntimeConstraints 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, allowed_port_privacy_settings: [String.t()] | nil} 8 | 9 | defstruct [:__info__, :allowed_port_privacy_settings] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [allowed_port_privacy_settings: {:union, [[string: :generic], :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/codespace/user_public_key.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Codespace.UserPublicKey do 2 | @moduledoc """ 3 | Provides struct and type for a Codespace.UserPublicKey 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, key: String.t(), key_id: String.t()} 8 | 9 | defstruct [:__info__, :key, :key_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [key: {:string, :generic}, key_id: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/codespace/with_full_repository_runtime_constraints.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Codespace.WithFullRepositoryRuntimeConstraints do 2 | @moduledoc """ 3 | Provides struct and type for a Codespace.WithFullRepositoryRuntimeConstraints 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, allowed_port_privacy_settings: [String.t()] | nil} 8 | 9 | defstruct [:__info__, :allowed_port_privacy_settings] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [allowed_port_privacy_settings: {:union, [[string: :generic], :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/collaborator_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CollaboratorPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a CollaboratorPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean | nil, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean | nil 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/commit/activity.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.Activity do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.Activity 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, days: [integer], total: integer, week: integer} 8 | 9 | defstruct [:__info__, :days, :total, :week] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [days: [:integer], total: :integer, week: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/commit/author.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.Author do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.Author 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type simple :: %__MODULE__{__info__: map, email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(:simple) do 14 | [email: {:string, :email}, name: {:string, :generic}] 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/schemas/commit/commit_tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.CommitTree do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.CommitTree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/commit/committer.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.Committer do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.Committer 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type simple :: %__MODULE__{__info__: map, email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(:simple) do 14 | [email: {:string, :email}, name: {:string, :generic}] 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/schemas/commit/parents.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.Parents do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.Parents 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html_url: String.t() | nil, 10 | sha: String.t(), 11 | url: String.t() 12 | } 13 | 14 | defstruct [:__info__, :html_url, :sha, :url] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [html_url: {:string, :uri}, sha: {:string, :generic}, url: {:string, :uri}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/commit/search_result_item_commit_author.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.SearchResultItemCommitAuthor do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.SearchResultItemCommitAuthor 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: DateTime.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :date_time}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/commit/search_result_item_commit_tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.SearchResultItemCommitTree do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.SearchResultItemCommitTree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/commit/search_result_item_parents.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.SearchResultItemParents do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.SearchResultItemParents 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html_url: String.t() | nil, 10 | sha: String.t() | nil, 11 | url: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :html_url, :sha, :url] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [html_url: {:string, :generic}, sha: {:string, :generic}, url: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/commit/stats.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Commit.Stats do 2 | @moduledoc """ 3 | Provides struct and type for a Commit.Stats 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | additions: integer | nil, 10 | deletions: integer | nil, 11 | total: integer | nil 12 | } 13 | 14 | defstruct [:__info__, :additions, :deletions, :total] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [additions: :integer, deletions: :integer, total: :integer] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/community_health_file.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CommunityHealthFile do 2 | @moduledoc """ 3 | Provides struct and type for a CommunityHealthFile 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, html_url: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :html_url, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [html_url: {:string, :uri}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/container_metadata.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ContainerMetadata do 2 | @moduledoc """ 3 | Provides struct and type for a ContainerMetadata 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, tags: [String.t()]} 8 | 9 | defstruct [:__info__, :tags] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [tags: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/content/file_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.FileLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Content.FileLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/content/submodule_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.SubmoduleLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Content.SubmoduleLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/content/symlink_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.SymlinkLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Content.SymlinkLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/content/traffic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.Traffic do 2 | @moduledoc """ 3 | Provides struct and type for a Content.Traffic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | count: integer, 10 | path: String.t(), 11 | title: String.t(), 12 | uniques: integer 13 | } 14 | 15 | defstruct [:__info__, :count, :path, :title, :uniques] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [count: :integer, path: {:string, :generic}, title: {:string, :generic}, uniques: :integer] 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/schemas/content/tree_entries_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.TreeEntriesLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Content.TreeEntriesLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/content/tree_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Content.TreeLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Content.TreeLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/contributor_activity.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ContributorActivity do 2 | @moduledoc """ 3 | Provides struct and type for a ContributorActivity 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | author: GitHub.User.simple() | nil, 10 | total: integer, 11 | weeks: [GitHub.ContributorActivityWeeks.t()] 12 | } 13 | 14 | defstruct [:__info__, :author, :total, :weeks] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | author: {:union, [{GitHub.User, :simple}, :null]}, 23 | total: :integer, 24 | weeks: [{GitHub.ContributorActivityWeeks, :t}] 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/contributor_activity_weeks.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ContributorActivityWeeks do 2 | @moduledoc """ 3 | Provides struct and type for a ContributorActivityWeeks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | a: integer | nil, 10 | c: integer | nil, 11 | d: integer | nil, 12 | w: integer | nil 13 | } 14 | 15 | defstruct [:__info__, :a, :c, :d, :w] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [a: :integer, c: :integer, d: :integer, w: :integer] 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/schemas/custom_deployment_rule_app.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CustomDeploymentRuleApp do 2 | @moduledoc """ 3 | Provides struct and type for a CustomDeploymentRuleApp 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer, 10 | integration_url: String.t(), 11 | node_id: String.t(), 12 | slug: String.t() 13 | } 14 | 15 | defstruct [:__info__, :id, :integration_url, :node_id, :slug] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | id: :integer, 24 | integration_url: {:string, :generic}, 25 | node_id: {:string, :generic}, 26 | slug: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/custom_property_value.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.CustomPropertyValue do 2 | @moduledoc """ 3 | Provides struct and type for a CustomPropertyValue 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | property_name: String.t(), 10 | value: String.t() | [String.t()] 11 | } 12 | 13 | defstruct [:__info__, :property_name, :value] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | property_name: {:string, :generic}, 22 | value: {:union, [{:string, :generic}, [string: :generic]]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/dependency.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.Dependency do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.Dependency 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | manifest_path: String.t() | nil, 10 | package: GitHub.Dependabot.Alert.Package.t() | nil, 11 | scope: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :manifest_path, :package, :scope] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | manifest_path: {:string, :generic}, 23 | package: {GitHub.Dependabot.Alert.Package, :t}, 24 | scope: {:enum, ["development", "runtime", nil]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/package.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.Package do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.Package 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, ecosystem: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :ecosystem, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [ecosystem: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/security_advisory_cvss.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.SecurityAdvisoryCvss do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.SecurityAdvisoryCvss 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, score: number, vector_string: String.t() | nil} 8 | 9 | defstruct [:__info__, :score, :vector_string] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [score: :number, vector_string: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/security_advisory_cwes.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.SecurityAdvisoryCwes do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.SecurityAdvisoryCwes 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, cwe_id: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :cwe_id, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [cwe_id: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/security_advisory_identifiers.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.SecurityAdvisoryIdentifiers do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.SecurityAdvisoryIdentifiers 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t(), value: String.t()} 8 | 9 | defstruct [:__info__, :type, :value] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:enum, ["CVE", "GHSA"]}, value: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/security_advisory_references.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.SecurityAdvisoryReferences do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.SecurityAdvisoryReferences 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, url: String.t()} 8 | 9 | defstruct [:__info__, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/security_vulnerability_first_patched_version.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.SecurityVulnerabilityFirstPatchedVersion do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.SecurityVulnerabilityFirstPatchedVersion 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, identifier: String.t()} 8 | 9 | defstruct [:__info__, :identifier] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [identifier: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/alert/with_repository_dependency.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Alert.WithRepositoryDependency do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Alert.WithRepositoryDependency 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | manifest_path: String.t() | nil, 10 | package: GitHub.Dependabot.Alert.Package.t() | nil, 11 | scope: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :manifest_path, :package, :scope] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | manifest_path: {:string, :generic}, 23 | package: {GitHub.Dependabot.Alert.Package, :t}, 24 | scope: {:enum, ["development", "runtime", nil]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/public_key.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.PublicKey do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.PublicKey 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, key: String.t(), key_id: String.t()} 8 | 9 | defstruct [:__info__, :key, :key_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [key: {:string, :generic}, key_id: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependabot/secret.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Dependabot.Secret do 2 | @moduledoc """ 3 | Provides struct and type for a Dependabot.Secret 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: DateTime.t(), 10 | name: String.t(), 11 | updated_at: DateTime.t() 12 | } 13 | 14 | defstruct [:__info__, :created_at, :name, :updated_at] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | created_at: {:string, :date_time}, 23 | name: {:string, :generic}, 24 | updated_at: {:string, :date_time} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/dependency_graph/spdx_sbom.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.DependencyGraph.SpdxSbom do 2 | @moduledoc """ 3 | Provides struct and type for a DependencyGraph.SpdxSbom 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sbom: GitHub.DependencyGraph.SpdxSbomSbom.t()} 8 | 9 | defstruct [:__info__, :sbom] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sbom: {GitHub.DependencyGraph.SpdxSbomSbom, :t}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependency_graph/spdx_sbom_sbom_creation_info.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.DependencyGraph.SpdxSbomSbomCreationInfo do 2 | @moduledoc """ 3 | Provides struct and type for a DependencyGraph.SpdxSbomSbomCreationInfo 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, created: String.t(), creators: [String.t()]} 8 | 9 | defstruct [:__info__, :created, :creators] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [created: {:string, :generic}, creators: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/dependency_graph/spdx_sbom_sbom_packages_external_refs.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.DependencyGraph.SpdxSbomSbomPackagesExternalRefs do 2 | @moduledoc """ 3 | Provides struct and type for a DependencyGraph.SpdxSbomSbomPackagesExternalRefs 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | referenceCategory: String.t(), 10 | referenceLocator: String.t(), 11 | referenceType: String.t() 12 | } 13 | 14 | defstruct [:__info__, :referenceCategory, :referenceLocator, :referenceType] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | referenceCategory: {:string, :generic}, 23 | referenceLocator: {:string, :generic}, 24 | referenceType: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/deployment/branch_policy.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Deployment.BranchPolicy do 2 | @moduledoc """ 3 | Provides struct and type for a Deployment.BranchPolicy 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer | nil, 10 | name: String.t() | nil, 11 | node_id: String.t() | nil, 12 | type: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :id, :name, :node_id, :type] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | id: :integer, 24 | name: {:string, :generic}, 25 | node_id: {:string, :generic}, 26 | type: {:enum, ["branch", "tag"]} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/deployment/branch_policy_name_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Deployment.BranchPolicyNamePattern do 2 | @moduledoc """ 3 | Provides struct and type for a Deployment.BranchPolicyNamePattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, name: String.t()} 8 | 9 | defstruct [:__info__, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/deployment/branch_policy_name_pattern_with_type.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Deployment.BranchPolicyNamePatternWithType do 2 | @moduledoc """ 3 | Provides struct and type for a Deployment.BranchPolicyNamePatternWithType 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, name: String.t(), type: String.t() | nil} 8 | 9 | defstruct [:__info__, :name, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [name: {:string, :generic}, type: {:enum, ["branch", "tag"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/deployment/branch_policy_settings.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Deployment.BranchPolicySettings do 2 | @moduledoc """ 3 | Provides struct and type for a Deployment.BranchPolicySettings 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | custom_branch_policies: boolean, 10 | protected_branches: boolean 11 | } 12 | 13 | defstruct [:__info__, :custom_branch_policies, :protected_branches] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [custom_branch_policies: :boolean, protected_branches: :boolean] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/deployment/protection_rule.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Deployment.ProtectionRule do 2 | @moduledoc """ 3 | Provides struct and type for a Deployment.ProtectionRule 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | app: GitHub.CustomDeploymentRuleApp.t(), 10 | enabled: boolean, 11 | id: integer, 12 | node_id: String.t() 13 | } 14 | 15 | defstruct [:__info__, :app, :enabled, :id, :node_id] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | app: {GitHub.CustomDeploymentRuleApp, :t}, 24 | enabled: :boolean, 25 | id: :integer, 26 | node_id: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/docker_metadata.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.DockerMetadata do 2 | @moduledoc """ 3 | Provides struct and type for a DockerMetadata 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, tag: [String.t()] | nil} 8 | 9 | defstruct [:__info__, :tag] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [tag: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/email.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Email do 2 | @moduledoc """ 3 | Provides struct and type for a Email 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | email: String.t(), 10 | primary: boolean, 11 | verified: boolean, 12 | visibility: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :email, :primary, :verified, :visibility] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | email: {:string, :email}, 24 | primary: :boolean, 25 | verified: :boolean, 26 | visibility: {:union, [{:string, :generic}, :null]} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/empty_object.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.EmptyObject do 2 | @moduledoc """ 3 | Provides struct and type for a EmptyObject 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/environment_approvals.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.EnvironmentApprovals do 2 | @moduledoc """ 3 | Provides struct and type for a EnvironmentApprovals 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | comment: String.t(), 10 | environments: [GitHub.EnvironmentApprovalsEnvironments.t()], 11 | state: String.t(), 12 | user: GitHub.User.simple() 13 | } 14 | 15 | defstruct [:__info__, :comment, :environments, :state, :user] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | comment: {:string, :generic}, 24 | environments: [{GitHub.EnvironmentApprovalsEnvironments, :t}], 25 | state: {:enum, ["approved", "rejected", "pending"]}, 26 | user: {GitHub.User, :simple} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/environment_protection_rules_reviewers.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.EnvironmentProtectionRulesReviewers do 2 | @moduledoc """ 3 | Provides struct and type for a EnvironmentProtectionRulesReviewers 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | reviewer: GitHub.Team.t() | GitHub.User.simple() | nil, 10 | type: String.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :reviewer, :type] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | reviewer: {:union, [{GitHub.Team, :t}, {GitHub.User, :simple}]}, 22 | type: {:enum, ["User", "Team"]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/event_payload.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.EventPayload do 2 | @moduledoc """ 3 | Provides struct and type for a EventPayload 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | action: String.t() | nil, 10 | comment: GitHub.Issue.Comment.t() | nil, 11 | issue: GitHub.Issue.t() | nil, 12 | pages: [GitHub.EventPayloadPages.t()] | nil 13 | } 14 | 15 | defstruct [:__info__, :action, :comment, :issue, :pages] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | action: {:string, :generic}, 24 | comment: {GitHub.Issue.Comment, :t}, 25 | issue: {GitHub.Issue, :t}, 26 | pages: [{GitHub.EventPayloadPages, :t}] 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/event_repo.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.EventRepo do 2 | @moduledoc """ 3 | Provides struct and type for a EventRepo 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, id: integer, name: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :id, :name, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [id: :integer, name: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/file_commit.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommit do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommit 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | commit: GitHub.FileCommitCommit.t(), 10 | content: GitHub.FileCommitContent.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :commit, :content] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | commit: {GitHub.FileCommitCommit, :t}, 22 | content: {:union, [{GitHub.FileCommitContent, :t}, :null]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_commit_author.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitCommitAuthor do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitCommitAuthor 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | date: String.t() | nil, 10 | email: String.t() | nil, 11 | name: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :date, :email, :name] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [date: {:string, :generic}, email: {:string, :generic}, name: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_commit_committer.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitCommitCommitter do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitCommitCommitter 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | date: String.t() | nil, 10 | email: String.t() | nil, 11 | name: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :date, :email, :name] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [date: {:string, :generic}, email: {:string, :generic}, name: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_commit_parents.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitCommitParents do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitCommitParents 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html_url: String.t() | nil, 10 | sha: String.t() | nil, 11 | url: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :html_url, :sha, :url] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [html_url: {:string, :generic}, sha: {:string, :generic}, url: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_commit_tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitCommitTree do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitCommitTree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t() | nil, url: String.t() | nil} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_commit_verification.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitCommitVerification do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitCommitVerification 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | payload: String.t() | nil, 10 | reason: String.t() | nil, 11 | signature: String.t() | nil, 12 | verified: boolean | nil 13 | } 14 | 15 | defstruct [:__info__, :payload, :reason, :signature, :verified] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | payload: {:union, [{:string, :generic}, :null]}, 24 | reason: {:string, :generic}, 25 | signature: {:union, [{:string, :generic}, :null]}, 26 | verified: :boolean 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/file_commit_content_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.FileCommitContentLinks do 2 | @moduledoc """ 3 | Provides struct and type for a FileCommitContentLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [git: {:string, :generic}, html: {:string, :generic}, self: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/forbidden_gist.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ForbiddenGist do 2 | @moduledoc """ 3 | Provides struct and type for a ForbiddenGist 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | block: GitHub.ForbiddenGistBlock.json_resp() | nil, 10 | documentation_url: String.t() | nil, 11 | message: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :block, :documentation_url, :message] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(:json_resp) do 19 | [ 20 | block: {GitHub.ForbiddenGistBlock, :json_resp}, 21 | documentation_url: {:string, :generic}, 22 | message: {:string, :generic} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/forbidden_gist_block.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ForbiddenGistBlock do 2 | @moduledoc """ 3 | Provides struct and type for a ForbiddenGistBlock 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | created_at: String.t() | nil, 10 | html_url: String.t() | nil, 11 | reason: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :created_at, :html_url, :reason] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(:json_resp) do 19 | [ 20 | created_at: {:string, :generic}, 21 | html_url: {:union, [{:string, :generic}, :null]}, 22 | reason: {:string, :generic} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/gist/commit_change_status.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Gist.CommitChangeStatus do 2 | @moduledoc """ 3 | Provides struct and type for a Gist.CommitChangeStatus 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | additions: integer | nil, 10 | deletions: integer | nil, 11 | total: integer | nil 12 | } 13 | 14 | defstruct [:__info__, :additions, :deletions, :total] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [additions: :integer, deletions: :integer, total: :integer] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/gist/files.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Gist.Files do 2 | @moduledoc """ 3 | Provides struct and types for a Gist.Files 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type simple :: %__MODULE__{__info__: map} 8 | 9 | @type t :: %__MODULE__{__info__: map} 10 | 11 | defstruct [:__info__] 12 | 13 | @doc false 14 | @spec __fields__(atom) :: keyword 15 | def __fields__(type \\ :t) 16 | 17 | def __fields__(:simple) do 18 | [] 19 | end 20 | 21 | def __fields__(:t) do 22 | [] 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/schemas/git/commit_author.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.CommitAuthor do 2 | @moduledoc """ 3 | Provides struct and type for a Git.CommitAuthor 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: DateTime.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :date_time}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/commit_committer.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.CommitCommitter do 2 | @moduledoc """ 3 | Provides struct and type for a Git.CommitCommitter 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: DateTime.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :date_time}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/commit_parents.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.CommitParents do 2 | @moduledoc """ 3 | Provides struct and type for a Git.CommitParents 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, html_url: String.t(), sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :html_url, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [html_url: {:string, :uri}, sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/commit_tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.CommitTree do 2 | @moduledoc """ 3 | Provides struct and type for a Git.CommitTree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/commit_verification.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.CommitVerification do 2 | @moduledoc """ 3 | Provides struct and type for a Git.CommitVerification 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | payload: String.t() | nil, 10 | reason: String.t(), 11 | signature: String.t() | nil, 12 | verified: boolean 13 | } 14 | 15 | defstruct [:__info__, :payload, :reason, :signature, :verified] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | payload: {:union, [{:string, :generic}, :null]}, 24 | reason: {:string, :generic}, 25 | signature: {:union, [{:string, :generic}, :null]}, 26 | verified: :boolean 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/git/ignore_template.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.IgnoreTemplate do 2 | @moduledoc """ 3 | Provides struct and type for a Git.IgnoreTemplate 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, name: String.t(), source: String.t()} 8 | 9 | defstruct [:__info__, :name, :source] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [name: {:string, :generic}, source: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/ref.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.Ref do 2 | @moduledoc """ 3 | Provides struct and type for a Git.Ref 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | node_id: String.t(), 10 | object: GitHub.Git.RefObject.t(), 11 | ref: String.t(), 12 | url: String.t() 13 | } 14 | 15 | defstruct [:__info__, :node_id, :object, :ref, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | node_id: {:string, :generic}, 24 | object: {GitHub.Git.RefObject, :t}, 25 | ref: {:string, :generic}, 26 | url: {:string, :uri} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/git/ref_object.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.RefObject do 2 | @moduledoc """ 3 | Provides struct and type for a Git.RefObject 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), type: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :type, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, type: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/tag_object.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.TagObject do 2 | @moduledoc """ 3 | Provides struct and type for a Git.TagObject 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), type: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :type, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, type: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/tag_tagger.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.TagTagger do 2 | @moduledoc """ 3 | Provides struct and type for a Git.TagTagger 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: String.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :generic}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/git/tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.Tree do 2 | @moduledoc """ 3 | Provides struct and types for a Git.Tree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | sha: String.t(), 10 | tree: [GitHub.Git.TreeTree.t()], 11 | truncated: boolean, 12 | url: String.t() 13 | } 14 | 15 | defstruct [:__info__, :sha, :tree, :truncated, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | sha: {:string, :generic}, 24 | tree: [{GitHub.Git.TreeTree, :t}], 25 | truncated: :boolean, 26 | url: {:string, :uri} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/git/user.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Git.User do 2 | @moduledoc """ 3 | Provides struct and type for a Git.User 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | date: String.t() | nil, 10 | email: String.t() | nil, 11 | name: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :date, :email, :name] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [date: {:string, :generic}, email: {:string, :generic}, name: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/global_advisory_cvss.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.GlobalAdvisoryCvss do 2 | @moduledoc """ 3 | Provides struct and type for a GlobalAdvisoryCvss 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, score: number | nil, vector_string: String.t() | nil} 8 | 9 | defstruct [:__info__, :score, :vector_string] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [score: {:union, [:number, :null]}, vector_string: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/gpg_key_emails.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.GpgKeyEmails do 2 | @moduledoc """ 3 | Provides struct and type for a GpgKeyEmails 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, email: String.t() | nil, verified: boolean | nil} 8 | 9 | defstruct [:__info__, :email, :verified] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [email: {:string, :generic}, verified: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/gpg_key_subkeys_emails.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.GpgKeySubkeysEmails do 2 | @moduledoc """ 3 | Provides struct and type for a GpgKeySubkeysEmails 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, email: String.t() | nil, verified: boolean | nil} 8 | 9 | defstruct [:__info__, :email, :verified] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [email: {:string, :generic}, verified: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/hook/delivery_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Hook.DeliveryRequest do 2 | @moduledoc """ 3 | Provides struct and type for a Hook.DeliveryRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, headers: map | nil, payload: map | nil} 8 | 9 | defstruct [:__info__, :headers, :payload] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [headers: {:union, [:map, :null]}, payload: {:union, [:map, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/hook/delivery_response.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Hook.DeliveryResponse do 2 | @moduledoc """ 3 | Provides struct and type for a Hook.DeliveryResponse 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, headers: map | nil, payload: String.t() | nil} 8 | 9 | defstruct [:__info__, :headers, :payload] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [headers: {:union, [:map, :null]}, payload: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/hook/response.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Hook.Response do 2 | @moduledoc """ 3 | Provides struct and type for a Hook.Response 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | code: integer | nil, 10 | message: String.t() | nil, 11 | status: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :code, :message, :status] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | code: {:union, [:integer, :null]}, 23 | message: {:union, [{:string, :generic}, :null]}, 24 | status: {:union, [{:string, :generic}, :null]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/hovercard.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Hovercard do 2 | @moduledoc """ 3 | Provides struct and type for a Hovercard 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, contexts: [GitHub.HovercardContexts.t()]} 8 | 9 | defstruct [:__info__, :contexts] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [contexts: [{GitHub.HovercardContexts, :t}]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/hovercard_contexts.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.HovercardContexts do 2 | @moduledoc """ 3 | Provides struct and type for a HovercardContexts 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, message: String.t(), octicon: String.t()} 8 | 9 | defstruct [:__info__, :message, :octicon] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [message: {:string, :generic}, octicon: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/import_project_choices.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ImportProjectChoices do 2 | @moduledoc """ 3 | Provides struct and type for a ImportProjectChoices 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | human_name: String.t() | nil, 10 | tfvc_project: String.t() | nil, 11 | vcs: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :human_name, :tfvc_project, :vcs] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [human_name: {:string, :generic}, tfvc_project: {:string, :generic}, vcs: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/interaction/limit.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Interaction.Limit do 2 | @moduledoc """ 3 | Provides struct and type for a Interaction.Limit 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, expiry: String.t() | nil, limit: String.t()} 8 | 9 | defstruct [:__info__, :expiry, :limit] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [ 17 | expiry: {:enum, ["one_day", "three_days", "one_week", "one_month", "six_months"]}, 18 | limit: {:enum, ["existing_users", "contributors_only", "collaborators_only"]} 19 | ] 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/schemas/interaction/limit/response.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Interaction.Limit.Response do 2 | @moduledoc """ 3 | Provides struct and type for a Interaction.Limit.Response 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | expires_at: DateTime.t(), 10 | limit: String.t(), 11 | origin: String.t() 12 | } 13 | 14 | defstruct [:__info__, :expires_at, :limit, :origin] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | expires_at: {:string, :date_time}, 23 | limit: {:enum, ["existing_users", "contributors_only", "collaborators_only"]}, 24 | origin: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/issue/event/demilestoned_milestone.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.Event.DemilestonedMilestone do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.Event.DemilestonedMilestone 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, title: String.t()} 8 | 9 | defstruct [:__info__, :title] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [title: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event/labeled_label.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.Event.LabeledLabel do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.Event.LabeledLabel 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, color: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :color, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [color: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event/milestoned_milestone.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.Event.MilestonedMilestone do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.Event.MilestonedMilestone 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, title: String.t()} 8 | 9 | defstruct [:__info__, :title] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [title: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event/renamed_rename.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.Event.RenamedRename do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.Event.RenamedRename 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, from: String.t(), to: String.t()} 8 | 9 | defstruct [:__info__, :from, :to] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [from: {:string, :generic}, to: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event/unlabeled_label.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.Event.UnlabeledLabel do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.Event.UnlabeledLabel 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, color: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :color, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [color: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event_label.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.EventLabel do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.EventLabel 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, color: String.t() | nil, name: String.t() | nil} 8 | 9 | defstruct [:__info__, :color, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [color: {:union, [{:string, :generic}, :null]}, name: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event_milestone.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.EventMilestone do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.EventMilestone 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, title: String.t()} 8 | 9 | defstruct [:__info__, :title] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [title: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/issue/event_rename.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Issue.EventRename do 2 | @moduledoc """ 3 | Provides struct and type for a Issue.EventRename 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, from: String.t(), to: String.t()} 8 | 9 | defstruct [:__info__, :from, :to] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [from: {:string, :generic}, to: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/language.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Language do 2 | @moduledoc """ 3 | Provides struct and type for a Language 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/license/content_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.License.ContentLinks do 2 | @moduledoc """ 3 | Provides struct and type for a License.ContentLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | git: String.t() | nil, 10 | html: String.t() | nil, 11 | self: String.t() 12 | } 13 | 14 | defstruct [:__info__, :git, :html, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | git: {:union, [{:string, :uri}, :null]}, 23 | html: {:union, [{:string, :uri}, :null]}, 24 | self: {:string, :uri} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/link.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Link do 2 | @moduledoc """ 3 | Provides struct and type for a Link 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/link_with_type.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.LinkWithType do 2 | @moduledoc """ 3 | Provides struct and type for a LinkWithType 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t(), type: String.t()} 8 | 9 | defstruct [:__info__, :href, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}, type: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/merged_upstream.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.MergedUpstream do 2 | @moduledoc """ 3 | Provides struct and type for a MergedUpstream 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | base_branch: String.t() | nil, 10 | merge_type: String.t() | nil, 11 | message: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :base_branch, :merge_type, :message] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | base_branch: {:string, :generic}, 23 | merge_type: {:enum, ["merge", "fast-forward", "none"]}, 24 | message: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/metadata.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Metadata do 2 | @moduledoc """ 3 | Provides struct and type for a Metadata 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/oidc_custom_sub.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.OIDCCustomSub do 2 | @moduledoc """ 3 | Provides struct and type for a OIDCCustomSub 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, include_claim_keys: [String.t()]} 8 | 9 | defstruct [:__info__, :include_claim_keys] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [include_claim_keys: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/oidc_custom_sub_repo.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.OIDCCustomSubRepo do 2 | @moduledoc """ 3 | Provides struct and type for a OIDCCustomSubRepo 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | include_claim_keys: [String.t()] | nil, 10 | use_default: boolean 11 | } 12 | 13 | defstruct [:__info__, :include_claim_keys, :use_default] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [include_claim_keys: [string: :generic], use_default: :boolean] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/org_hook_config.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.OrgHookConfig do 2 | @moduledoc """ 3 | Provides struct and type for a OrgHookConfig 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | content_type: String.t() | nil, 10 | insecure_ssl: String.t() | nil, 11 | secret: String.t() | nil, 12 | url: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :content_type, :insecure_ssl, :secret, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | content_type: {:string, :generic}, 24 | insecure_ssl: {:string, :generic}, 25 | secret: {:string, :generic}, 26 | url: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/org_membership_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.OrgMembershipPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a OrgMembershipPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, can_create_repository: boolean} 8 | 9 | defstruct [:__info__, :can_create_repository] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [can_create_repository: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/fine_grained_permission.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.FineGrainedPermission do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.FineGrainedPermission 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, description: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :description, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [description: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/permissions_organization.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.PermissionsOrganization do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.PermissionsOrganization 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/permissions_other.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.PermissionsOther do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.PermissionsOther 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/permissions_repository.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.PermissionsRepository do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.PermissionsRepository 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/request_permissions_organization.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.RequestPermissionsOrganization do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.RequestPermissionsOrganization 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/request_permissions_other.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.RequestPermissionsOther do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.RequestPermissionsOther 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/organization/programmatic_access_grant/request_permissions_repository.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Organization.ProgrammaticAccessGrant.RequestPermissionsRepository do 2 | @moduledoc """ 3 | Provides struct and type for a Organization.ProgrammaticAccessGrant.RequestPermissionsRepository 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/package_version_metadata.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PackageVersionMetadata do 2 | @moduledoc """ 3 | Provides struct and type for a PackageVersionMetadata 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | container: GitHub.ContainerMetadata.t() | nil, 10 | docker: GitHub.DockerMetadata.t() | nil, 11 | package_type: String.t() 12 | } 13 | 14 | defstruct [:__info__, :container, :docker, :package_type] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | container: {GitHub.ContainerMetadata, :t}, 23 | docker: {GitHub.DockerMetadata, :t}, 24 | package_type: {:enum, ["npm", "maven", "rubygems", "docker", "nuget", "container"]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/pages/build_error.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Pages.BuildError do 2 | @moduledoc """ 3 | Provides struct and type for a Pages.BuildError 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, message: String.t() | nil} 8 | 9 | defstruct [:__info__, :message] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [message: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pages/build_status.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Pages.BuildStatus do 2 | @moduledoc """ 3 | Provides struct and type for a Pages.BuildStatus 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, status: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :status, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [status: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pages/deployment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Pages.Deployment do 2 | @moduledoc """ 3 | Provides struct and type for a Pages.Deployment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer | String.t(), 10 | page_url: String.t(), 11 | preview_url: String.t() | nil, 12 | status_url: String.t() 13 | } 14 | 15 | defstruct [:__info__, :id, :page_url, :preview_url, :status_url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | id: {:union, [:integer, string: :generic]}, 24 | page_url: {:string, :uri}, 25 | preview_url: {:string, :uri}, 26 | status_url: {:string, :uri} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/pages/health_check.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Pages.HealthCheck do 2 | @moduledoc """ 3 | Provides struct and type for a Pages.HealthCheck 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | alt_domain: GitHub.Pages.HealthCheckAltDomain.t() | nil, 10 | domain: GitHub.Pages.HealthCheckDomain.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :alt_domain, :domain] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | alt_domain: {:union, [{GitHub.Pages.HealthCheckAltDomain, :t}, :null]}, 22 | domain: {GitHub.Pages.HealthCheckDomain, :t} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/pages/source_hash.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Pages.SourceHash do 2 | @moduledoc """ 3 | Provides struct and type for a Pages.SourceHash 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, branch: String.t(), path: String.t()} 8 | 9 | defstruct [:__info__, :branch, :path] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [branch: {:string, :generic}, path: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/participation_stats.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ParticipationStats do 2 | @moduledoc """ 3 | Provides struct and type for a ParticipationStats 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, all: [integer], owner: [integer]} 8 | 9 | defstruct [:__info__, :all, :owner] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [all: [:integer], owner: [:integer]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pending_deployment_environment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PendingDeploymentEnvironment do 2 | @moduledoc """ 3 | Provides struct and type for a PendingDeploymentEnvironment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html_url: String.t() | nil, 10 | id: integer | nil, 11 | name: String.t() | nil, 12 | node_id: String.t() | nil, 13 | url: String.t() | nil 14 | } 15 | 16 | defstruct [:__info__, :html_url, :id, :name, :node_id, :url] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [ 24 | html_url: {:string, :generic}, 25 | id: :integer, 26 | name: {:string, :generic}, 27 | node_id: {:string, :generic}, 28 | url: {:string, :generic} 29 | ] 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/schemas/pending_deployment_reviewers.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PendingDeploymentReviewers do 2 | @moduledoc """ 3 | Provides struct and type for a PendingDeploymentReviewers 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | reviewer: GitHub.Team.t() | GitHub.User.simple() | nil, 10 | type: String.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :reviewer, :type] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | reviewer: {:union, [{GitHub.Team, :t}, {GitHub.User, :simple}]}, 22 | type: {:enum, ["User", "Team"]} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/porter_large_file.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PorterLargeFile do 2 | @moduledoc """ 3 | Provides struct and type for a PorterLargeFile 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | oid: String.t(), 10 | path: String.t(), 11 | ref_name: String.t(), 12 | size: integer 13 | } 14 | 15 | defstruct [:__info__, :oid, :path, :ref_name, :size] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | oid: {:string, :generic}, 24 | path: {:string, :generic}, 25 | ref_name: {:string, :generic}, 26 | size: :integer 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/project/collaborator_permission.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Project.CollaboratorPermission do 2 | @moduledoc """ 3 | Provides struct and type for a Project.CollaboratorPermission 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, permission: String.t(), user: GitHub.User.simple() | nil} 8 | 9 | defstruct [:__info__, :permission, :user] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [permission: {:string, :generic}, user: {:union, [{GitHub.User, :simple}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/admin_enforced.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.AdminEnforced do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.AdminEnforced 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean, url: String.t()} 8 | 9 | defstruct [:__info__, :enabled, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/allow_deletions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.AllowDeletions do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.AllowDeletions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/allow_force_pushes.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.AllowForcePushes do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.AllowForcePushes 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/allow_fork_syncing.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.AllowForkSyncing do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.AllowForkSyncing 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/block_creations.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.BlockCreations do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.BlockCreations 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/enforce_admins.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.EnforceAdmins do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.EnforceAdmins 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean, url: String.t()} 8 | 9 | defstruct [:__info__, :enabled, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/lock_branch.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.LockBranch do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.LockBranch 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/pull_request_review_bypass_pull_request_allowances.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.PullRequestReviewBypassPullRequestAllowances do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.PullRequestReviewBypassPullRequestAllowances 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | apps: [GitHub.App.t()] | nil, 10 | teams: [GitHub.Team.t()] | nil, 11 | users: [GitHub.User.simple()] | nil 12 | } 13 | 14 | defstruct [:__info__, :apps, :teams, :users] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [apps: [{GitHub.App, :t}], teams: [{GitHub.Team, :t}], users: [{GitHub.User, :simple}]] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/required_conversation_resolution.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.RequiredConversationResolution do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.RequiredConversationResolution 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean | nil} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/required_linear_history.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.RequiredLinearHistory do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.RequiredLinearHistory 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean} 8 | 9 | defstruct [:__info__, :enabled] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/required_pull_request_reviews_bypass_pull_request_allowances.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.RequiredPullRequestReviewsBypassPullRequestAllowances do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.RequiredPullRequestReviewsBypassPullRequestAllowances 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | apps: [GitHub.App.t()] | nil, 10 | teams: [GitHub.Team.t()], 11 | users: [GitHub.User.simple()] 12 | } 13 | 14 | defstruct [:__info__, :apps, :teams, :users] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [apps: [{GitHub.App, :t}], teams: [{GitHub.Team, :t}], users: [{GitHub.User, :simple}]] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/required_signatures.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.RequiredSignatures do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.RequiredSignatures 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, enabled: boolean, url: String.t()} 8 | 9 | defstruct [:__info__, :enabled, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [enabled: :boolean, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/protected_branch/required_status_check_checks.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ProtectedBranch.RequiredStatusCheckChecks do 2 | @moduledoc """ 3 | Provides struct and type for a ProtectedBranch.RequiredStatusCheckChecks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, app_id: integer | nil, context: String.t()} 8 | 9 | defstruct [:__info__, :app_id, :context] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [app_id: {:union, [:integer, :null]}, context: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/base_repo_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.BaseRepoPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.BaseRepoPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean | nil, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean | nil 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/head_repo_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.HeadRepoPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.HeadRepoPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean | nil, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean | nil 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/merge_result.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.MergeResult do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.MergeResult 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, merged: boolean, message: String.t(), sha: String.t()} 8 | 9 | defstruct [:__info__, :merged, :message, :sha] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [merged: :boolean, message: {:string, :generic}, sha: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_comment_links_html.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewCommentLinksHtml do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewCommentLinksHtml 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_comment_links_pull_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewCommentLinksPullRequest do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewCommentLinksPullRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_comment_links_self.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewCommentLinksSelf do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewCommentLinksSelf 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewLinks do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html: GitHub.PullRequest.ReviewLinksHtml.t(), 10 | pull_request: GitHub.PullRequest.ReviewLinksPullRequest.t() 11 | } 12 | 13 | defstruct [:__info__, :html, :pull_request] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | html: {GitHub.PullRequest.ReviewLinksHtml, :t}, 22 | pull_request: {GitHub.PullRequest.ReviewLinksPullRequest, :t} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_links_html.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewLinksHtml do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewLinksHtml 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_links_pull_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewLinksPullRequest do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewLinksPullRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/pull_request/review_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.PullRequest.ReviewRequest do 2 | @moduledoc """ 3 | Provides struct and type for a PullRequest.ReviewRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, teams: [GitHub.Team.t()], users: [GitHub.User.simple()]} 8 | 9 | defstruct [:__info__, :teams, :users] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [teams: [{GitHub.Team, :t}], users: [{GitHub.User, :simple}]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/rate_limit/overview.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.RateLimit.Overview do 2 | @moduledoc """ 3 | Provides struct and type for a RateLimit.Overview 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | rate: GitHub.RateLimit.t(), 10 | resources: GitHub.RateLimit.OverviewResources.t() 11 | } 12 | 13 | defstruct [:__info__, :rate, :resources] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [rate: {GitHub.RateLimit, :t}, resources: {GitHub.RateLimit.OverviewResources, :t}] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/referrer_traffic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ReferrerTraffic do 2 | @moduledoc """ 3 | Provides struct and type for a ReferrerTraffic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, count: integer, referrer: String.t(), uniques: integer} 8 | 9 | defstruct [:__info__, :count, :referrer, :uniques] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [count: :integer, referrer: {:string, :generic}, uniques: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/release/notes_content.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Release.NotesContent do 2 | @moduledoc """ 3 | Provides struct and type for a Release.NotesContent 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, body: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :body, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [body: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repo_codespaces_secret.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.RepoCodespacesSecret do 2 | @moduledoc """ 3 | Provides struct and type for a RepoCodespacesSecret 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: DateTime.t(), 10 | name: String.t(), 11 | updated_at: DateTime.t() 12 | } 13 | 14 | defstruct [:__info__, :created_at, :name, :updated_at] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | created_at: {:string, :date_time}, 23 | name: {:string, :generic}, 24 | updated_at: {:string, :date_time} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/repo_search_result_item_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.RepoSearchResultItemPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a RepoSearchResultItemPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean | nil, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean | nil 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/repository/advisory/cvss.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Advisory.Cvss do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Advisory.Cvss 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, score: number | nil, vector_string: String.t() | nil} 8 | 9 | defstruct [:__info__, :score, :vector_string] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [score: {:union, [:number, :null]}, vector_string: {:union, [{:string, :generic}, :null]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/advisory/identifiers.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Advisory.Identifiers do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Advisory.Identifiers 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t(), value: String.t()} 8 | 9 | defstruct [:__info__, :type, :value] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:enum, ["CVE", "GHSA"]}, value: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/advisory/submission.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Advisory.Submission do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Advisory.Submission 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, accepted: boolean} 8 | 9 | defstruct [:__info__, :accepted] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [accepted: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/collaborator_permission.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.CollaboratorPermission do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.CollaboratorPermission 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | permission: String.t(), 10 | role_name: String.t(), 11 | user: GitHub.Collaborator.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :permission, :role_name, :user] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | permission: {:string, :generic}, 23 | role_name: {:string, :generic}, 24 | user: {:union, [{GitHub.Collaborator, :t}, :null]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/repository/id_and_ref_name.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.IdAndRefName do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.IdAndRefName 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | ref_name: map | nil, 10 | repository_id: GitHub.Repository.IdAndRefNameRepositoryId.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :ref_name, :repository_id] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ref_name: :map, repository_id: {GitHub.Repository.IdAndRefNameRepositoryId, :t}] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/repository/id_and_ref_name_repository_id.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.IdAndRefNameRepositoryId do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.IdAndRefNameRepositoryId 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, repository_ids: [integer] | nil} 8 | 9 | defstruct [:__info__, :repository_ids] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [repository_ids: [:integer]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/license.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.License do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.License 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type minimal :: %__MODULE__{ 8 | __info__: map, 9 | key: String.t() | nil, 10 | name: String.t() | nil, 11 | node_id: String.t() | nil, 12 | spdx_id: String.t() | nil, 13 | url: String.t() | nil 14 | } 15 | 16 | defstruct [:__info__, :key, :name, :node_id, :spdx_id, :url] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(:minimal) do 21 | [ 22 | key: {:string, :generic}, 23 | name: {:string, :generic}, 24 | node_id: {:string, :generic}, 25 | spdx_id: {:string, :generic}, 26 | url: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/repository/name_and_ref_name.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.NameAndRefName do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.NameAndRefName 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | ref_name: map | nil, 10 | repository_name: GitHub.Repository.NameAndRefNameRepositoryName.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :ref_name, :repository_name] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ref_name: :map, repository_name: {GitHub.Repository.NameAndRefNameRepositoryName, :t}] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/repository/name_and_ref_name_repository_name.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.NameAndRefNameRepositoryName do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.NameAndRefNameRepositoryName 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | exclude: [String.t()] | nil, 10 | include: [String.t()] | nil, 11 | protected: boolean | nil 12 | } 13 | 14 | defstruct [:__info__, :exclude, :include, :protected] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [exclude: [string: :generic], include: [string: :generic], protected: :boolean] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/repository/property_and_ref_name.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.PropertyAndRefName do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.PropertyAndRefName 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | ref_name: map | nil, 10 | repository_property: GitHub.Repository.PropertyAndRefNameRepositoryProperty.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :ref_name, :repository_property] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | ref_name: :map, 22 | repository_property: {GitHub.Repository.PropertyAndRefNameRepositoryProperty, :t} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/branch_name_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.BranchNamePattern do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.BranchNamePattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "branch_name_pattern"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/commit_author_email_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.CommitAuthorEmailPattern do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.CommitAuthorEmailPattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "commit_author_email_pattern"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/commit_message_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.CommitMessagePattern do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.CommitMessagePattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "commit_message_pattern"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/committer_email_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.CommitterEmailPattern do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.CommitterEmailPattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "committer_email_pattern"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/creation.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.Creation do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.Creation 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t()} 8 | 9 | defstruct [:__info__, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:const, "creation"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/deletion.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.Deletion do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.Deletion 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t()} 8 | 9 | defstruct [:__info__, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:const, "deletion"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/non_fast_forward.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.NonFastForward do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.NonFastForward 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t()} 8 | 9 | defstruct [:__info__, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:const, "non_fast_forward"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/params_status_check_configuration.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.ParamsStatusCheckConfiguration do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.ParamsStatusCheckConfiguration 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, context: String.t(), integration_id: integer | nil} 8 | 9 | defstruct [:__info__, :context, :integration_id] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [context: {:string, :generic}, integration_id: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/params_workflow_file_reference.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.ParamsWorkflowFileReference do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.ParamsWorkflowFileReference 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | path: String.t(), 10 | ref: String.t() | nil, 11 | repository_id: integer, 12 | sha: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :path, :ref, :repository_id, :sha] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | path: {:string, :generic}, 24 | ref: {:string, :generic}, 25 | repository_id: :integer, 26 | sha: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/pull_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.PullRequest do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.PullRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "pull_request"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/required_deployments.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.RequiredDeployments do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.RequiredDeployments 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "required_deployments"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/required_linear_history.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.RequiredLinearHistory do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.RequiredLinearHistory 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t()} 8 | 9 | defstruct [:__info__, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:const, "required_linear_history"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/required_signatures.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.RequiredSignatures do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.RequiredSignatures 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, type: String.t()} 8 | 9 | defstruct [:__info__, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [type: {:const, "required_signatures"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/required_status_checks.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.RequiredStatusChecks do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.RequiredStatusChecks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "required_status_checks"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/tag_name_pattern.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.TagNamePattern do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.TagNamePattern 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "tag_name_pattern"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/update.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.Update do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.Update 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "update"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/rule/workflows.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Rule.Workflows do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Rule.Workflows 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, parameters: map | nil, type: String.t()} 8 | 9 | defstruct [:__info__, :parameters, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [parameters: :map, type: {:const, "workflows"}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset/bypass_actor.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Ruleset.BypassActor do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Ruleset.BypassActor 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | actor_id: integer, 10 | actor_type: String.t(), 11 | bypass_mode: String.t() 12 | } 13 | 14 | defstruct [:__info__, :actor_id, :actor_type, :bypass_mode] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | actor_id: :integer, 23 | actor_type: {:enum, ["Integration", "OrganizationAdmin", "RepositoryRole", "Team"]}, 24 | bypass_mode: {:enum, ["always", "pull_request"]} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset/conditions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Ruleset.Conditions do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Ruleset.Conditions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, ref_name: map | nil} 8 | 9 | defstruct [:__info__, :ref_name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [ref_name: :map] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset/conditions_repository_property_spec.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.Ruleset.ConditionsRepositoryPropertySpec do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.Ruleset.ConditionsRepositoryPropertySpec 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, name: String.t(), property_values: [String.t()]} 8 | 9 | defstruct [:__info__, :name, :property_values] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [name: {:string, :generic}, property_values: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.RulesetLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.RulesetLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html: GitHub.Repository.RulesetLinksHtml.t() | nil, 10 | self: GitHub.Repository.RulesetLinksSelf.t() | nil 11 | } 12 | 13 | defstruct [:__info__, :html, :self] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | html: {GitHub.Repository.RulesetLinksHtml, :t}, 22 | self: {GitHub.Repository.RulesetLinksSelf, :t} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset_links_html.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.RulesetLinksHtml do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.RulesetLinksHtml 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t() | nil} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/repository/ruleset_links_self.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Repository.RulesetLinksSelf do 2 | @moduledoc """ 3 | Provides struct and type for a Repository.RulesetLinksSelf 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t() | nil} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/review_comment_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ReviewCommentLinks do 2 | @moduledoc """ 3 | Provides struct and type for a ReviewCommentLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html: GitHub.Link.t(), 10 | pull_request: GitHub.Link.t(), 11 | self: GitHub.Link.t() 12 | } 13 | 14 | defstruct [:__info__, :html, :pull_request, :self] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [html: {GitHub.Link, :t}, pull_request: {GitHub.Link, :t}, self: {GitHub.Link, :t}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/rule_suite_rule_evaluations_rule_source.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.RuleSuiteRuleEvaluationsRuleSource do 2 | @moduledoc """ 3 | Provides struct and type for a RuleSuiteRuleEvaluationsRuleSource 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | id: integer | nil, 10 | name: String.t() | nil, 11 | type: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :id, :name, :type] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | id: {:union, [:integer, :null]}, 23 | name: {:union, [{:string, :generic}, :null]}, 24 | type: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/search_result_text_matches_matches.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SearchResultTextMatchesMatches do 2 | @moduledoc """ 3 | Provides struct and type for a SearchResultTextMatchesMatches 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, indices: [integer] | nil, text: String.t() | nil} 8 | 9 | defstruct [:__info__, :indices, :text] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [indices: [:integer], text: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_discussion_body.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationDiscussionBody do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationDiscussionBody 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, discussion_body_url: String.t()} 8 | 9 | defstruct [:__info__, :discussion_body_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [discussion_body_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_discussion_comment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationDiscussionComment do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationDiscussionComment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, discussion_comment_url: String.t()} 8 | 9 | defstruct [:__info__, :discussion_comment_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [discussion_comment_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_discussion_title.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationDiscussionTitle do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationDiscussionTitle 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, discussion_title_url: String.t()} 8 | 9 | defstruct [:__info__, :discussion_title_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [discussion_title_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_issue_body.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationIssueBody do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationIssueBody 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, issue_body_url: String.t()} 8 | 9 | defstruct [:__info__, :issue_body_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [issue_body_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_issue_comment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationIssueComment do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationIssueComment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, issue_comment_url: String.t()} 8 | 9 | defstruct [:__info__, :issue_comment_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [issue_comment_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_issue_title.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationIssueTitle do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationIssueTitle 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, issue_title_url: String.t()} 8 | 9 | defstruct [:__info__, :issue_title_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [issue_title_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_pull_request_body.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationPullRequestBody do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationPullRequestBody 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, pull_request_body_url: String.t()} 8 | 9 | defstruct [:__info__, :pull_request_body_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [pull_request_body_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_pull_request_comment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationPullRequestComment do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationPullRequestComment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, pull_request_comment_url: String.t()} 8 | 9 | defstruct [:__info__, :pull_request_comment_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [pull_request_comment_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_pull_request_review.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationPullRequestReview do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationPullRequestReview 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, pull_request_review_url: String.t()} 8 | 9 | defstruct [:__info__, :pull_request_review_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [pull_request_review_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_pull_request_review_comment.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationPullRequestReviewComment do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationPullRequestReviewComment 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, pull_request_review_comment_url: String.t()} 8 | 9 | defstruct [:__info__, :pull_request_review_comment_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [pull_request_review_comment_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/secret_scanning/location_pull_request_title.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecretScanning.LocationPullRequestTitle do 2 | @moduledoc """ 3 | Provides struct and type for a SecretScanning.LocationPullRequestTitle 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, pull_request_title_url: String.t()} 8 | 9 | defstruct [:__info__, :pull_request_title_url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [pull_request_title_url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/security_and_analysis_advanced_security.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecurityAndAnalysisAdvancedSecurity do 2 | @moduledoc """ 3 | Provides struct and type for a SecurityAndAnalysisAdvancedSecurity 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, status: String.t() | nil} 8 | 9 | defstruct [:__info__, :status] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [status: {:enum, ["enabled", "disabled"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/security_and_analysis_dependabot_security_updates.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecurityAndAnalysisDependabotSecurityUpdates do 2 | @moduledoc """ 3 | Provides struct and type for a SecurityAndAnalysisDependabotSecurityUpdates 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, status: String.t() | nil} 8 | 9 | defstruct [:__info__, :status] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [status: {:enum, ["enabled", "disabled"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/security_and_analysis_secret_scanning.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecurityAndAnalysisSecretScanning do 2 | @moduledoc """ 3 | Provides struct and type for a SecurityAndAnalysisSecretScanning 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, status: String.t() | nil} 8 | 9 | defstruct [:__info__, :status] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [status: {:enum, ["enabled", "disabled"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/security_and_analysis_secret_scanning_push_protection.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SecurityAndAnalysisSecretScanningPushProtection do 2 | @moduledoc """ 3 | Provides struct and type for a SecurityAndAnalysisSecretScanningPushProtection 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, status: String.t() | nil} 8 | 9 | defstruct [:__info__, :status] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [status: {:enum, ["enabled", "disabled"]}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/selected_actions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SelectedActions do 2 | @moduledoc """ 3 | Provides struct and type for a SelectedActions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | github_owned_allowed: boolean | nil, 10 | patterns_allowed: [String.t()] | nil, 11 | verified_allowed: boolean | nil 12 | } 13 | 14 | defstruct [:__info__, :github_owned_allowed, :patterns_allowed, :verified_allowed] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | github_owned_allowed: :boolean, 23 | patterns_allowed: [string: :generic], 24 | verified_allowed: :boolean 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/service_unavailable.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ServiceUnavailable do 2 | @moduledoc """ 3 | Provides struct and type for a ServiceUnavailable 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type json_resp :: %__MODULE__{ 8 | __info__: map, 9 | code: String.t() | nil, 10 | documentation_url: String.t() | nil, 11 | message: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :code, :documentation_url, :message] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(:json_resp) do 19 | [ 20 | code: {:string, :generic}, 21 | documentation_url: {:string, :generic}, 22 | message: {:string, :generic} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/short_blob.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ShortBlob do 2 | @moduledoc """ 3 | Provides struct and type for a ShortBlob 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/short_branch_commit.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ShortBranchCommit do 2 | @moduledoc """ 3 | Provides struct and type for a ShortBranchCommit 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/snapshot_actions/job.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SnapshotActions.Job do 2 | @moduledoc """ 3 | Provides struct and type for a SnapshotActions.Job 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | correlator: String.t(), 10 | html_url: String.t() | nil, 11 | id: String.t() 12 | } 13 | 14 | defstruct [:__info__, :correlator, :html_url, :id] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [correlator: {:string, :generic}, html_url: {:string, :generic}, id: {:string, :generic}] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/snapshot_detector.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SnapshotDetector do 2 | @moduledoc """ 3 | Provides struct and type for a SnapshotDetector 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, name: String.t(), url: String.t(), version: String.t()} 8 | 9 | defstruct [:__info__, :name, :url, :version] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [name: {:string, :generic}, url: {:string, :generic}, version: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/snapshot_manifests.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SnapshotManifests do 2 | @moduledoc """ 3 | Provides struct and type for a SnapshotManifests 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map} 8 | 9 | defstruct [:__info__] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/social_account.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SocialAccount do 2 | @moduledoc """ 3 | Provides struct and type for a SocialAccount 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, provider: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :provider, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [provider: {:string, :generic}, url: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/ssh_signing_key.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.SSHSigningKey do 2 | @moduledoc """ 3 | Provides struct and type for a SSHSigningKey 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: DateTime.t(), 10 | id: integer, 11 | key: String.t(), 12 | title: String.t() 13 | } 14 | 15 | defstruct [:__info__, :created_at, :id, :key, :title] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | created_at: {:string, :date_time}, 24 | id: :integer, 25 | key: {:string, :generic}, 26 | title: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/starred_repository.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.StarredRepository do 2 | @moduledoc """ 3 | Provides struct and type for a StarredRepository 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, repo: GitHub.Repository.t(), starred_at: DateTime.t()} 8 | 9 | defstruct [:__info__, :repo, :starred_at] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [repo: {GitHub.Repository, :t}, starred_at: {:string, :date_time}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/status_check_policy_checks.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.StatusCheckPolicyChecks do 2 | @moduledoc """ 3 | Provides struct and type for a StatusCheckPolicyChecks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, app_id: integer | nil, context: String.t()} 8 | 9 | defstruct [:__info__, :app_id, :context] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [app_id: {:union, [:integer, :null]}, context: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/tag.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Tag do 2 | @moduledoc """ 3 | Provides struct and type for a Tag 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | commit: GitHub.TagCommit.t(), 10 | name: String.t(), 11 | node_id: String.t(), 12 | tarball_url: String.t(), 13 | zipball_url: String.t() 14 | } 15 | 16 | defstruct [:__info__, :commit, :name, :node_id, :tarball_url, :zipball_url] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [ 24 | commit: {GitHub.TagCommit, :t}, 25 | name: {:string, :generic}, 26 | node_id: {:string, :generic}, 27 | tarball_url: {:string, :uri}, 28 | zipball_url: {:string, :uri} 29 | ] 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/schemas/tag_commit.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.TagCommit do 2 | @moduledoc """ 3 | Provides struct and type for a TagCommit 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/tag_protection.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.TagProtection do 2 | @moduledoc """ 3 | Provides struct and type for a TagProtection 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | created_at: String.t() | nil, 10 | enabled: boolean | nil, 11 | id: integer | nil, 12 | pattern: String.t(), 13 | updated_at: String.t() | nil 14 | } 15 | 16 | defstruct [:__info__, :created_at, :enabled, :id, :pattern, :updated_at] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [ 24 | created_at: {:string, :generic}, 25 | enabled: :boolean, 26 | id: :integer, 27 | pattern: {:string, :generic}, 28 | updated_at: {:string, :generic} 29 | ] 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/schemas/team/membership.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Team.Membership do 2 | @moduledoc """ 3 | Provides struct and type for a Team.Membership 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, role: String.t(), state: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :role, :state, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [ 17 | role: {:enum, ["member", "maintainer"]}, 18 | state: {:enum, ["active", "pending"]}, 19 | url: {:string, :uri} 20 | ] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/schemas/team/organization_plan.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Team.OrganizationPlan do 2 | @moduledoc """ 3 | Provides struct and type for a Team.OrganizationPlan 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | filled_seats: integer | nil, 10 | name: String.t(), 11 | private_repos: integer, 12 | seats: integer | nil, 13 | space: integer 14 | } 15 | 16 | defstruct [:__info__, :filled_seats, :name, :private_repos, :seats, :space] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [ 24 | filled_seats: :integer, 25 | name: {:string, :generic}, 26 | private_repos: :integer, 27 | seats: :integer, 28 | space: :integer 29 | ] 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/schemas/team/permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Team.Permissions do 2 | @moduledoc """ 3 | Provides struct and type for a Team.Permissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/team/project_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Team.ProjectPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Team.ProjectPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, admin: boolean, read: boolean, write: boolean} 8 | 9 | defstruct [:__info__, :admin, :read, :write] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [admin: :boolean, read: :boolean, write: :boolean] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/team/repository_permissions.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Team.RepositoryPermissions do 2 | @moduledoc """ 3 | Provides struct and type for a Team.RepositoryPermissions 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | admin: boolean, 10 | maintain: boolean | nil, 11 | pull: boolean, 12 | push: boolean, 13 | triage: boolean | nil 14 | } 15 | 16 | defstruct [:__info__, :admin, :maintain, :pull, :push, :triage] 17 | 18 | @doc false 19 | @spec __fields__(atom) :: keyword 20 | def __fields__(type \\ :t) 21 | 22 | def __fields__(:t) do 23 | [admin: :boolean, maintain: :boolean, pull: :boolean, push: :boolean, triage: :boolean] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/thread_subject.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ThreadSubject do 2 | @moduledoc """ 3 | Provides struct and type for a ThreadSubject 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | latest_comment_url: String.t(), 10 | title: String.t(), 11 | type: String.t(), 12 | url: String.t() 13 | } 14 | 15 | defstruct [:__info__, :latest_comment_url, :title, :type, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | latest_comment_url: {:string, :generic}, 24 | title: {:string, :generic}, 25 | type: {:string, :generic}, 26 | url: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/timeline/commit_commented_event.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommitCommentedEvent do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommitCommentedEvent 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | comments: [GitHub.Commit.Comment.t()] | nil, 10 | commit_id: String.t() | nil, 11 | event: String.t() | nil, 12 | node_id: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :comments, :commit_id, :event, :node_id] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | comments: [{GitHub.Commit.Comment, :t}], 24 | commit_id: {:string, :generic}, 25 | event: {:string, :generic}, 26 | node_id: {:string, :generic} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/timeline/committed_event_author.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommittedEventAuthor do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommittedEventAuthor 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: DateTime.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :date_time}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/committed_event_committer.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommittedEventCommitter do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommittedEventCommitter 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, date: DateTime.t(), email: String.t(), name: String.t()} 8 | 9 | defstruct [:__info__, :date, :email, :name] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [date: {:string, :date_time}, email: {:string, :generic}, name: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/committed_event_parents.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommittedEventParents do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommittedEventParents 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, html_url: String.t(), sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :html_url, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [html_url: {:string, :uri}, sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/committed_event_tree.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommittedEventTree do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommittedEventTree 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, sha: String.t(), url: String.t()} 8 | 9 | defstruct [:__info__, :sha, :url] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [sha: {:string, :generic}, url: {:string, :uri}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/committed_event_verification.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CommittedEventVerification do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CommittedEventVerification 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | payload: String.t() | nil, 10 | reason: String.t(), 11 | signature: String.t() | nil, 12 | verified: boolean 13 | } 14 | 15 | defstruct [:__info__, :payload, :reason, :signature, :verified] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | payload: {:union, [{:string, :generic}, :null]}, 24 | reason: {:string, :generic}, 25 | signature: {:union, [{:string, :generic}, :null]}, 26 | verified: :boolean 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/timeline/cross_referenced_event_source.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.CrossReferencedEventSource do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.CrossReferencedEventSource 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, issue: GitHub.Issue.t() | nil, type: String.t() | nil} 8 | 9 | defstruct [:__info__, :issue, :type] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [issue: {GitHub.Issue, :t}, type: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/line_commented_event.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.LineCommentedEvent do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.LineCommentedEvent 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | comments: [GitHub.PullRequest.ReviewComment.t()] | nil, 10 | event: String.t() | nil, 11 | node_id: String.t() | nil 12 | } 13 | 14 | defstruct [:__info__, :comments, :event, :node_id] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [ 22 | comments: [{GitHub.PullRequest.ReviewComment, :t}], 23 | event: {:string, :generic}, 24 | node_id: {:string, :generic} 25 | ] 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/schemas/timeline/reviewed_event_links.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.ReviewedEventLinks do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.ReviewedEventLinks 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | html: GitHub.Timeline.ReviewedEventLinksHtml.t(), 10 | pull_request: GitHub.Timeline.ReviewedEventLinksPullRequest.t() 11 | } 12 | 13 | defstruct [:__info__, :html, :pull_request] 14 | 15 | @doc false 16 | @spec __fields__(atom) :: keyword 17 | def __fields__(type \\ :t) 18 | 19 | def __fields__(:t) do 20 | [ 21 | html: {GitHub.Timeline.ReviewedEventLinksHtml, :t}, 22 | pull_request: {GitHub.Timeline.ReviewedEventLinksPullRequest, :t} 23 | ] 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/schemas/timeline/reviewed_event_links_html.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.ReviewedEventLinksHtml do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.ReviewedEventLinksHtml 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/timeline/reviewed_event_links_pull_request.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Timeline.ReviewedEventLinksPullRequest do 2 | @moduledoc """ 3 | Provides struct and type for a Timeline.ReviewedEventLinksPullRequest 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, href: String.t()} 8 | 9 | defstruct [:__info__, :href] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [href: {:string, :generic}] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/topic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Topic do 2 | @moduledoc """ 3 | Provides struct and type for a Topic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, names: [String.t()]} 8 | 9 | defstruct [:__info__, :names] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [names: [string: :generic]] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/traffic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Traffic do 2 | @moduledoc """ 3 | Provides struct and type for a Traffic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{__info__: map, count: integer, timestamp: DateTime.t(), uniques: integer} 8 | 9 | defstruct [:__info__, :count, :timestamp, :uniques] 10 | 11 | @doc false 12 | @spec __fields__(atom) :: keyword 13 | def __fields__(type \\ :t) 14 | 15 | def __fields__(:t) do 16 | [count: :integer, timestamp: {:string, :date_time}, uniques: :integer] 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/schemas/verification.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Verification do 2 | @moduledoc """ 3 | Provides struct and type for a Verification 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | payload: String.t() | nil, 10 | reason: String.t(), 11 | signature: String.t() | nil, 12 | verified: boolean 13 | } 14 | 15 | defstruct [:__info__, :payload, :reason, :signature, :verified] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | payload: {:union, [{:string, :generic}, :null]}, 24 | reason: {:string, :generic}, 25 | signature: {:union, [{:string, :generic}, :null]}, 26 | verified: :boolean 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/schemas/view_traffic.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.ViewTraffic do 2 | @moduledoc """ 3 | Provides struct and type for a ViewTraffic 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | count: integer, 10 | uniques: integer, 11 | views: [GitHub.Traffic.t()] 12 | } 13 | 14 | defstruct [:__info__, :count, :uniques, :views] 15 | 16 | @doc false 17 | @spec __fields__(atom) :: keyword 18 | def __fields__(type \\ :t) 19 | 20 | def __fields__(:t) do 21 | [count: :integer, uniques: :integer, views: [{GitHub.Traffic, :t}]] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/schemas/webhook/config.ex: -------------------------------------------------------------------------------- 1 | defmodule GitHub.Webhook.Config do 2 | @moduledoc """ 3 | Provides struct and type for a Webhook.Config 4 | """ 5 | use GitHub.Encoder 6 | 7 | @type t :: %__MODULE__{ 8 | __info__: map, 9 | content_type: String.t() | nil, 10 | insecure_ssl: number | String.t() | nil, 11 | secret: String.t() | nil, 12 | url: String.t() | nil 13 | } 14 | 15 | defstruct [:__info__, :content_type, :insecure_ssl, :secret, :url] 16 | 17 | @doc false 18 | @spec __fields__(atom) :: keyword 19 | def __fields__(type \\ :t) 20 | 21 | def __fields__(:t) do 22 | [ 23 | content_type: {:string, :generic}, 24 | insecure_ssl: {:union, [:number, string: :generic]}, 25 | secret: {:string, :generic}, 26 | url: {:string, :uri} 27 | ] 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/github_test.exs: -------------------------------------------------------------------------------- 1 | defmodule GitHubTest do 2 | use ExUnit.Case 3 | 4 | alias GitHub.Config 5 | alias GitHub.Operation 6 | 7 | doctest GitHub.Config, except: [stack: 1] 8 | doctest GitHub.Operation 9 | end 10 | -------------------------------------------------------------------------------- /test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | --------------------------------------------------------------------------------