From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/admin/actions.tmpl | 10 + templates/admin/applications/list.tmpl | 8 + templates/admin/applications/oauth2_edit.tmpl | 6 + templates/admin/auth/edit.tmpl | 464 + templates/admin/auth/list.tmpl | 38 + templates/admin/auth/new.tmpl | 122 + templates/admin/auth/source/ldap.tmpl | 145 + templates/admin/auth/source/oauth.tmpl | 109 + templates/admin/auth/source/smtp.tmpl | 59 + templates/admin/auth/source/sspi.tmpl | 43 + templates/admin/config.tmpl | 355 + templates/admin/config_settings.tmpl | 42 + templates/admin/cron.tmpl | 39 + templates/admin/dashboard.tmpl | 84 + templates/admin/emails/list.tmpl | 116 + templates/admin/hook_new.tmpl | 13 + templates/admin/hooks.tmpl | 9 + templates/admin/layout_footer.tmpl | 11 + templates/admin/layout_head.tmpl | 13 + templates/admin/navbar.tmpl | 112 + templates/admin/notice.tmpl | 68 + templates/admin/org/list.tmpl | 76 + templates/admin/packages/list.tmpl | 96 + templates/admin/queue.tmpl | 36 + templates/admin/queue_manage.tmpl | 61 + templates/admin/repo/list.tmpl | 110 + templates/admin/repo/unadopted.tmpl | 75 + templates/admin/runners/edit.tmpl | 5 + templates/admin/self_check.tmpl | 41 + templates/admin/stacktrace-row.tmpl | 66 + templates/admin/stacktrace.tmpl | 48 + templates/admin/stats.tmpl | 17 + templates/admin/system_status.tmpl | 62 + templates/admin/user/edit.tmpl | 242 + templates/admin/user/list.tmpl | 119 + templates/admin/user/new.tmpl | 90 + templates/admin/user/view.tmpl | 48 + templates/admin/user/view_details.tmpl | 74 + templates/admin/user/view_emails.tmpl | 19 + templates/api/packages/pypi/simple.tmpl | 15 + templates/base/alert.tmpl | 23 + templates/base/alert_details.tmpl | 7 + templates/base/disable_form_autofill.tmpl | 31 + templates/base/footer.tmpl | 20 + templates/base/footer_content.tmpl | 32 + templates/base/head.tmpl | 50 + templates/base/head_navbar.tmpl | 205 + templates/base/head_opengraph.tmpl | 53 + templates/base/head_script.tmpl | 50 + templates/base/head_style.tmpl | 2 + templates/base/modal_actions_confirm.tmpl | 35 + templates/base/paginate.tmpl | 34 + templates/custom/body_inner_post.tmpl | 0 templates/custom/body_inner_pre.tmpl | 0 templates/custom/body_outer_post.tmpl | 0 templates/custom/body_outer_pre.tmpl | 0 templates/custom/extra_links.tmpl | 0 templates/custom/extra_links_footer.tmpl | 0 templates/custom/extra_tabs.tmpl | 0 templates/custom/footer.tmpl | 0 templates/custom/header.tmpl | 0 templates/custom/repo_flag_banners.tmpl | 0 templates/devtest/fetch-action.tmpl | 44 + templates/devtest/flex-list.tmpl | 115 + templates/devtest/fomantic-modal.tmpl | 86 + templates/devtest/gitea-ui.tmpl | 330 + templates/devtest/label.tmpl | 27 + templates/devtest/list.tmpl | 15 + templates/devtest/tmplerr-sub.tmpl | 3 + templates/devtest/tmplerr.tmpl | 12 + templates/explore/code.tmpl | 8 + templates/explore/navbar.tmpl | 20 + templates/explore/repo_list.tmpl | 73 + templates/explore/repos.tmpl | 10 + templates/explore/search.tmpl | 23 + templates/explore/user_list.tmpl | 33 + templates/explore/users.tmpl | 10 + templates/home.tmpl | 51 + templates/htmx/milestone_sidebar.tmpl | 4 + templates/install.tmpl | 367 + templates/mail/auth/2fa_disabled.tmpl | 15 + templates/mail/auth/activate.tmpl | 16 + templates/mail/auth/activate_email.tmpl | 16 + templates/mail/auth/password_change.tmpl | 16 + templates/mail/auth/primary_mail_change.tmpl | 14 + templates/mail/auth/register_notify.tmpl | 17 + templates/mail/auth/removed_security_key.tmpl | 15 + templates/mail/auth/reset_passwd.tmpl | 16 + templates/mail/auth/totp_enrolled.tmpl | 15 + templates/mail/common/footer_simple.tmpl | 1 + templates/mail/issue/assigned.tmpl | 28 + templates/mail/issue/default.tmpl | 90 + templates/mail/notify/admin_new_user.tmpl | 20 + templates/mail/notify/collaborator.tmpl | 20 + templates/mail/notify/repo_transfer.tmpl | 18 + templates/mail/release.tmpl | 60 + templates/mail/team_invite.tmpl | 15 + templates/org/create.tmpl | 57 + templates/org/follow_unfollow.tmpl | 7 + templates/org/header.tmpl | 37 + templates/org/home.tmpl | 73 + templates/org/member/members.tmpl | 90 + templates/org/menu.tmpl | 57 + templates/org/projects/list.tmpl | 24 + templates/org/projects/new.tmpl | 9 + templates/org/projects/view.tmpl | 11 + templates/org/settings/actions.tmpl | 11 + templates/org/settings/applications.tmpl | 9 + .../org/settings/applications_oauth2_edit.tmpl | 5 + templates/org/settings/blocked_users.tmpl | 21 + templates/org/settings/delete.tmpl | 35 + templates/org/settings/hook_new.tmpl | 7 + templates/org/settings/hooks.tmpl | 5 + templates/org/settings/labels.tmpl | 15 + templates/org/settings/layout_footer.tmpl | 11 + templates/org/settings/layout_head.tmpl | 14 + templates/org/settings/navbar.tmpl | 48 + templates/org/settings/options.tmpl | 102 + templates/org/settings/packages.tmpl | 6 + .../org/settings/packages_cleanup_rules_edit.tmpl | 5 + .../settings/packages_cleanup_rules_preview.tmpl | 5 + templates/org/settings/runners_edit.tmpl | 5 + templates/org/team/invite.tmpl | 23 + templates/org/team/members.tmpl | 88 + templates/org/team/navbar.tmpl | 4 + templates/org/team/new.tmpl | 148 + templates/org/team/repositories.tmpl | 61 + templates/org/team/sidebar.tmpl | 94 + templates/org/team/teams.tmpl | 56 + templates/package/content/alpine.tmpl | 52 + templates/package/content/arch.tmpl | 143 + templates/package/content/cargo.tmpl | 63 + templates/package/content/chef.tmpl | 48 + templates/package/content/composer.tmpl | 50 + .../package/content/composer_dependencies.tmpl | 19 + templates/package/content/conan.tmpl | 34 + templates/package/content/conda.tmpl | 30 + templates/package/content/container.tmpl | 90 + templates/package/content/cran.tmpl | 59 + templates/package/content/debian.tmpl | 65 + templates/package/content/generic.tmpl | 18 + templates/package/content/go.tmpl | 14 + templates/package/content/helm.tmpl | 57 + templates/package/content/maven.tmpl | 75 + templates/package/content/npm.tmpl | 65 + templates/package/content/npm_dependencies.tmpl | 19 + templates/package/content/nuget.tmpl | 51 + templates/package/content/pub.tmpl | 19 + templates/package/content/pypi.tmpl | 31 + templates/package/content/rpm.tmpl | 56 + templates/package/content/rubygems.tmpl | 40 + .../package/content/rubygems_dependencies.tmpl | 19 + templates/package/content/swift.tmpl | 40 + templates/package/content/vagrant.tmpl | 18 + templates/package/metadata/alpine.tmpl | 5 + templates/package/metadata/arch.tmpl | 4 + templates/package/metadata/cargo.tmpl | 7 + templates/package/metadata/chef.tmpl | 5 + templates/package/metadata/composer.tmpl | 5 + templates/package/metadata/conan.tmpl | 6 + templates/package/metadata/conda.tmpl | 6 + templates/package/metadata/container.tmpl | 9 + templates/package/metadata/cran.tmpl | 5 + templates/package/metadata/debian.tmpl | 4 + templates/package/metadata/generic.tmpl | 0 templates/package/metadata/helm.tmpl | 4 + templates/package/metadata/maven.tmpl | 5 + templates/package/metadata/npm.tmpl | 8 + templates/package/metadata/nuget.tmpl | 5 + templates/package/metadata/pub.tmpl | 5 + templates/package/metadata/pypi.tmpl | 5 + templates/package/metadata/rpm.tmpl | 4 + templates/package/metadata/rubygems.tmpl | 5 + templates/package/metadata/swift.tmpl | 4 + templates/package/metadata/vagrant.tmpl | 5 + templates/package/settings.tmpl | 77 + templates/package/shared/cargo.tmpl | 27 + templates/package/shared/cleanup_rules/edit.tmpl | 73 + templates/package/shared/cleanup_rules/list.tmpl | 56 + .../package/shared/cleanup_rules/preview.tmpl | 34 + templates/package/shared/list.tmpl | 57 + templates/package/shared/versionlist.tmpl | 37 + templates/package/view.tmpl | 116 + templates/post-install.tmpl | 24 + templates/projects/list.tmpl | 93 + templates/projects/new.tmpl | 66 + templates/projects/view.tmpl | 180 + templates/repo/actions/dispatch.tmpl | 101 + templates/repo/actions/list.tmpl | 92 + templates/repo/actions/no_workflows.tmpl | 8 + templates/repo/actions/runs_list.tmpl | 43 + templates/repo/actions/status.tmpl | 29 + templates/repo/actions/view.tmpl | 33 + templates/repo/activity.tmpl | 19 + templates/repo/admin_flags.tmpl | 8 + templates/repo/blame.tmpl | 96 + templates/repo/branch/list.tmpl | 262 + templates/repo/branch_dropdown.tmpl | 89 + templates/repo/cite/cite_buttons.tmpl | 8 + templates/repo/cite/cite_modal.tmpl | 20 + templates/repo/clone_buttons.tmpl | 15 + templates/repo/clone_script.tmpl | 50 + .../repo/code/recently_pushed_new_branches.tmpl | 17 + templates/repo/code_frequency.tmpl | 9 + templates/repo/commit_load_branches_and_tags.tmpl | 20 + templates/repo/commit_page.tmpl | 285 + templates/repo/commit_status.tmpl | 16 + templates/repo/commit_statuses.tmpl | 14 + templates/repo/commits.tmpl | 23 + templates/repo/commits_list.tmpl | 96 + templates/repo/commits_list_small.tmpl | 55 + templates/repo/commits_search_dropdown.tmpl | 8 + templates/repo/commits_table.tmpl | 36 + templates/repo/contributors.tmpl | 14 + templates/repo/create.tmpl | 224 + templates/repo/create_helper.tmpl | 3 + templates/repo/diff/blob_excerpt.tmpl | 80 + templates/repo/diff/box.tmpl | 260 + templates/repo/diff/comment_form.tmpl | 49 + templates/repo/diff/comment_form_datahandler.tmpl | 7 + templates/repo/diff/comments.tmpl | 75 + templates/repo/diff/compare.tmpl | 238 + templates/repo/diff/conversation.tmpl | 66 + templates/repo/diff/conversations.tmpl | 3 + templates/repo/diff/csv_diff.tmpl | 58 + templates/repo/diff/escape_title.tmpl | 2 + templates/repo/diff/image_diff.tmpl | 83 + templates/repo/diff/new_comment.tmpl | 5 + templates/repo/diff/new_review.tmpl | 52 + templates/repo/diff/options_dropdown.tmpl | 33 + templates/repo/diff/section_code.tmpl | 1 + templates/repo/diff/section_split.tmpl | 156 + templates/repo/diff/section_unified.tmpl | 72 + templates/repo/diff/stats.tmpl | 5 + templates/repo/diff/whitespace_dropdown.tmpl | 30 + templates/repo/editor/cherry_pick.tmpl | 30 + templates/repo/editor/commit_form.tmpl | 82 + templates/repo/editor/delete.tmpl | 13 + templates/repo/editor/diff_preview.tmpl | 11 + templates/repo/editor/edit.tmpl | 74 + templates/repo/editor/patch.tmpl | 57 + templates/repo/editor/upload.tmpl | 33 + templates/repo/empty.tmpl | 82 + templates/repo/file_info.tmpl | 53 + templates/repo/find/files.tmpl | 21 + templates/repo/flags.tmpl | 33 + templates/repo/forks.tmpl | 18 + templates/repo/graph.tmpl | 65 + templates/repo/graph/commits.tmpl | 79 + templates/repo/graph/div.tmpl | 7 + templates/repo/graph/svgcontainer.tmpl | 24 + templates/repo/header.tmpl | 201 + templates/repo/header_fork.tmpl | 52 + templates/repo/home.tmpl | 164 + templates/repo/icon.tmpl | 10 + templates/repo/issue/card.tmpl | 78 + templates/repo/issue/choose.tmpl | 59 + templates/repo/issue/comment_tab.tmpl | 21 + templates/repo/issue/fields/checkboxes.tmpl | 14 + templates/repo/issue/fields/dropdown.tmpl | 17 + templates/repo/issue/fields/header.tmpl | 6 + templates/repo/issue/fields/input.tmpl | 4 + templates/repo/issue/fields/markdown.tmpl | 3 + templates/repo/issue/fields/textarea.tmpl | 24 + templates/repo/issue/filter_actions.tmpl | 128 + templates/repo/issue/filter_list.tmpl | 158 + templates/repo/issue/filters.tmpl | 26 + templates/repo/issue/label_precolors.tmpl | 22 + templates/repo/issue/labels.tmpl | 22 + templates/repo/issue/labels/edit_delete_label.tmpl | 72 + templates/repo/issue/labels/label.tmpl | 8 + templates/repo/issue/labels/label_archived.tmpl | 5 + templates/repo/issue/labels/label_list.tmpl | 88 + .../repo/issue/labels/label_load_template.tmpl | 24 + templates/repo/issue/labels/label_new.tmpl | 48 + .../repo/issue/labels/labels_selector_field.tmpl | 46 + templates/repo/issue/labels/labels_sidebar.tmpl | 11 + templates/repo/issue/list.tmpl | 55 + templates/repo/issue/milestone/filter_list.tmpl | 16 + templates/repo/issue/milestone/select_menu.tmpl | 39 + templates/repo/issue/milestone_issues.tmpl | 65 + templates/repo/issue/milestone_new.tmpl | 59 + templates/repo/issue/milestones.tmpl | 110 + templates/repo/issue/navbar.tmpl | 4 + templates/repo/issue/new.tmpl | 8 + templates/repo/issue/new_form.tmpl | 155 + templates/repo/issue/openclose.tmpl | 16 + templates/repo/issue/search.tmpl | 20 + templates/repo/issue/view.tmpl | 12 + templates/repo/issue/view_content.tmpl | 188 + .../repo/issue/view_content/add_reaction.tmpl | 12 + templates/repo/issue/view_content/attachments.tmpl | 42 + templates/repo/issue/view_content/comments.tmpl | 691 + .../issue/view_content/comments_authorlink.tmpl | 11 + .../issue/view_content/comments_delete_time.tmpl | 18 + .../repo/issue/view_content/context_menu.tmpl | 27 + .../repo/issue/view_content/conversation.tmpl | 137 + templates/repo/issue/view_content/pull.tmpl | 396 + .../issue/view_content/pull_merge_instruction.tmpl | 57 + templates/repo/issue/view_content/reactions.tmpl | 17 + .../issue/view_content/reference_issue_dialog.tmpl | 28 + templates/repo/issue/view_content/show_role.tmpl | 15 + templates/repo/issue/view_content/sidebar.tmpl | 66 + .../repo/issue/view_content/sidebar/actions.tmpl | 114 + .../repo/issue/view_content/sidebar/assignees.tmpl | 62 + .../sidebar/branch_selector_field.tmpl | 59 + .../issue/view_content/sidebar/dependencies.tmpl | 146 + .../issue/view_content/sidebar/due_deadline.tmpl | 41 + .../issue/view_content/sidebar/milestones.tmpl | 24 + .../issue/view_content/sidebar/participants.tmpl | 8 + .../repo/issue/view_content/sidebar/projects.tmpl | 54 + .../sidebar/pull_maintainer_edits.tmpl | 10 + .../issue/view_content/sidebar/pull_review.tmpl | 45 + .../issue/view_content/sidebar/pull_reviewers.tmpl | 67 + .../repo/issue/view_content/sidebar/pull_wip.tmpl | 11 + .../repo/issue/view_content/sidebar/reference.tmpl | 7 + .../issue/view_content/sidebar/timetracking.tmpl | 73 + .../repo/issue/view_content/sidebar/watch.tmpl | 6 + .../repo/issue/view_content/sidebar/watching.tmpl | 19 + .../issue/view_content/update_branch_by_merge.tmpl | 37 + templates/repo/issue/view_title.tmpl | 144 + templates/repo/latest_commit.tmpl | 31 + templates/repo/migrate/codebase.tmpl | 126 + templates/repo/migrate/forgejo.tmpl | 1 + templates/repo/migrate/git.tmpl | 94 + templates/repo/migrate/gitbucket.tmpl | 142 + templates/repo/migrate/gitea.tmpl | 138 + templates/repo/migrate/github.tmpl | 140 + templates/repo/migrate/gitlab.tmpl | 137 + templates/repo/migrate/gogs.tmpl | 137 + templates/repo/migrate/helper.tmpl | 0 templates/repo/migrate/migrate.tmpl | 32 + templates/repo/migrate/migrating.tmpl | 101 + templates/repo/migrate/onedev.tmpl | 126 + templates/repo/migrate/options.tmpl | 26 + templates/repo/navbar.tmpl | 14 + templates/repo/packages.tmpl | 8 + templates/repo/projects/list.tmpl | 8 + templates/repo/projects/new.tmpl | 8 + templates/repo/projects/view.tmpl | 15 + templates/repo/pulls/commits.tmpl | 10 + templates/repo/pulls/files.tmpl | 14 + templates/repo/pulls/fork.tmpl | 90 + templates/repo/pulls/status.tmpl | 59 + templates/repo/pulls/tab_menu.tmpl | 28 + templates/repo/pulse.tmpl | 239 + templates/repo/recent_commits.tmpl | 9 + templates/repo/release/list.tmpl | 142 + templates/repo/release/new.tmpl | 183 + templates/repo/release_tag_header.tmpl | 31 + templates/repo/search.tmpl | 14 + templates/repo/search_name.tmpl | 1 + templates/repo/settings/actions.tmpl | 11 + templates/repo/settings/branches.tmpl | 78 + templates/repo/settings/collaboration.tmpl | 117 + templates/repo/settings/deploy_keys.tmpl | 86 + templates/repo/settings/githook_edit.tmpl | 27 + templates/repo/settings/githooks.tmpl | 23 + templates/repo/settings/layout_footer.tmpl | 11 + templates/repo/settings/layout_head.tmpl | 14 + templates/repo/settings/lfs.tmpl | 53 + templates/repo/settings/lfs_file.tmpl | 57 + templates/repo/settings/lfs_file_find.tmpl | 46 + templates/repo/settings/lfs_locks.tmpl | 56 + templates/repo/settings/lfs_pointers.tmpl | 56 + templates/repo/settings/navbar.tmpl | 72 + templates/repo/settings/options.tmpl | 794 + templates/repo/settings/protected_branch.tmpl | 262 + .../repo/settings/push_mirror_sync_modal.tmpl | 32 + templates/repo/settings/runner_edit.tmpl | 5 + templates/repo/settings/secrets.tmpl | 5 + templates/repo/settings/tags.tmpl | 126 + templates/repo/settings/units.tmpl | 13 + templates/repo/settings/units/issues.tmpl | 102 + templates/repo/settings/units/overview.tmpl | 62 + templates/repo/settings/units/pulls.tmpl | 132 + templates/repo/settings/units/wiki.tmpl | 51 + templates/repo/settings/webhook/base.tmpl | 5 + templates/repo/settings/webhook/base_list.tmpl | 26 + templates/repo/settings/webhook/delete_modal.tmpl | 10 + templates/repo/settings/webhook/history.tmpl | 90 + templates/repo/settings/webhook/link_menu.tmpl | 12 + templates/repo/settings/webhook/list.tmpl | 4 + templates/repo/settings/webhook/new.tmpl | 7 + templates/repo/shabox_badge.tmpl | 15 + templates/repo/star_unstar.tmpl | 14 + templates/repo/sub_menu.tmpl | 45 + templates/repo/tag/list.tmpl | 79 + templates/repo/tag/verification_box.tmpl | 27 + templates/repo/tag/verification_line.tmpl | 80 + templates/repo/unicode_escape_prompt.tmpl | 22 + templates/repo/upload.tmpl | 15 + templates/repo/user_cards.tmpl | 32 + templates/repo/view_file.tmpl | 158 + templates/repo/view_list.tmpl | 72 + templates/repo/watch_unwatch.tmpl | 14 + templates/repo/watchers.tmpl | 8 + templates/repo/wiki/new.tmpl | 48 + templates/repo/wiki/pages.tmpl | 30 + templates/repo/wiki/revision.tmpl | 40 + templates/repo/wiki/search.tmpl | 12 + templates/repo/wiki/start.tmpl | 15 + templates/repo/wiki/view.tmpl | 124 + templates/shared/actions/runner_edit.tmpl | 96 + templates/shared/actions/runner_list.tmpl | 95 + templates/shared/blocked_users_list.tmpl | 28 + templates/shared/combomarkdowneditor.tmpl | 64 + templates/shared/issueicon.tmpl | 25 + templates/shared/issuelist.tmpl | 163 + templates/shared/label_filter.tmpl | 50 + templates/shared/repo_search.tmpl | 69 + templates/shared/search/button.tmpl | 3 + templates/shared/search/code/results.tmpl | 44 + templates/shared/search/code/search.tmpl | 28 + templates/shared/search/combo.tmpl | 8 + templates/shared/search/combo_fuzzy.tmpl | 15 + templates/shared/search/fuzzy.tmpl | 21 + templates/shared/search/input.tmpl | 4 + templates/shared/searchbottom.tmpl | 14 + templates/shared/searchfile.tmpl | 25 + templates/shared/secrets/add_list.tmpl | 81 + templates/shared/user/authorlink.tmpl | 1 + templates/shared/user/avatarlink.tmpl | 1 + templates/shared/user/blocked_users.tmpl | 83 + templates/shared/user/name.tmpl | 1 + templates/shared/user/namelink.tmpl | 1 + templates/shared/user/org_profile_avatar.tmpl | 16 + templates/shared/user/profile_big_avatar.tmpl | 129 + templates/shared/variables/variable_list.tmpl | 92 + templates/shared/webhook/icon.tmpl | 29 + templates/status/404.tmpl | 14 + templates/status/413.tmpl | 11 + templates/status/500.tmpl | 71 + templates/swagger/forgejo-ui.tmpl | 13 + templates/swagger/ui.tmpl | 12 + templates/swagger/v1_json.tmpl | 28776 +++++++++++++++++++ templates/user/auth/activate.tmpl | 61 + templates/user/auth/captcha.tmpl | 30 + templates/user/auth/change_passwd.tmpl | 7 + templates/user/auth/change_passwd_inner.tmpl | 22 + templates/user/auth/finalize_openid.tmpl | 47 + templates/user/auth/forgot_passwd.tmpl | 39 + templates/user/auth/grant.tmpl | 34 + templates/user/auth/grant_error.tmpl | 16 + templates/user/auth/link_account.tmpl | 34 + templates/user/auth/oauth_container.tmpl | 29 + templates/user/auth/oidc_wellknown.tmpl | 49 + templates/user/auth/prohibit_login.tmpl | 16 + templates/user/auth/reset_passwd.tmpl | 65 + templates/user/auth/signin.tmpl | 9 + templates/user/auth/signin_inner.tmpl | 65 + templates/user/auth/signin_openid.tmpl | 51 + templates/user/auth/signup.tmpl | 9 + templates/user/auth/signup_inner.tmpl | 64 + templates/user/auth/signup_openid_connect.tmpl | 36 + templates/user/auth/signup_openid_navbar.tmpl | 12 + templates/user/auth/signup_openid_register.tmpl | 37 + templates/user/auth/twofa.tmpl | 26 + templates/user/auth/twofa_scratch.tmpl | 25 + templates/user/auth/webauthn.tmpl | 25 + templates/user/auth/webauthn_error.tmpl | 13 + templates/user/code.tmpl | 24 + templates/user/dashboard/dashboard.tmpl | 13 + templates/user/dashboard/feeds.tmpl | 127 + templates/user/dashboard/issues.tmpl | 91 + templates/user/dashboard/milestones.tmpl | 155 + templates/user/dashboard/navbar.tmpl | 102 + templates/user/dashboard/repolist.tmpl | 55 + templates/user/heatmap.tmpl | 13 + templates/user/notification/notification.tmpl | 3 + templates/user/notification/notification_div.tmpl | 130 + .../notification/notification_subscriptions.tmpl | 84 + templates/user/overview/header.tmpl | 58 + templates/user/overview/package_versions.tmpl | 24 + templates/user/overview/packages.tmpl | 24 + templates/user/profile.tmpl | 76 + templates/user/settings/account.tmpl | 180 + templates/user/settings/actions.tmpl | 12 + templates/user/settings/appearance.tmpl | 195 + templates/user/settings/applications.tmpl | 113 + templates/user/settings/applications_oauth2.tmpl | 6 + .../user/settings/applications_oauth2_edit.tmpl | 6 + .../settings/applications_oauth2_edit_form.tmpl | 54 + .../user/settings/applications_oauth2_list.tmpl | 74 + templates/user/settings/blocked_users.tmpl | 10 + templates/user/settings/grants_oauth2.tmpl | 40 + templates/user/settings/hook_new.tmpl | 7 + templates/user/settings/hooks.tmpl | 5 + templates/user/settings/keys.tmpl | 11 + templates/user/settings/keys_gpg.tmpl | 129 + templates/user/settings/keys_principal.tmpl | 69 + templates/user/settings/keys_ssh.tmpl | 111 + templates/user/settings/layout_footer.tmpl | 11 + templates/user/settings/layout_head.tmpl | 13 + templates/user/settings/navbar.tmpl | 58 + templates/user/settings/organization.tmpl | 55 + templates/user/settings/packages.tmpl | 24 + .../user/settings/packages_cleanup_rules_edit.tmpl | 5 + .../settings/packages_cleanup_rules_preview.tmpl | 5 + templates/user/settings/profile.tmpl | 166 + templates/user/settings/repos.tmpl | 130 + templates/user/settings/runner_edit.tmpl | 5 + templates/user/settings/security/accountlinks.tmpl | 62 + templates/user/settings/security/openid.tmpl | 63 + templates/user/settings/security/security.tmpl | 11 + templates/user/settings/security/twofa.tmpl | 37 + templates/user/settings/security/twofa_enroll.tmpl | 25 + templates/user/settings/security/webauthn.tmpl | 43 + templates/webhook/new.tmpl | 44 + templates/webhook/new/dingtalk.tmpl | 9 + templates/webhook/new/discord.tmpl | 17 + templates/webhook/new/feishu.tmpl | 10 + templates/webhook/new/forgejo.tmpl | 38 + templates/webhook/new/gitea.tmpl | 38 + templates/webhook/new/gogs.tmpl | 26 + templates/webhook/new/matrix.tmpl | 32 + templates/webhook/new/msteams.tmpl | 9 + templates/webhook/new/packagist.tmpl | 17 + templates/webhook/new/slack.tmpl | 26 + templates/webhook/new/sourcehut_builds.tmpl | 39 + templates/webhook/new/telegram.tmpl | 17 + templates/webhook/new/wechatwork.tmpl | 9 + templates/webhook/shared-settings.tmpl | 193 + 523 files changed, 56288 insertions(+) create mode 100644 templates/admin/actions.tmpl create mode 100644 templates/admin/applications/list.tmpl create mode 100644 templates/admin/applications/oauth2_edit.tmpl create mode 100644 templates/admin/auth/edit.tmpl create mode 100644 templates/admin/auth/list.tmpl create mode 100644 templates/admin/auth/new.tmpl create mode 100644 templates/admin/auth/source/ldap.tmpl create mode 100644 templates/admin/auth/source/oauth.tmpl create mode 100644 templates/admin/auth/source/smtp.tmpl create mode 100644 templates/admin/auth/source/sspi.tmpl create mode 100644 templates/admin/config.tmpl create mode 100644 templates/admin/config_settings.tmpl create mode 100644 templates/admin/cron.tmpl create mode 100644 templates/admin/dashboard.tmpl create mode 100644 templates/admin/emails/list.tmpl create mode 100644 templates/admin/hook_new.tmpl create mode 100644 templates/admin/hooks.tmpl create mode 100644 templates/admin/layout_footer.tmpl create mode 100644 templates/admin/layout_head.tmpl create mode 100644 templates/admin/navbar.tmpl create mode 100644 templates/admin/notice.tmpl create mode 100644 templates/admin/org/list.tmpl create mode 100644 templates/admin/packages/list.tmpl create mode 100644 templates/admin/queue.tmpl create mode 100644 templates/admin/queue_manage.tmpl create mode 100644 templates/admin/repo/list.tmpl create mode 100644 templates/admin/repo/unadopted.tmpl create mode 100644 templates/admin/runners/edit.tmpl create mode 100644 templates/admin/self_check.tmpl create mode 100644 templates/admin/stacktrace-row.tmpl create mode 100644 templates/admin/stacktrace.tmpl create mode 100644 templates/admin/stats.tmpl create mode 100644 templates/admin/system_status.tmpl create mode 100644 templates/admin/user/edit.tmpl create mode 100644 templates/admin/user/list.tmpl create mode 100644 templates/admin/user/new.tmpl create mode 100644 templates/admin/user/view.tmpl create mode 100644 templates/admin/user/view_details.tmpl create mode 100644 templates/admin/user/view_emails.tmpl create mode 100644 templates/api/packages/pypi/simple.tmpl create mode 100644 templates/base/alert.tmpl create mode 100644 templates/base/alert_details.tmpl create mode 100644 templates/base/disable_form_autofill.tmpl create mode 100644 templates/base/footer.tmpl create mode 100644 templates/base/footer_content.tmpl create mode 100644 templates/base/head.tmpl create mode 100644 templates/base/head_navbar.tmpl create mode 100644 templates/base/head_opengraph.tmpl create mode 100644 templates/base/head_script.tmpl create mode 100644 templates/base/head_style.tmpl create mode 100644 templates/base/modal_actions_confirm.tmpl create mode 100644 templates/base/paginate.tmpl create mode 100644 templates/custom/body_inner_post.tmpl create mode 100644 templates/custom/body_inner_pre.tmpl create mode 100644 templates/custom/body_outer_post.tmpl create mode 100644 templates/custom/body_outer_pre.tmpl create mode 100644 templates/custom/extra_links.tmpl create mode 100644 templates/custom/extra_links_footer.tmpl create mode 100644 templates/custom/extra_tabs.tmpl create mode 100644 templates/custom/footer.tmpl create mode 100644 templates/custom/header.tmpl create mode 100644 templates/custom/repo_flag_banners.tmpl create mode 100644 templates/devtest/fetch-action.tmpl create mode 100644 templates/devtest/flex-list.tmpl create mode 100644 templates/devtest/fomantic-modal.tmpl create mode 100644 templates/devtest/gitea-ui.tmpl create mode 100644 templates/devtest/label.tmpl create mode 100644 templates/devtest/list.tmpl create mode 100644 templates/devtest/tmplerr-sub.tmpl create mode 100644 templates/devtest/tmplerr.tmpl create mode 100644 templates/explore/code.tmpl create mode 100644 templates/explore/navbar.tmpl create mode 100644 templates/explore/repo_list.tmpl create mode 100644 templates/explore/repos.tmpl create mode 100644 templates/explore/search.tmpl create mode 100644 templates/explore/user_list.tmpl create mode 100644 templates/explore/users.tmpl create mode 100644 templates/home.tmpl create mode 100644 templates/htmx/milestone_sidebar.tmpl create mode 100644 templates/install.tmpl create mode 100644 templates/mail/auth/2fa_disabled.tmpl create mode 100644 templates/mail/auth/activate.tmpl create mode 100644 templates/mail/auth/activate_email.tmpl create mode 100644 templates/mail/auth/password_change.tmpl create mode 100644 templates/mail/auth/primary_mail_change.tmpl create mode 100644 templates/mail/auth/register_notify.tmpl create mode 100644 templates/mail/auth/removed_security_key.tmpl create mode 100644 templates/mail/auth/reset_passwd.tmpl create mode 100644 templates/mail/auth/totp_enrolled.tmpl create mode 100644 templates/mail/common/footer_simple.tmpl create mode 100644 templates/mail/issue/assigned.tmpl create mode 100644 templates/mail/issue/default.tmpl create mode 100644 templates/mail/notify/admin_new_user.tmpl create mode 100644 templates/mail/notify/collaborator.tmpl create mode 100644 templates/mail/notify/repo_transfer.tmpl create mode 100644 templates/mail/release.tmpl create mode 100644 templates/mail/team_invite.tmpl create mode 100644 templates/org/create.tmpl create mode 100644 templates/org/follow_unfollow.tmpl create mode 100644 templates/org/header.tmpl create mode 100644 templates/org/home.tmpl create mode 100644 templates/org/member/members.tmpl create mode 100644 templates/org/menu.tmpl create mode 100644 templates/org/projects/list.tmpl create mode 100644 templates/org/projects/new.tmpl create mode 100644 templates/org/projects/view.tmpl create mode 100644 templates/org/settings/actions.tmpl create mode 100644 templates/org/settings/applications.tmpl create mode 100644 templates/org/settings/applications_oauth2_edit.tmpl create mode 100644 templates/org/settings/blocked_users.tmpl create mode 100644 templates/org/settings/delete.tmpl create mode 100644 templates/org/settings/hook_new.tmpl create mode 100644 templates/org/settings/hooks.tmpl create mode 100644 templates/org/settings/labels.tmpl create mode 100644 templates/org/settings/layout_footer.tmpl create mode 100644 templates/org/settings/layout_head.tmpl create mode 100644 templates/org/settings/navbar.tmpl create mode 100644 templates/org/settings/options.tmpl create mode 100644 templates/org/settings/packages.tmpl create mode 100644 templates/org/settings/packages_cleanup_rules_edit.tmpl create mode 100644 templates/org/settings/packages_cleanup_rules_preview.tmpl create mode 100644 templates/org/settings/runners_edit.tmpl create mode 100644 templates/org/team/invite.tmpl create mode 100644 templates/org/team/members.tmpl create mode 100644 templates/org/team/navbar.tmpl create mode 100644 templates/org/team/new.tmpl create mode 100644 templates/org/team/repositories.tmpl create mode 100644 templates/org/team/sidebar.tmpl create mode 100644 templates/org/team/teams.tmpl create mode 100644 templates/package/content/alpine.tmpl create mode 100644 templates/package/content/arch.tmpl create mode 100644 templates/package/content/cargo.tmpl create mode 100644 templates/package/content/chef.tmpl create mode 100644 templates/package/content/composer.tmpl create mode 100644 templates/package/content/composer_dependencies.tmpl create mode 100644 templates/package/content/conan.tmpl create mode 100644 templates/package/content/conda.tmpl create mode 100644 templates/package/content/container.tmpl create mode 100644 templates/package/content/cran.tmpl create mode 100644 templates/package/content/debian.tmpl create mode 100644 templates/package/content/generic.tmpl create mode 100644 templates/package/content/go.tmpl create mode 100644 templates/package/content/helm.tmpl create mode 100644 templates/package/content/maven.tmpl create mode 100644 templates/package/content/npm.tmpl create mode 100644 templates/package/content/npm_dependencies.tmpl create mode 100644 templates/package/content/nuget.tmpl create mode 100644 templates/package/content/pub.tmpl create mode 100644 templates/package/content/pypi.tmpl create mode 100644 templates/package/content/rpm.tmpl create mode 100644 templates/package/content/rubygems.tmpl create mode 100644 templates/package/content/rubygems_dependencies.tmpl create mode 100644 templates/package/content/swift.tmpl create mode 100644 templates/package/content/vagrant.tmpl create mode 100644 templates/package/metadata/alpine.tmpl create mode 100644 templates/package/metadata/arch.tmpl create mode 100644 templates/package/metadata/cargo.tmpl create mode 100644 templates/package/metadata/chef.tmpl create mode 100644 templates/package/metadata/composer.tmpl create mode 100644 templates/package/metadata/conan.tmpl create mode 100644 templates/package/metadata/conda.tmpl create mode 100644 templates/package/metadata/container.tmpl create mode 100644 templates/package/metadata/cran.tmpl create mode 100644 templates/package/metadata/debian.tmpl create mode 100644 templates/package/metadata/generic.tmpl create mode 100644 templates/package/metadata/helm.tmpl create mode 100644 templates/package/metadata/maven.tmpl create mode 100644 templates/package/metadata/npm.tmpl create mode 100644 templates/package/metadata/nuget.tmpl create mode 100644 templates/package/metadata/pub.tmpl create mode 100644 templates/package/metadata/pypi.tmpl create mode 100644 templates/package/metadata/rpm.tmpl create mode 100644 templates/package/metadata/rubygems.tmpl create mode 100644 templates/package/metadata/swift.tmpl create mode 100644 templates/package/metadata/vagrant.tmpl create mode 100644 templates/package/settings.tmpl create mode 100644 templates/package/shared/cargo.tmpl create mode 100644 templates/package/shared/cleanup_rules/edit.tmpl create mode 100644 templates/package/shared/cleanup_rules/list.tmpl create mode 100644 templates/package/shared/cleanup_rules/preview.tmpl create mode 100644 templates/package/shared/list.tmpl create mode 100644 templates/package/shared/versionlist.tmpl create mode 100644 templates/package/view.tmpl create mode 100644 templates/post-install.tmpl create mode 100644 templates/projects/list.tmpl create mode 100644 templates/projects/new.tmpl create mode 100644 templates/projects/view.tmpl create mode 100644 templates/repo/actions/dispatch.tmpl create mode 100644 templates/repo/actions/list.tmpl create mode 100644 templates/repo/actions/no_workflows.tmpl create mode 100644 templates/repo/actions/runs_list.tmpl create mode 100644 templates/repo/actions/status.tmpl create mode 100644 templates/repo/actions/view.tmpl create mode 100644 templates/repo/activity.tmpl create mode 100644 templates/repo/admin_flags.tmpl create mode 100644 templates/repo/blame.tmpl create mode 100644 templates/repo/branch/list.tmpl create mode 100644 templates/repo/branch_dropdown.tmpl create mode 100644 templates/repo/cite/cite_buttons.tmpl create mode 100644 templates/repo/cite/cite_modal.tmpl create mode 100644 templates/repo/clone_buttons.tmpl create mode 100644 templates/repo/clone_script.tmpl create mode 100644 templates/repo/code/recently_pushed_new_branches.tmpl create mode 100644 templates/repo/code_frequency.tmpl create mode 100644 templates/repo/commit_load_branches_and_tags.tmpl create mode 100644 templates/repo/commit_page.tmpl create mode 100644 templates/repo/commit_status.tmpl create mode 100644 templates/repo/commit_statuses.tmpl create mode 100644 templates/repo/commits.tmpl create mode 100644 templates/repo/commits_list.tmpl create mode 100644 templates/repo/commits_list_small.tmpl create mode 100644 templates/repo/commits_search_dropdown.tmpl create mode 100644 templates/repo/commits_table.tmpl create mode 100644 templates/repo/contributors.tmpl create mode 100644 templates/repo/create.tmpl create mode 100644 templates/repo/create_helper.tmpl create mode 100644 templates/repo/diff/blob_excerpt.tmpl create mode 100644 templates/repo/diff/box.tmpl create mode 100644 templates/repo/diff/comment_form.tmpl create mode 100644 templates/repo/diff/comment_form_datahandler.tmpl create mode 100644 templates/repo/diff/comments.tmpl create mode 100644 templates/repo/diff/compare.tmpl create mode 100644 templates/repo/diff/conversation.tmpl create mode 100644 templates/repo/diff/conversations.tmpl create mode 100644 templates/repo/diff/csv_diff.tmpl create mode 100644 templates/repo/diff/escape_title.tmpl create mode 100644 templates/repo/diff/image_diff.tmpl create mode 100644 templates/repo/diff/new_comment.tmpl create mode 100644 templates/repo/diff/new_review.tmpl create mode 100644 templates/repo/diff/options_dropdown.tmpl create mode 100644 templates/repo/diff/section_code.tmpl create mode 100644 templates/repo/diff/section_split.tmpl create mode 100644 templates/repo/diff/section_unified.tmpl create mode 100644 templates/repo/diff/stats.tmpl create mode 100644 templates/repo/diff/whitespace_dropdown.tmpl create mode 100644 templates/repo/editor/cherry_pick.tmpl create mode 100644 templates/repo/editor/commit_form.tmpl create mode 100644 templates/repo/editor/delete.tmpl create mode 100644 templates/repo/editor/diff_preview.tmpl create mode 100644 templates/repo/editor/edit.tmpl create mode 100644 templates/repo/editor/patch.tmpl create mode 100644 templates/repo/editor/upload.tmpl create mode 100644 templates/repo/empty.tmpl create mode 100644 templates/repo/file_info.tmpl create mode 100644 templates/repo/find/files.tmpl create mode 100644 templates/repo/flags.tmpl create mode 100644 templates/repo/forks.tmpl create mode 100644 templates/repo/graph.tmpl create mode 100644 templates/repo/graph/commits.tmpl create mode 100644 templates/repo/graph/div.tmpl create mode 100644 templates/repo/graph/svgcontainer.tmpl create mode 100644 templates/repo/header.tmpl create mode 100644 templates/repo/header_fork.tmpl create mode 100644 templates/repo/home.tmpl create mode 100644 templates/repo/icon.tmpl create mode 100644 templates/repo/issue/card.tmpl create mode 100644 templates/repo/issue/choose.tmpl create mode 100644 templates/repo/issue/comment_tab.tmpl create mode 100644 templates/repo/issue/fields/checkboxes.tmpl create mode 100644 templates/repo/issue/fields/dropdown.tmpl create mode 100644 templates/repo/issue/fields/header.tmpl create mode 100644 templates/repo/issue/fields/input.tmpl create mode 100644 templates/repo/issue/fields/markdown.tmpl create mode 100644 templates/repo/issue/fields/textarea.tmpl create mode 100644 templates/repo/issue/filter_actions.tmpl create mode 100644 templates/repo/issue/filter_list.tmpl create mode 100644 templates/repo/issue/filters.tmpl create mode 100644 templates/repo/issue/label_precolors.tmpl create mode 100644 templates/repo/issue/labels.tmpl create mode 100644 templates/repo/issue/labels/edit_delete_label.tmpl create mode 100644 templates/repo/issue/labels/label.tmpl create mode 100644 templates/repo/issue/labels/label_archived.tmpl create mode 100644 templates/repo/issue/labels/label_list.tmpl create mode 100644 templates/repo/issue/labels/label_load_template.tmpl create mode 100644 templates/repo/issue/labels/label_new.tmpl create mode 100644 templates/repo/issue/labels/labels_selector_field.tmpl create mode 100644 templates/repo/issue/labels/labels_sidebar.tmpl create mode 100644 templates/repo/issue/list.tmpl create mode 100644 templates/repo/issue/milestone/filter_list.tmpl create mode 100644 templates/repo/issue/milestone/select_menu.tmpl create mode 100644 templates/repo/issue/milestone_issues.tmpl create mode 100644 templates/repo/issue/milestone_new.tmpl create mode 100644 templates/repo/issue/milestones.tmpl create mode 100644 templates/repo/issue/navbar.tmpl create mode 100644 templates/repo/issue/new.tmpl create mode 100644 templates/repo/issue/new_form.tmpl create mode 100644 templates/repo/issue/openclose.tmpl create mode 100644 templates/repo/issue/search.tmpl create mode 100644 templates/repo/issue/view.tmpl create mode 100644 templates/repo/issue/view_content.tmpl create mode 100644 templates/repo/issue/view_content/add_reaction.tmpl create mode 100644 templates/repo/issue/view_content/attachments.tmpl create mode 100644 templates/repo/issue/view_content/comments.tmpl create mode 100644 templates/repo/issue/view_content/comments_authorlink.tmpl create mode 100644 templates/repo/issue/view_content/comments_delete_time.tmpl create mode 100644 templates/repo/issue/view_content/context_menu.tmpl create mode 100644 templates/repo/issue/view_content/conversation.tmpl create mode 100644 templates/repo/issue/view_content/pull.tmpl create mode 100644 templates/repo/issue/view_content/pull_merge_instruction.tmpl create mode 100644 templates/repo/issue/view_content/reactions.tmpl create mode 100644 templates/repo/issue/view_content/reference_issue_dialog.tmpl create mode 100644 templates/repo/issue/view_content/show_role.tmpl create mode 100644 templates/repo/issue/view_content/sidebar.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/actions.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/assignees.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/branch_selector_field.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/dependencies.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/due_deadline.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/milestones.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/participants.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/projects.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/pull_review.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/pull_reviewers.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/pull_wip.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/reference.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/timetracking.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/watch.tmpl create mode 100644 templates/repo/issue/view_content/sidebar/watching.tmpl create mode 100644 templates/repo/issue/view_content/update_branch_by_merge.tmpl create mode 100644 templates/repo/issue/view_title.tmpl create mode 100644 templates/repo/latest_commit.tmpl create mode 100644 templates/repo/migrate/codebase.tmpl create mode 100644 templates/repo/migrate/forgejo.tmpl create mode 100644 templates/repo/migrate/git.tmpl create mode 100644 templates/repo/migrate/gitbucket.tmpl create mode 100644 templates/repo/migrate/gitea.tmpl create mode 100644 templates/repo/migrate/github.tmpl create mode 100644 templates/repo/migrate/gitlab.tmpl create mode 100644 templates/repo/migrate/gogs.tmpl create mode 100644 templates/repo/migrate/helper.tmpl create mode 100644 templates/repo/migrate/migrate.tmpl create mode 100644 templates/repo/migrate/migrating.tmpl create mode 100644 templates/repo/migrate/onedev.tmpl create mode 100644 templates/repo/migrate/options.tmpl create mode 100644 templates/repo/navbar.tmpl create mode 100644 templates/repo/packages.tmpl create mode 100644 templates/repo/projects/list.tmpl create mode 100644 templates/repo/projects/new.tmpl create mode 100644 templates/repo/projects/view.tmpl create mode 100644 templates/repo/pulls/commits.tmpl create mode 100644 templates/repo/pulls/files.tmpl create mode 100644 templates/repo/pulls/fork.tmpl create mode 100644 templates/repo/pulls/status.tmpl create mode 100644 templates/repo/pulls/tab_menu.tmpl create mode 100644 templates/repo/pulse.tmpl create mode 100644 templates/repo/recent_commits.tmpl create mode 100644 templates/repo/release/list.tmpl create mode 100644 templates/repo/release/new.tmpl create mode 100644 templates/repo/release_tag_header.tmpl create mode 100644 templates/repo/search.tmpl create mode 100644 templates/repo/search_name.tmpl create mode 100644 templates/repo/settings/actions.tmpl create mode 100644 templates/repo/settings/branches.tmpl create mode 100644 templates/repo/settings/collaboration.tmpl create mode 100644 templates/repo/settings/deploy_keys.tmpl create mode 100644 templates/repo/settings/githook_edit.tmpl create mode 100644 templates/repo/settings/githooks.tmpl create mode 100644 templates/repo/settings/layout_footer.tmpl create mode 100644 templates/repo/settings/layout_head.tmpl create mode 100644 templates/repo/settings/lfs.tmpl create mode 100644 templates/repo/settings/lfs_file.tmpl create mode 100644 templates/repo/settings/lfs_file_find.tmpl create mode 100644 templates/repo/settings/lfs_locks.tmpl create mode 100644 templates/repo/settings/lfs_pointers.tmpl create mode 100644 templates/repo/settings/navbar.tmpl create mode 100644 templates/repo/settings/options.tmpl create mode 100644 templates/repo/settings/protected_branch.tmpl create mode 100644 templates/repo/settings/push_mirror_sync_modal.tmpl create mode 100644 templates/repo/settings/runner_edit.tmpl create mode 100644 templates/repo/settings/secrets.tmpl create mode 100644 templates/repo/settings/tags.tmpl create mode 100644 templates/repo/settings/units.tmpl create mode 100644 templates/repo/settings/units/issues.tmpl create mode 100644 templates/repo/settings/units/overview.tmpl create mode 100644 templates/repo/settings/units/pulls.tmpl create mode 100644 templates/repo/settings/units/wiki.tmpl create mode 100644 templates/repo/settings/webhook/base.tmpl create mode 100644 templates/repo/settings/webhook/base_list.tmpl create mode 100644 templates/repo/settings/webhook/delete_modal.tmpl create mode 100644 templates/repo/settings/webhook/history.tmpl create mode 100644 templates/repo/settings/webhook/link_menu.tmpl create mode 100644 templates/repo/settings/webhook/list.tmpl create mode 100644 templates/repo/settings/webhook/new.tmpl create mode 100644 templates/repo/shabox_badge.tmpl create mode 100644 templates/repo/star_unstar.tmpl create mode 100644 templates/repo/sub_menu.tmpl create mode 100644 templates/repo/tag/list.tmpl create mode 100644 templates/repo/tag/verification_box.tmpl create mode 100644 templates/repo/tag/verification_line.tmpl create mode 100644 templates/repo/unicode_escape_prompt.tmpl create mode 100644 templates/repo/upload.tmpl create mode 100644 templates/repo/user_cards.tmpl create mode 100644 templates/repo/view_file.tmpl create mode 100644 templates/repo/view_list.tmpl create mode 100644 templates/repo/watch_unwatch.tmpl create mode 100644 templates/repo/watchers.tmpl create mode 100644 templates/repo/wiki/new.tmpl create mode 100644 templates/repo/wiki/pages.tmpl create mode 100644 templates/repo/wiki/revision.tmpl create mode 100644 templates/repo/wiki/search.tmpl create mode 100644 templates/repo/wiki/start.tmpl create mode 100644 templates/repo/wiki/view.tmpl create mode 100644 templates/shared/actions/runner_edit.tmpl create mode 100644 templates/shared/actions/runner_list.tmpl create mode 100644 templates/shared/blocked_users_list.tmpl create mode 100644 templates/shared/combomarkdowneditor.tmpl create mode 100644 templates/shared/issueicon.tmpl create mode 100644 templates/shared/issuelist.tmpl create mode 100644 templates/shared/label_filter.tmpl create mode 100644 templates/shared/repo_search.tmpl create mode 100644 templates/shared/search/button.tmpl create mode 100644 templates/shared/search/code/results.tmpl create mode 100644 templates/shared/search/code/search.tmpl create mode 100644 templates/shared/search/combo.tmpl create mode 100644 templates/shared/search/combo_fuzzy.tmpl create mode 100644 templates/shared/search/fuzzy.tmpl create mode 100644 templates/shared/search/input.tmpl create mode 100644 templates/shared/searchbottom.tmpl create mode 100644 templates/shared/searchfile.tmpl create mode 100644 templates/shared/secrets/add_list.tmpl create mode 100644 templates/shared/user/authorlink.tmpl create mode 100644 templates/shared/user/avatarlink.tmpl create mode 100644 templates/shared/user/blocked_users.tmpl create mode 100644 templates/shared/user/name.tmpl create mode 100644 templates/shared/user/namelink.tmpl create mode 100644 templates/shared/user/org_profile_avatar.tmpl create mode 100644 templates/shared/user/profile_big_avatar.tmpl create mode 100644 templates/shared/variables/variable_list.tmpl create mode 100644 templates/shared/webhook/icon.tmpl create mode 100644 templates/status/404.tmpl create mode 100644 templates/status/413.tmpl create mode 100644 templates/status/500.tmpl create mode 100644 templates/swagger/forgejo-ui.tmpl create mode 100644 templates/swagger/ui.tmpl create mode 100644 templates/swagger/v1_json.tmpl create mode 100644 templates/user/auth/activate.tmpl create mode 100644 templates/user/auth/captcha.tmpl create mode 100644 templates/user/auth/change_passwd.tmpl create mode 100644 templates/user/auth/change_passwd_inner.tmpl create mode 100644 templates/user/auth/finalize_openid.tmpl create mode 100644 templates/user/auth/forgot_passwd.tmpl create mode 100644 templates/user/auth/grant.tmpl create mode 100644 templates/user/auth/grant_error.tmpl create mode 100644 templates/user/auth/link_account.tmpl create mode 100644 templates/user/auth/oauth_container.tmpl create mode 100644 templates/user/auth/oidc_wellknown.tmpl create mode 100644 templates/user/auth/prohibit_login.tmpl create mode 100644 templates/user/auth/reset_passwd.tmpl create mode 100644 templates/user/auth/signin.tmpl create mode 100644 templates/user/auth/signin_inner.tmpl create mode 100644 templates/user/auth/signin_openid.tmpl create mode 100644 templates/user/auth/signup.tmpl create mode 100644 templates/user/auth/signup_inner.tmpl create mode 100644 templates/user/auth/signup_openid_connect.tmpl create mode 100644 templates/user/auth/signup_openid_navbar.tmpl create mode 100644 templates/user/auth/signup_openid_register.tmpl create mode 100644 templates/user/auth/twofa.tmpl create mode 100644 templates/user/auth/twofa_scratch.tmpl create mode 100644 templates/user/auth/webauthn.tmpl create mode 100644 templates/user/auth/webauthn_error.tmpl create mode 100644 templates/user/code.tmpl create mode 100644 templates/user/dashboard/dashboard.tmpl create mode 100644 templates/user/dashboard/feeds.tmpl create mode 100644 templates/user/dashboard/issues.tmpl create mode 100644 templates/user/dashboard/milestones.tmpl create mode 100644 templates/user/dashboard/navbar.tmpl create mode 100644 templates/user/dashboard/repolist.tmpl create mode 100644 templates/user/heatmap.tmpl create mode 100644 templates/user/notification/notification.tmpl create mode 100644 templates/user/notification/notification_div.tmpl create mode 100644 templates/user/notification/notification_subscriptions.tmpl create mode 100644 templates/user/overview/header.tmpl create mode 100644 templates/user/overview/package_versions.tmpl create mode 100644 templates/user/overview/packages.tmpl create mode 100644 templates/user/profile.tmpl create mode 100644 templates/user/settings/account.tmpl create mode 100644 templates/user/settings/actions.tmpl create mode 100644 templates/user/settings/appearance.tmpl create mode 100644 templates/user/settings/applications.tmpl create mode 100644 templates/user/settings/applications_oauth2.tmpl create mode 100644 templates/user/settings/applications_oauth2_edit.tmpl create mode 100644 templates/user/settings/applications_oauth2_edit_form.tmpl create mode 100644 templates/user/settings/applications_oauth2_list.tmpl create mode 100644 templates/user/settings/blocked_users.tmpl create mode 100644 templates/user/settings/grants_oauth2.tmpl create mode 100644 templates/user/settings/hook_new.tmpl create mode 100644 templates/user/settings/hooks.tmpl create mode 100644 templates/user/settings/keys.tmpl create mode 100644 templates/user/settings/keys_gpg.tmpl create mode 100644 templates/user/settings/keys_principal.tmpl create mode 100644 templates/user/settings/keys_ssh.tmpl create mode 100644 templates/user/settings/layout_footer.tmpl create mode 100644 templates/user/settings/layout_head.tmpl create mode 100644 templates/user/settings/navbar.tmpl create mode 100644 templates/user/settings/organization.tmpl create mode 100644 templates/user/settings/packages.tmpl create mode 100644 templates/user/settings/packages_cleanup_rules_edit.tmpl create mode 100644 templates/user/settings/packages_cleanup_rules_preview.tmpl create mode 100644 templates/user/settings/profile.tmpl create mode 100644 templates/user/settings/repos.tmpl create mode 100644 templates/user/settings/runner_edit.tmpl create mode 100644 templates/user/settings/security/accountlinks.tmpl create mode 100644 templates/user/settings/security/openid.tmpl create mode 100644 templates/user/settings/security/security.tmpl create mode 100644 templates/user/settings/security/twofa.tmpl create mode 100644 templates/user/settings/security/twofa_enroll.tmpl create mode 100644 templates/user/settings/security/webauthn.tmpl create mode 100644 templates/webhook/new.tmpl create mode 100644 templates/webhook/new/dingtalk.tmpl create mode 100644 templates/webhook/new/discord.tmpl create mode 100644 templates/webhook/new/feishu.tmpl create mode 100644 templates/webhook/new/forgejo.tmpl create mode 100644 templates/webhook/new/gitea.tmpl create mode 100644 templates/webhook/new/gogs.tmpl create mode 100644 templates/webhook/new/matrix.tmpl create mode 100644 templates/webhook/new/msteams.tmpl create mode 100644 templates/webhook/new/packagist.tmpl create mode 100644 templates/webhook/new/slack.tmpl create mode 100644 templates/webhook/new/sourcehut_builds.tmpl create mode 100644 templates/webhook/new/telegram.tmpl create mode 100644 templates/webhook/new/wechatwork.tmpl create mode 100644 templates/webhook/shared-settings.tmpl (limited to 'templates') diff --git a/templates/admin/actions.tmpl b/templates/admin/actions.tmpl new file mode 100644 index 0000000..597863d --- /dev/null +++ b/templates/admin/actions.tmpl @@ -0,0 +1,10 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin actions")}} +
+ {{if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{end}} + {{if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/applications/list.tmpl b/templates/admin/applications/list.tmpl new file mode 100644 index 0000000..cbb66b1 --- /dev/null +++ b/templates/admin/applications/list.tmpl @@ -0,0 +1,8 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
+

+ {{ctx.Locale.Tr "settings.applications"}} +

+ {{template "user/settings/applications_oauth2_list" .}} +
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/applications/oauth2_edit.tmpl b/templates/admin/applications/oauth2_edit.tmpl new file mode 100644 index 0000000..668bfe0 --- /dev/null +++ b/templates/admin/applications/oauth2_edit.tmpl @@ -0,0 +1,6 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
+ + {{template "user/settings/applications_oauth2_edit_form" .}} +
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl new file mode 100644 index 0000000..8a8bd61 --- /dev/null +++ b/templates/admin/auth/edit.tmpl @@ -0,0 +1,464 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}} +
+

+ {{ctx.Locale.Tr "admin.auths.edit"}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ + + {{.Source.TypeName}} +
+
+ + +
+ + + {{if or .Source.IsLDAP .Source.IsDLDAP}} + {{$cfg:=.Source.Cfg}} +
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ {{if .Source.IsLDAP}} +
+ + +
+
+ + +
+ {{end}} +
+ + +
+ {{if .Source.IsDLDAP}} +
+ + +
+ {{end}} +
+ + +
+
+ + +
+
+ + +

{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + {{if .Source.IsLDAP}} +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ {{end}} +
+
+ + +

{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

+
+
+
+
+ + +
+
+ {{end}} + + + {{if .Source.IsSMTP}} + {{$cfg:=.Source.Cfg}} +
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}

+
+
+
+ + +
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}

+
+
+
+ + +
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}

+
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

+
+
+ {{end}} + + + {{if .Source.IsPAM}} + {{$cfg:=.Source.Cfg}} +
+ + +
+
+ + +
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

+
+
+ {{end}} + + + {{if .Source.IsOAuth2}} + {{$cfg:=.Source.Cfg}} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

+
+
+
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + {{range .OAuth2Providers}}{{if .CustomURLSettings}} + + + + + + + {{end}}{{end}} + +
+ + +
+
+ + +

{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}

+
+
+ + +

{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {{end}} + + + {{if .Source.IsSSPI}} + {{$cfg:=.Source.Cfg}} +
+
+ + +

{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}

+
+
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}

+
+
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}

+
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}

+
+
+ + +

{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}

+
+ {{end}} + {{if .Source.IsLDAP}} +
+
+ + +
+
+ {{end}} +
+
+ + +
+
+ +
+ + +
+
+
+ +

+ {{ctx.Locale.Tr "admin.auths.tips"}} +

+
+
{{ctx.Locale.Tr "admin.auths.tips.gmail_settings"}}
+

Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true

+ +
{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:
+

{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}}

+
+
+ + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl new file mode 100644 index 0000000..6483ec8 --- /dev/null +++ b/templates/admin/auth/list.tmpl @@ -0,0 +1,38 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}} +
+

+ {{ctx.Locale.Tr "admin.auths.auth_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

+
+ + + + + + + + + + + + + + {{range .Sources}} + + + + + + + + + + {{end}} + +
ID{{ctx.Locale.Tr "admin.auths.name"}}{{ctx.Locale.Tr "admin.auths.type"}}{{ctx.Locale.Tr "admin.auths.enabled"}}{{ctx.Locale.Tr "admin.auths.updated"}}{{ctx.Locale.Tr "admin.users.created"}}{{ctx.Locale.Tr "admin.users.edit"}}
{{.ID}}{{.Name}}{{.TypeName}}{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{DateTime "short" .UpdatedUnix}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-pencil"}}
+
+
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl new file mode 100644 index 0000000..c70bd3b --- /dev/null +++ b/templates/admin/auth/new.tmpl @@ -0,0 +1,122 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}} +
+

+ {{ctx.Locale.Tr "admin.auths.new"}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ + +
+
+ + +
+ + + {{template "admin/auth/source/ldap" .}} + + + {{template "admin/auth/source/smtp" .}} + + +
+ + + + +
+
+
+ + +

{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

+
+
+ + + {{template "admin/auth/source/oauth" .}} + + + {{template "admin/auth/source/sspi" .}} + +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+
+
+ +

+ {{ctx.Locale.Tr "admin.auths.tips"}} +

+
+
{{ctx.Locale.Tr "admin.auths.tips.gmail_settings"}}
+

Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true

+ +
{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:
+

{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}}

+ +
{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}
+
+
  • Bitbucket
  • + {{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/{your-username}/oauth-consumers/new"}} +
  • Dropbox
  • + {{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}} +
  • Facebook
  • + {{ctx.Locale.Tr "admin.auths.tip.facebook" "https://developers.facebook.com/apps"}} +
  • GitHub
  • + {{ctx.Locale.Tr "admin.auths.tip.github" "https://github.com/settings/applications/new"}} +
  • GitLab
  • + {{ctx.Locale.Tr "admin.auths.tip.gitlab_new" "https://gitlab.com/-/profile/applications"}} +
  • Google
  • + {{ctx.Locale.Tr "admin.auths.tip.google_plus" "https://console.developers.google.com/"}} +
  • OpenID Connect
  • + {{ctx.Locale.Tr "admin.auths.tip.openid_connect"}} +
  • Twitter
  • + {{ctx.Locale.Tr "admin.auths.tip.twitter" "https://dev.twitter.com/apps"}} +
  • Discord
  • + {{ctx.Locale.Tr "admin.auths.tip.discord" "https://discordapp.com/developers/applications/me"}} +
  • Gitea
  • + {{ctx.Locale.Tr "admin.auths.tip.gitea" "https://forgejo.org/docs/latest/user/oauth2-provider"}} +
  • Nextcloud
  • + {{ctx.Locale.Tr "admin.auths.tip.nextcloud"}} +
  • Yandex
  • + {{ctx.Locale.Tr "admin.auths.tip.yandex" "https://oauth.yandex.com/client/new"}} +
  • Mastodon
  • + {{ctx.Locale.Tr "admin.auths.tip.mastodon"}} +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl new file mode 100644 index 0000000..6cb6643 --- /dev/null +++ b/templates/admin/auth/source/ldap.tmpl @@ -0,0 +1,145 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    +
    +
    +
    +
    + + +
    +
    +
    diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl new file mode 100644 index 0000000..0560cc8 --- /dev/null +++ b/templates/admin/auth/source/oauth.tmpl @@ -0,0 +1,109 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    +
    +
    + +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + {{range .OAuth2Providers}}{{if .CustomURLSettings}} + + + + + + + {{end}}{{end}} + +
    + + +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}

    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    diff --git a/templates/admin/auth/source/smtp.tmpl b/templates/admin/auth/source/smtp.tmpl new file mode 100644 index 0000000..31195ac --- /dev/null +++ b/templates/admin/auth/source/smtp.tmpl @@ -0,0 +1,59 @@ +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}

    +
    +
    +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}

    +
    +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}

    +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    +
    +
    +
    diff --git a/templates/admin/auth/source/sspi.tmpl b/templates/admin/auth/source/sspi.tmpl new file mode 100644 index 0000000..6a3f00f --- /dev/null +++ b/templates/admin/auth/source/sspi.tmpl @@ -0,0 +1,43 @@ +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}

    +
    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}

    +
    +
    + + +

    {{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}

    +
    +
    diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl new file mode 100644 index 0000000..8f2b1c1 --- /dev/null +++ b/templates/admin/config.tmpl @@ -0,0 +1,355 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
    +

    + {{ctx.Locale.Tr "admin.config.server_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.app_name"}}
    +
    {{AppName}}
    +
    {{ctx.Locale.Tr "admin.config.app_slogan"}}
    +
    {{AppSlogan}}
    +
    {{ctx.Locale.Tr "admin.config.app_ver"}}
    +
    {{AppVer}}{{.AppBuiltWith}}
    +
    {{ctx.Locale.Tr "admin.config.custom_conf"}}
    +
    {{.CustomConf}}
    +
    {{ctx.Locale.Tr "admin.config.app_url"}}
    +
    {{.AppUrl}}
    +
    {{ctx.Locale.Tr "admin.config.domain"}}
    +
    {{.Domain}}
    +
    {{ctx.Locale.Tr "admin.config.offline_mode"}}
    +
    {{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.disable_router_log"}}
    +
    {{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + +
    + +
    {{ctx.Locale.Tr "admin.config.run_user"}}
    +
    {{.RunUser}}
    +
    {{ctx.Locale.Tr "admin.config.run_mode"}}
    +
    {{.RunMode}}
    + +
    + +
    {{ctx.Locale.Tr "admin.config.git_version"}}
    +
    {{.GitVersion}}
    + +
    + +
    {{ctx.Locale.Tr "admin.config.app_data_path"}}
    +
    {{.AppDataPath}}
    +
    {{ctx.Locale.Tr "admin.config.repo_root_path"}}
    +
    {{.RepoRootPath}}
    +
    {{ctx.Locale.Tr "admin.config.custom_file_root_path"}}
    +
    {{.CustomRootPath}}
    +
    {{ctx.Locale.Tr "admin.config.log_file_root_path"}}
    +
    {{.LogRootPath}}
    +
    {{ctx.Locale.Tr "admin.config.script_type"}}
    +
    {{.ScriptType}}
    +
    {{ctx.Locale.Tr "admin.config.reverse_auth_user"}}
    +
    {{.ReverseProxyAuthUser}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.ssh_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.ssh_enabled"}}
    +
    {{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{if not .SSH.Disabled}} +
    {{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}
    +
    {{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_domain"}}
    +
    {{.SSH.Domain}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_port"}}
    +
    {{.SSH.Port}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_listen_port"}}
    +
    {{.SSH.ListenPort}}
    + + {{if not .SSH.StartBuiltinServer}} +
    {{ctx.Locale.Tr "admin.config.ssh_root_path"}}
    +
    {{.SSH.RootPath}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_key_test_path"}}
    +
    {{.SSH.KeyTestPath}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}
    +
    {{.SSH.KeygenPath}}
    +
    {{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}
    +
    {{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{if .SSH.MinimumKeySizeCheck}} +
    {{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}
    +
    {{.SSH.MinimumKeySizes}}
    + {{end}} + {{end}} + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.lfs_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.lfs_enabled"}}
    +
    {{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{if .LFS.StartServer}} +
    {{ctx.Locale.Tr "admin.config.lfs_content_path"}}
    +
    {{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}
    +
    {{ctx.Locale.Tr "admin.config.lfs_http_auth_expiry"}}
    +
    {{.LFS.HTTPAuthExpiry}}
    + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.db_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.db_type"}}
    +
    {{.DbCfg.Type}}
    + {{if not (eq .DbCfg.Type "sqlite3")}} +
    {{ctx.Locale.Tr "admin.config.db_host"}}
    +
    {{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}
    +
    {{ctx.Locale.Tr "admin.config.db_name"}}
    +
    {{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}
    +
    {{ctx.Locale.Tr "admin.config.db_user"}}
    +
    {{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}
    + {{end}} + {{if eq .DbCfg.Type "postgres"}} +
    {{ctx.Locale.Tr "admin.config.db_schema"}}
    +
    {{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}
    +
    {{ctx.Locale.Tr "admin.config.db_ssl_mode"}}
    +
    {{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}
    + {{end}} + {{if eq .DbCfg.Type "sqlite3"}} +
    {{ctx.Locale.Tr "admin.config.db_path"}}
    +
    {{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}
    + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.service_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.register_email_confirm"}}
    +
    {{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.disable_register"}}
    +
    {{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}
    +
    {{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}
    +
    {{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.show_registration_button"}}
    +
    {{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.enable_openid_signup"}}
    +
    {{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.enable_openid_signin"}}
    +
    {{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.require_sign_in_view"}}
    +
    {{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.mail_notify"}}
    +
    {{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.enable_captcha"}}
    +
    {{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.default_keep_email_private"}}
    +
    {{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}
    +
    {{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.allow_dots_in_usernames"}}
    +
    {{if .Service.AllowDotsInUsernames}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.enable_timetracking"}}
    +
    {{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{if .Service.EnableTimetracking}} +
    {{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}
    +
    {{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
    +
    {{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{end}} +
    {{ctx.Locale.Tr "admin.config.default_visibility_organization"}}
    +
    {{.Service.DefaultOrgVisibility}}
    + +
    {{ctx.Locale.Tr "admin.config.no_reply_address"}}
    +
    {{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}
    +
    {{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}
    +
    {{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    +
    {{ctx.Locale.Tr "admin.config.active_code_lives"}}
    +
    {{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}
    +
    {{ctx.Locale.Tr "admin.config.reset_password_code_lives"}}
    +
    {{.Service.ResetPwdCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.webhook_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.queue_length"}}
    +
    {{.Webhook.QueueLength}}
    +
    {{ctx.Locale.Tr "admin.config.deliver_timeout"}}
    +
    {{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.skip_tls_verify"}}
    +
    {{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.mailer_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.mailer_enabled"}}
    +
    {{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{if .MailerEnabled}} +
    {{ctx.Locale.Tr "admin.config.mailer_name"}}
    +
    {{.Mailer.Name}}
    + {{if eq .Mailer.Protocol "sendmail"}} +
    {{ctx.Locale.Tr "admin.config.mailer_use_sendmail"}}
    +
    {{svg "octicon-check"}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_sendmail_path"}}
    +
    {{.Mailer.SendmailPath}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_sendmail_args"}}
    +
    {{.Mailer.SendmailArgs}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_sendmail_timeout"}}
    +
    {{.Mailer.SendmailTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    + {{else if eq .Mailer.Protocol "dummy"}} +
    {{ctx.Locale.Tr "admin.config.mailer_use_dummy"}}
    +
    {{svg "octicon-check"}}
    + {{else}}{{/* SMTP family */}} +
    {{ctx.Locale.Tr "admin.config.mailer_protocol"}}
    +
    {{.Mailer.Protocol}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}
    +
    {{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}
    +
    {{.Mailer.SMTPAddr}}
    +
    {{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}
    +
    {{.Mailer.SMTPPort}}
    + {{end}} +
    {{ctx.Locale.Tr "admin.config.mailer_user"}}
    +
    {{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}
    +
    +
    {{ctx.Locale.Tr "admin.config.send_test_mail"}}
    +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.cache_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.cache_adapter"}}
    +
    {{.CacheAdapter}}
    + {{if eq .CacheAdapter "memory"}} +
    {{ctx.Locale.Tr "admin.config.cache_interval"}}
    +
    {{.CacheInterval}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    + {{end}} + {{if .CacheConn}} +
    {{ctx.Locale.Tr "admin.config.cache_conn"}}
    +
    {{.CacheConn}}
    +
    {{ctx.Locale.Tr "admin.config.cache_item_ttl"}}
    +
    {{.CacheItemTTL}}
    + {{end}} +
    +
    {{ctx.Locale.Tr "admin.config.cache_test"}}
    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.session_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.session_provider"}}
    +
    {{.SessionConfig.Provider}}
    +
    {{ctx.Locale.Tr "admin.config.provider_config"}}
    +
    {{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}
    +
    {{ctx.Locale.Tr "admin.config.cookie_name"}}
    +
    {{.SessionConfig.CookieName}}
    +
    {{ctx.Locale.Tr "admin.config.gc_interval_time"}}
    +
    {{.SessionConfig.Gclifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.session_life_time"}}
    +
    {{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.https_only"}}
    +
    {{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.git_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}
    +
    {{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}
    +
    {{.Git.MaxGitDiffLines}}
    +
    {{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}
    +
    {{.Git.MaxGitDiffLineCharacters}}
    +
    {{ctx.Locale.Tr "admin.config.git_max_diff_files"}}
    +
    {{.Git.MaxGitDiffFiles}}
    +
    {{ctx.Locale.Tr "admin.config.git_gc_args"}}
    +
    {{.Git.GCArgs}}
    + +
    + +
    {{ctx.Locale.Tr "admin.config.git_migrate_timeout"}}
    +
    {{.Git.Timeout.Migrate}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.git_mirror_timeout"}}
    +
    {{.Git.Timeout.Mirror}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.git_clone_timeout"}}
    +
    {{.Git.Timeout.Clone}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.git_pull_timeout"}}
    +
    {{.Git.Timeout.Pull}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    {{ctx.Locale.Tr "admin.config.git_gc_timeout"}}
    +
    {{.Git.Timeout.GC}} {{ctx.Locale.Tr "tool.raw_seconds"}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.config.log_config"}} +

    +
    +
    + {{if .Loggers.xorm.IsEnabled}} +
    {{ctx.Locale.Tr "admin.config.xorm_log_sql"}}
    +
    {{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    + {{end}} + + {{if .Loggers.access.IsEnabled}} +
    {{ctx.Locale.Tr "admin.config.access_log_template"}}
    +
    {{$.AccessLogTemplate}}
    + {{end}} + + {{range $loggerName, $loggerDetail := .Loggers}} +
    {{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}
    + {{if $loggerDetail.IsEnabled}} +
    {{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}
    + {{else}} +
    {{ctx.Locale.Tr "admin.config.disabled_logger"}}
    + {{end}} + {{end}} +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/config_settings.tmpl b/templates/admin/config_settings.tmpl new file mode 100644 index 0000000..02ab5fd --- /dev/null +++ b/templates/admin/config_settings.tmpl @@ -0,0 +1,42 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +

    + {{ctx.Locale.Tr "admin.config.picture_config"}} +

    +
    +
    +
    {{ctx.Locale.Tr "admin.config.disable_gravatar"}}
    +
    +
    + +
    +
    +
    +
    {{ctx.Locale.Tr "admin.config.enable_federated_avatar"}}
    +
    +
    + +
    +
    +
    +
    + +

    + {{ctx.Locale.Tr "repository"}} +

    +
    +
    +
    +
    + {{ctx.Locale.Tr "admin.config.open_with_editor_app_help"}} +
    {{.DefaultOpenWithEditorAppsString}}
    +
    +
    +
    + +
    +
    + +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/cron.tmpl b/templates/admin/cron.tmpl new file mode 100644 index 0000000..3cb6414 --- /dev/null +++ b/templates/admin/cron.tmpl @@ -0,0 +1,39 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
    +

    + {{ctx.Locale.Tr "admin.monitor.cron"}} +

    +
    +
    + + + + + + + + + + + + + + {{range .Entries}} + + + + + + + + + + {{end}} + +
    {{ctx.Locale.Tr "admin.monitor.name"}}{{ctx.Locale.Tr "admin.monitor.schedule"}}{{ctx.Locale.Tr "admin.monitor.next"}}{{ctx.Locale.Tr "admin.monitor.previous"}}{{ctx.Locale.Tr "admin.monitor.execute_times"}}{{ctx.Locale.Tr "admin.monitor.last_execution_result"}}
    {{ctx.Locale.Tr (printf "admin.dashboard.%s" .Name)}}{{.Spec}}{{DateTime "full" .Next}}{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}-{{end}}{{.ExecTimes}}{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}
    + + {{.CsrfTokenHtml}} +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl new file mode 100644 index 0000000..b61de66 --- /dev/null +++ b/templates/admin/dashboard.tmpl @@ -0,0 +1,84 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}} +
    + {{if .NeedUpdate}} +
    +

    {{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer "https://forgejo.org/news"}}

    +
    + {{end}} +

    + {{ctx.Locale.Tr "admin.dashboard.operations"}} +

    +
    +
    + {{.CsrfTokenHtml}} + + + + + + + + + + + + + + + + + + + {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} + + + + + + + + + {{end}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{ctx.Locale.Tr "admin.dashboard.delete_inactive_accounts"}}
    {{ctx.Locale.Tr "admin.dashboard.delete_repo_archives"}}
    {{ctx.Locale.Tr "admin.dashboard.delete_missing_repos"}}
    {{ctx.Locale.Tr "admin.dashboard.git_gc_repos"}}
    {{ctx.Locale.Tr "admin.dashboard.resync_all_sshkeys"}}
    {{ctx.Locale.Tr "admin.dashboard.resync_all_sshprincipals"}}
    {{ctx.Locale.Tr "admin.dashboard.resync_all_hooks"}}
    {{ctx.Locale.Tr "admin.dashboard.reinit_missing_repos"}}
    {{ctx.Locale.Tr "admin.dashboard.sync_external_users"}}
    {{ctx.Locale.Tr "admin.dashboard.repo_health_check"}}
    {{ctx.Locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}
    {{ctx.Locale.Tr "admin.dashboard.sync_repo_branches"}}
    {{ctx.Locale.Tr "admin.dashboard.sync_repo_tags"}}
    +
    +
    + +

    + {{ctx.Locale.Tr "admin.dashboard.system_status"}} +

    + {{/* TODO: make these stats work in multi-server deployments, likely needs per-server stats in DB */}} +
    +
    + {{template "admin/system_status" .}} +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl new file mode 100644 index 0000000..b07c6fc --- /dev/null +++ b/templates/admin/emails/list.tmpl @@ -0,0 +1,116 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +
    +

    + {{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) +

    +
    + +
    +
    + + + + + + + + + + + + + {{range .Emails}} + + + + + + + + + {{end}} + +
    + {{ctx.Locale.Tr "admin.users.name"}} + {{SortArrow "username" "reverseusername" $.SortType false}} + {{ctx.Locale.Tr "admin.users.full_name"}} + {{ctx.Locale.Tr "email"}} + {{SortArrow "email" "reverseemail" $.SortType true}} + {{ctx.Locale.Tr "admin.emails.primary"}}{{ctx.Locale.Tr "admin.emails.activated"}}
    {{.Name}}{{.FullName}}{{.Email}}{{if .IsPrimary}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + {{if .CanChange}} + + {{if .IsActivated}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + + {{else}} + {{if .IsActivated}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + {{end}} + + +
    +
    + + {{template "base/paginate" .}} + + + +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl new file mode 100644 index 0000000..37dcc49 --- /dev/null +++ b/templates/admin/hook_new.tmpl @@ -0,0 +1,13 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}} +
    + {{$CustomHeaderTitle := ctx.Locale.Tr "admin.defaulthooks.update_webhook"}} + {{if .PageIsAdminDefaultHooksNew}} + {{$CustomHeaderTitle = ctx.Locale.Tr "admin.defaulthooks.add_webhook"}} + {{else if .PageIsAdminSystemHooksNew}} + {{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.add_webhook"}} + {{else if .Webhook.IsSystemWebhook}} + {{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.update_webhook"}} + {{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/hooks.tmpl b/templates/admin/hooks.tmpl new file mode 100644 index 0000000..c77d27d --- /dev/null +++ b/templates/admin/hooks.tmpl @@ -0,0 +1,9 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin hooks")}} +
    + + {{template "repo/settings/webhook/base_list" .SystemWebhooks}} + {{template "repo/settings/webhook/base_list" .DefaultWebhooks}} + + {{template "repo/settings/webhook/delete_modal" .}} +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/layout_footer.tmpl b/templates/admin/layout_footer.tmpl new file mode 100644 index 0000000..8d6e564 --- /dev/null +++ b/templates/admin/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    + {{/* block: admin-setting-content */}} +{{end}} + +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/admin/layout_head.tmpl b/templates/admin/layout_head.tmpl new file mode 100644 index 0000000..8ba47f2 --- /dev/null +++ b/templates/admin/layout_head.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .ctxData}} +
    +
    + {{template "admin/navbar" .ctxData}} +
    + {{template "base/alert" .ctxData}} + {{/* block: admin-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    +{{end}} diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl new file mode 100644 index 0000000..1ec703b --- /dev/null +++ b/templates/admin/navbar.tmpl @@ -0,0 +1,112 @@ + diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl new file mode 100644 index 0000000..33d8a2f --- /dev/null +++ b/templates/admin/notice.tmpl @@ -0,0 +1,68 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}} +
    +

    + {{ctx.Locale.Tr "admin.notices.system_notice_list"}} ({{ctx.Locale.Tr "admin.total" .Total}}) +

    + + + + + + + + + + + + + {{range .Notices}} + + + + + + + + + {{end}} + + {{if .Notices}} + + + + + + + {{end}} +
    ID{{ctx.Locale.Tr "admin.notices.type"}}{{ctx.Locale.Tr "admin.notices.desc"}}{{ctx.Locale.Tr "admin.users.created"}}{{ctx.Locale.Tr "admin.notices.op"}}
    {{.ID}}{{ctx.Locale.Tr .TrStr}}{{.Description}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-note" 16}}
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    + {{template "base/paginate" .}} +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl new file mode 100644 index 0000000..987ceab --- /dev/null +++ b/templates/admin/org/list.tmpl @@ -0,0 +1,76 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +
    +

    + {{ctx.Locale.Tr "admin.orgs.org_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

    +
    + +
    +
    + + + + + + + + + + + + + + {{range .Users}} + + + + + + + + + + {{end}} + +
    ID{{SortArrow "oldest" "newest" $.SortType false}} + {{ctx.Locale.Tr "admin.orgs.name"}} + {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}} + {{ctx.Locale.Tr "admin.orgs.teams"}}{{ctx.Locale.Tr "admin.orgs.members"}}{{ctx.Locale.Tr "admin.users.repos"}} + {{ctx.Locale.Tr "admin.users.created"}} + {{SortArrow "recentupdate" "leastupdate" $.SortType false}} +
    {{.ID}} + {{.Name}} + {{if .Visibility.IsPrivate}} + {{svg "octicon-lock"}} + {{end}} + {{if eq .Type 3}}{{/* Reserved organization */}} + {{ctx.Locale.Tr "admin.users.reserved"}} + {{end}} + {{.NumTeams}}{{.NumMembers}}{{.NumRepos}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-pencil"}}
    +
    + + {{template "base/paginate" .}} +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl new file mode 100644 index 0000000..4ff49b8 --- /dev/null +++ b/templates/admin/packages/list.tmpl @@ -0,0 +1,96 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +
    +

    + {{ctx.Locale.Tr "admin.packages.package_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .TotalCount}}, + {{ctx.Locale.Tr "admin.packages.total_size" (ctx.Locale.TrSize .TotalBlobSize)}}, + {{ctx.Locale.Tr "admin.packages.unreferenced_size" (ctx.Locale.TrSize .TotalUnreferencedBlobSize)}}) +
    +
    + {{.CsrfTokenHtml}} + +
    +
    +

    +
    +
    +
    + {{template "shared/search/input" dict "Value" .Query}} + + {{template "shared/search/button"}} +
    +
    +
    +
    + + + + + + + + + + + + + + + + + {{range .PackageDescriptors}} + + + + + + + + + + + + + {{end}} + +
    ID{{ctx.Locale.Tr "admin.packages.owner"}}{{ctx.Locale.Tr "admin.packages.type"}} + {{ctx.Locale.Tr "admin.packages.name"}} + {{SortArrow "name_asc" "name_desc" .SortType false}} + + {{ctx.Locale.Tr "admin.packages.version"}} + {{SortArrow "version_desc" "version_asc" .SortType false}} + {{ctx.Locale.Tr "admin.packages.creator"}}{{ctx.Locale.Tr "admin.packages.repository"}}{{ctx.Locale.Tr "admin.packages.size"}} + {{ctx.Locale.Tr "admin.packages.published"}} + {{SortArrow "created_asc" "created_desc" .SortType true}} + {{ctx.Locale.Tr "admin.notices.op"}}
    {{.Version.ID}} + {{.Owner.Name}} + {{if .Owner.Visibility.IsPrivate}} + {{svg "octicon-lock"}} + {{end}} + {{.Package.Type.Name}}{{.Package.Name}}{{.Version.Version}}{{.Creator.Name}} + {{if .Repository}} + {{.Repository.Name}} + {{end}} + {{ctx.Locale.TrSize .CalculateBlobSize}}{{DateTime "short" .Version.CreatedUnix}}{{svg "octicon-trash"}}
    +
    + + {{template "base/paginate" .}} +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/queue.tmpl b/templates/admin/queue.tmpl new file mode 100644 index 0000000..1be35cf --- /dev/null +++ b/templates/admin/queue.tmpl @@ -0,0 +1,36 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
    +

    + {{ctx.Locale.Tr "admin.monitor.queues"}} +

    +
    + + + + + + + + + + + + + + {{range $qid, $q := .Queues}} + + + + + + + + + + {{end}} + +
    {{ctx.Locale.Tr "admin.monitor.queue.name"}}{{ctx.Locale.Tr "admin.monitor.queue.type"}}{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}
    {{$q.GetName}}{{$q.GetType}}{{$q.GetItemTypeName}}{{$q.GetWorkerNumber}}{{$q.GetWorkerActiveNumber}}{{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}{{ctx.Locale.Tr "admin.monitor.queue.review_add"}}
    +
    +
    +{{template "admin/layout_footer" .}} + diff --git a/templates/admin/queue_manage.tmpl b/templates/admin/queue_manage.tmpl new file mode 100644 index 0000000..dc0196f --- /dev/null +++ b/templates/admin/queue_manage.tmpl @@ -0,0 +1,61 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
    +

    + {{ctx.Locale.Tr "admin.monitor.queue" .Queue.GetName}} +

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {{ctx.Locale.Tr "admin.monitor.queue.name"}}{{ctx.Locale.Tr "admin.monitor.queue.type"}}{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}{{ctx.Locale.Tr "admin.monitor.queue.maxnumberworkers"}}{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}
    {{.Queue.GetName}}{{.Queue.GetType}}{{.Queue.GetItemTypeName}}{{.Queue.GetWorkerNumber}}{{.Queue.GetWorkerActiveNumber}}{{.Queue.GetWorkerMaxNumber}} + {{$sum := .Queue.GetQueueItemNumber}} + {{if lt $sum 0}} + - + {{else}} + {{$sum}} +
    + {{$.CsrfTokenHtml}} + +
    + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "admin.monitor.queue.settings.title"}} +

    +
    +

    {{ctx.Locale.Tr "admin.monitor.queue.settings.desc"}}

    +
    + {{$.CsrfTokenHtml}} +
    +
    + + +
    + +
    +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl new file mode 100644 index 0000000..1ea6183 --- /dev/null +++ b/templates/admin/repo/list.tmpl @@ -0,0 +1,110 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}} +
    +

    + {{ctx.Locale.Tr "admin.repos.repo_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

    +
    + {{template "shared/repo_search" .}} +
    +
    + + + + + + + + + + + + + + + + + + + {{range .Repos}} + + + + + + + + + + + + + + + {{end}} + +
    ID{{SortArrow "oldest" "newest" $.SortType false}}{{ctx.Locale.Tr "admin.repos.owner"}} + {{ctx.Locale.Tr "admin.repos.name"}} + {{SortArrow "alphabetically" "reversealphabetically" $.SortType false}} + {{ctx.Locale.Tr "repo.watchers"}} + {{ctx.Locale.Tr "repo.stars"}} + {{SortArrow "moststars" "feweststars" $.SortType false}} + + {{ctx.Locale.Tr "repo.forks"}} + {{SortArrow "mostforks" "fewestforks" $.SortType false}} + {{ctx.Locale.Tr "admin.repos.issues"}} + {{ctx.Locale.Tr "admin.repos.size"}} + {{SortArrow "gitsize" "reversegitsize" $.SortType false}} + + {{ctx.Locale.Tr "admin.repos.lfs_size"}} + {{SortArrow "lfssize" "reverselfssize" $.SortType false}} + {{ctx.Locale.Tr "admin.auths.updated"}}{{ctx.Locale.Tr "admin.users.created"}}{{ctx.Locale.Tr "admin.notices.op"}}
    {{.ID}} + {{.Owner.Name}} + {{if .Owner.Visibility.IsPrivate}} + {{svg "octicon-lock"}} + {{end}} + + {{.Name}} + {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} + {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} + {{end}} + {{if .IsMirror}} + {{svg "octicon-mirror"}} + {{else if .IsFork}} + {{svg "octicon-repo-forked"}} + {{end}} + {{.NumWatches}}{{.NumStars}}{{.NumForks}}{{.NumIssues}}{{ctx.Locale.TrSize .GitSize}}{{ctx.Locale.TrSize .LFSSize}}{{DateTime "short" .UpdatedUnix}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-trash"}}
    +
    + + {{template "base/paginate" .}} +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl new file mode 100644 index 0000000..a33cb43 --- /dev/null +++ b/templates/admin/repo/unadopted.tmpl @@ -0,0 +1,75 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}} +
    +

    + {{ctx.Locale.Tr "admin.repos.unadopted"}} + +

    +
    +
    +
    + + + {{template "shared/search/button"}} +
    +
    +
    + {{if .search}} +
    + {{if .Dirs}} +
    + {{range $dirI, $dir := .Dirs}} +
    + {{svg "octicon-file-directory-fill"}} {{$dir}} +
    + + + + +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{ctx.Locale.Tr "admin.repos.unadopted.no_more"}} +
    + {{template "base/paginate" .}} + {{end}} +
    + {{end}} +
    + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/runners/edit.tmpl b/templates/admin/runners/edit.tmpl new file mode 100644 index 0000000..1165c84 --- /dev/null +++ b/templates/admin/runners/edit.tmpl @@ -0,0 +1,5 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin runners")}} +
    + {{template "shared/actions/runner_edit" .}} +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/self_check.tmpl b/templates/admin/self_check.tmpl new file mode 100644 index 0000000..afcd4cd --- /dev/null +++ b/templates/admin/self_check.tmpl @@ -0,0 +1,41 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} + +
    +

    + {{ctx.Locale.Tr "admin.self_check"}} +

    +
    + {{if .DatabaseCheckHasProblems}} + {{if .DatabaseType.IsMySQL}} +
    {{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}
    + {{end}} + {{if .DatabaseCheckCollationMismatch}} +
    {{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}
    + {{end}} + {{if .DatabaseCheckCollationCaseInsensitive}} +
    {{ctx.Locale.Tr "admin.self_check.database_collation_case_insensitive" .DatabaseCheckResult.DatabaseCollation}}
    + {{end}} + {{if .DatabaseCheckInconsistentCollationColumns}} +
    + {{ctx.Locale.Tr "admin.self_check.database_inconsistent_collation_columns" .DatabaseCheckResult.DatabaseCollation}} +
      + {{range .DatabaseCheckInconsistentCollationColumns}} +
    • {{.}}
    • + {{end}} +
    +
    + {{end}} + {{else}} +
    {{ctx.Locale.Tr "admin.self_check.no_problem_found"}}
    + {{end}} + + {{if .CacheError}} +
    {{ctx.Locale.Tr "admin.config.cache_test_failed" .CacheError}}
    + {{end}} + {{if .CacheSlow}} +
    {{ctx.Locale.Tr "admin.config.cache_test_slow" .CacheSlow}}
    + {{end}} +
    +
    + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/stacktrace-row.tmpl b/templates/admin/stacktrace-row.tmpl new file mode 100644 index 0000000..694bf56 --- /dev/null +++ b/templates/admin/stacktrace-row.tmpl @@ -0,0 +1,66 @@ +
    +
    +
    + {{if eq .Process.Type "request"}} + {{svg "octicon-globe" 16}} + {{else if eq .Process.Type "system"}} + {{svg "octicon-cpu" 16}} + {{else if eq .Process.Type "normal"}} + {{svg "octicon-terminal" 16}} + {{else}} + {{svg "octicon-code" 16}} + {{end}} +
    +
    +
    {{.Process.Description}}
    +
    {{if ne .Process.Type "none"}}{{TimeSince .Process.Start ctx.Locale}}{{end}}
    +
    +
    + {{if or (eq .Process.Type "request") (eq .Process.Type "normal")}} + {{svg "octicon-trash" 16 "text-red"}} + {{end}} +
    +
    + {{if .Process.Stacks}} +
    + {{range .Process.Stacks}} +
    +
    + +
    +
    + {{svg "octicon-code" 16}}{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}} +
    +
    + {{range .Labels}} +
    {{.Name}}
    {{.Value}}
    + {{end}} +
    +
    +
    +
    + {{range .Entry}} +
    + {{svg "octicon-dot-fill" 16}} +
    +
    {{.Function}}
    +
    {{.File}}:{{.Line}}
    +
    +
    + {{end}} +
    +
    +
    + {{end}} +
    + {{end}} + + {{if .Process.Children}} +
    + {{range .Process.Children}} + {{template "admin/stacktrace-row" dict "Process" . "root" $.root}} + {{end}} +
    + {{end}} + +
    diff --git a/templates/admin/stacktrace.tmpl b/templates/admin/stacktrace.tmpl new file mode 100644 index 0000000..e324570 --- /dev/null +++ b/templates/admin/stacktrace.tmpl @@ -0,0 +1,48 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
    + +
    + +
    +
    + + {{ctx.Locale.Tr "tool.raw_seconds"}} +
    +
    +
    + +
    + +

    + {{printf "%d Goroutines" .GoroutineCount}}{{/* Goroutine is non-translatable*/}} + {{- if .ProcessCount -}}, {{ctx.Locale.Tr "admin.monitor.processes_count" .ProcessCount}}{{- end -}} +

    + + {{if .ProcessStacks}} +
    +
    + {{range .ProcessStacks}} + {{template "admin/stacktrace-row" dict "Process" . "root" $}} + {{end}} +
    +
    + {{end}} +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/stats.tmpl b/templates/admin/stats.tmpl new file mode 100644 index 0000000..70f2aa7 --- /dev/null +++ b/templates/admin/stats.tmpl @@ -0,0 +1,17 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
    +

    + {{ctx.Locale.Tr "admin.dashboard.statistic"}} +

    +
    + + {{range $statsKey, $statsValue := .Stats}} + + + + + {{end}} +
    {{$statsKey}}{{$statsValue}}
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/system_status.tmpl b/templates/admin/system_status.tmpl new file mode 100644 index 0000000..7b5c9be --- /dev/null +++ b/templates/admin/system_status.tmpl @@ -0,0 +1,62 @@ +
    +
    {{ctx.Locale.Tr "admin.dashboard.server_uptime"}}
    +
    {{.SysStatus.StartTime}}
    +
    {{ctx.Locale.Tr "admin.dashboard.current_goroutine"}}
    +
    {{.SysStatus.NumGoroutine}}
    +
    +
    {{ctx.Locale.Tr "admin.dashboard.current_memory_usage"}}
    +
    {{.SysStatus.MemAllocated}}
    +
    {{ctx.Locale.Tr "admin.dashboard.total_memory_allocated"}}
    +
    {{.SysStatus.MemTotal}}
    +
    {{ctx.Locale.Tr "admin.dashboard.memory_obtained"}}
    +
    {{.SysStatus.MemSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.pointer_lookup_times"}}
    +
    {{.SysStatus.Lookups}}
    +
    {{ctx.Locale.Tr "admin.dashboard.memory_allocate_times"}}
    +
    {{.SysStatus.MemMallocs}}
    +
    {{ctx.Locale.Tr "admin.dashboard.memory_free_times"}}
    +
    {{.SysStatus.MemFrees}}
    +
    +
    {{ctx.Locale.Tr "admin.dashboard.current_heap_usage"}}
    +
    {{.SysStatus.HeapAlloc}}
    +
    {{ctx.Locale.Tr "admin.dashboard.heap_memory_obtained"}}
    +
    {{.SysStatus.HeapSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.heap_memory_idle"}}
    +
    {{.SysStatus.HeapIdle}}
    +
    {{ctx.Locale.Tr "admin.dashboard.heap_memory_in_use"}}
    +
    {{.SysStatus.HeapInuse}}
    +
    {{ctx.Locale.Tr "admin.dashboard.heap_memory_released"}}
    +
    {{.SysStatus.HeapReleased}}
    +
    {{ctx.Locale.Tr "admin.dashboard.heap_objects"}}
    +
    {{.SysStatus.HeapObjects}}
    +
    +
    {{ctx.Locale.Tr "admin.dashboard.bootstrap_stack_usage"}}
    +
    {{.SysStatus.StackInuse}}
    +
    {{ctx.Locale.Tr "admin.dashboard.stack_memory_obtained"}}
    +
    {{.SysStatus.StackSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.mspan_structures_usage"}}
    +
    {{.SysStatus.MSpanInuse}}
    +
    {{ctx.Locale.Tr "admin.dashboard.mspan_structures_obtained"}}
    +
    {{.SysStatus.MSpanSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.mcache_structures_usage"}}
    +
    {{.SysStatus.MCacheInuse}}
    +
    {{ctx.Locale.Tr "admin.dashboard.mcache_structures_obtained"}}
    +
    {{.SysStatus.MCacheSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
    +
    {{.SysStatus.BuckHashSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.gc_metadata_obtained"}}
    +
    {{.SysStatus.GCSys}}
    +
    {{ctx.Locale.Tr "admin.dashboard.other_system_allocation_obtained"}}
    +
    {{.SysStatus.OtherSys}}
    +
    +
    {{ctx.Locale.Tr "admin.dashboard.next_gc_recycle"}}
    +
    {{.SysStatus.NextGC}}
    +
    {{ctx.Locale.Tr "admin.dashboard.last_gc_time"}}
    +
    {{.SysStatus.LastGCTime}}
    +
    {{ctx.Locale.Tr "admin.dashboard.total_gc_pause"}}
    +
    {{.SysStatus.PauseTotalNs}}
    +
    {{ctx.Locale.Tr "admin.dashboard.last_gc_pause"}}
    +
    {{.SysStatus.PauseNs}}
    +
    {{ctx.Locale.Tr "admin.dashboard.gc_times"}}
    +
    {{.SysStatus.NumGC}}
    +
    diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl new file mode 100644 index 0000000..f5c85e9 --- /dev/null +++ b/templates/admin/user/edit.tmpl @@ -0,0 +1,242 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit user")}} +
    +

    + {{ctx.Locale.Tr "admin.users.edit_account"}} +

    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +

    {{ctx.Locale.Tr "admin.users.password_helper"}}

    +
    + +
    + + +
    + +
    + + +
    +
    + + +
    + +
    + +
    + + +

    {{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}

    +
    + +
    + +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.activated.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.block.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.admin.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.restricted.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.local_import.description"}} +
    + {{if not .DisableRegularOrgCreation}} +
    +
    + + +
    + {{ctx.Locale.Tr "admin.users.organization_creation.description"}} +
    + {{end}} + + {{if .TwoFactorEnabled}} +
    +
    +
    + + +
    +
    + {{end}} + +
    + +
    + + +
    +
    +
    + +

    + {{ctx.Locale.Tr "settings.avatar"}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{if not .DisableGravatar}} +
    +
    + + +
    +
    +
    + + +
    + {{end}} + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + +
    +
    +
    +
    + + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl new file mode 100644 index 0000000..e5d4299 --- /dev/null +++ b/templates/admin/user/list.tmpl @@ -0,0 +1,119 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +
    +

    + {{ctx.Locale.Tr "admin.users.user_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

    +
    +
    + + + + + {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}} +
    +
    +
    + + + + + + + + + + + + + + + + {{range .Users}} + + + + + + + + + {{if .LastLoginUnix}} + + {{else}} + + {{end}} + + + {{end}} + +
    ID{{SortArrow "oldest" "newest" .SortType false}} + {{ctx.Locale.Tr "admin.users.name"}} + {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}} + {{ctx.Locale.Tr "email"}}{{ctx.Locale.Tr "admin.users.activated"}}{{ctx.Locale.Tr "admin.users.restricted"}}{{ctx.Locale.Tr "admin.users.2fa"}}{{ctx.Locale.Tr "admin.users.created"}} + {{ctx.Locale.Tr "admin.users.last_login"}} + {{SortArrow "lastlogin" "reverselastlogin" $.SortType false}} +
    {{.ID}} + {{.Name}} + {{if .IsAdmin}} + {{ctx.Locale.Tr "admin.users.admin"}} + {{else if eq 2 .Type}}{{/* Reserved user */}} + {{ctx.Locale.Tr "admin.users.reserved"}} + {{else if eq 4 .Type}}{{/* Bot "user" */}} + {{ctx.Locale.Tr "admin.users.bot"}} + {{else if eq 5 .Type}}{{/* Remote user */}} + {{ctx.Locale.Tr "admin.users.remote"}} + {{end}} + {{.Email}}{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{DateTime "short" .CreatedUnix}}{{DateTime "short" .LastLoginUnix}}{{ctx.Locale.Tr "admin.users.never_login"}} + +
    +
    + + {{template "base/paginate" .}} +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl new file mode 100644 index 0000000..b04ebc4 --- /dev/null +++ b/templates/admin/user/new.tmpl @@ -0,0 +1,90 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new user")}} +
    +

    + {{ctx.Locale.Tr "admin.users.new_account"}} +

    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
    + + +
    + +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    +
    + + +
    +
    + + + {{if .CanSendEmail}} +
    +
    + + +
    +
    + {{end}} + +
    + +
    +
    +
    +
    +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/view.tmpl b/templates/admin/user/view.tmpl new file mode 100644 index 0000000..21943a8 --- /dev/null +++ b/templates/admin/user/view.tmpl @@ -0,0 +1,48 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin view user")}} + +
    +
    +
    +

    + {{.Title}} + +

    +
    + {{template "admin/user/view_details" .}} +
    +
    +
    +

    + {{ctx.Locale.Tr "admin.emails"}} +
    + {{.EmailsTotal}} +
    +

    +
    + {{template "admin/user/view_emails" .}} +
    +
    +
    +

    + {{ctx.Locale.Tr "admin.repositories"}} +
    + {{.ReposTotal}} +
    +

    +
    + {{template "explore/repo_list" .}} +
    +

    + {{ctx.Locale.Tr "settings.organization"}} +
    + {{.OrgsTotal}} +
    +

    +
    + {{template "explore/user_list" .}} +
    +
    + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/view_details.tmpl b/templates/admin/user/view_details.tmpl new file mode 100644 index 0000000..be2f32b --- /dev/null +++ b/templates/admin/user/view_details.tmpl @@ -0,0 +1,74 @@ +
    +
    +
    + {{ctx.AvatarUtils.Avatar .User 48}} +
    +
    +
    + {{template "shared/user/name" .User}} + {{if .User.IsAdmin}} + {{ctx.Locale.Tr "admin.users.admin"}} + {{end}} +
    +
    + {{ctx.Locale.Tr "admin.users.auth_source"}}: + {{if eq .LoginSource.ID 0}} + {{ctx.Locale.Tr "admin.users.local"}} + {{else}} + {{.LoginSource.Name}} + {{end}} +
    +
    + {{ctx.Locale.Tr "admin.users.activated"}}: + {{if .User.IsActive}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
    +
    + {{ctx.Locale.Tr "admin.users.restricted"}}: + {{if .User.IsRestricted}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
    +
    + {{ctx.Locale.Tr "settings.visibility"}}: + {{if .User.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}} + {{if .User.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}} + {{if .User.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}} +
    +
    + {{ctx.Locale.Tr "admin.users.2fa"}}: + {{if .TwoFactorEnabled}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
    + {{if .User.Language}} +
    + + {{ctx.Locale.Tr "settings.language"}}: + {{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}} + +
    + {{end}} + {{if .User.Location}} +
    + {{svg "octicon-location"}}{{.User.Location}} +
    + {{end}} + {{if .User.Website}} +
    + + {{svg "octicon-link"}} + {{.User.Website}} + +
    + {{end}} +
    +
    +
    diff --git a/templates/admin/user/view_emails.tmpl b/templates/admin/user/view_emails.tmpl new file mode 100644 index 0000000..22ce305 --- /dev/null +++ b/templates/admin/user/view_emails.tmpl @@ -0,0 +1,19 @@ +
    + {{range .Emails}} +
    +
    +
    + {{.Email}} + {{if .IsPrimary}} +
    {{ctx.Locale.Tr "settings.primary"}}
    + {{end}} + {{if .IsActivated}} +
    {{ctx.Locale.Tr "settings.activated"}}
    + {{else}} +
    {{ctx.Locale.Tr "settings.requires_activation"}}
    + {{end}} +
    +
    +
    + {{end}} +
    diff --git a/templates/api/packages/pypi/simple.tmpl b/templates/api/packages/pypi/simple.tmpl new file mode 100644 index 0000000..181f826 --- /dev/null +++ b/templates/api/packages/pypi/simple.tmpl @@ -0,0 +1,15 @@ + + + + Links for {{.PackageDescriptor.Package.Name}} + + +

    Links for {{.PackageDescriptor.Package.Name}}

    + {{range .PackageDescriptors}} + {{$p := .}} + {{range .Files}} + {{.File.Name}}
    + {{end}} + {{end}} + + diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl new file mode 100644 index 0000000..e2853d3 --- /dev/null +++ b/templates/base/alert.tmpl @@ -0,0 +1,23 @@ +{{if .Flash.ErrorMsg}} +
    +

    {{.Flash.ErrorMsg | SanitizeHTML}}

    +
    +{{end}} +{{if .Flash.SuccessMsg}} +
    +

    {{.Flash.SuccessMsg | SanitizeHTML}}

    +
    +{{end}} +{{if .Flash.InfoMsg}} +
    +

    {{.Flash.InfoMsg | SanitizeHTML}}

    +
    +{{end}} +{{if .Flash.WarningMsg}} +
    +

    {{.Flash.WarningMsg | SanitizeHTML}}

    +
    +{{end}} +{{if and (not .Flash.ErrorMsg) (not .Flash.SuccessMsg) (not .Flash.InfoMsg) (not .Flash.WarningMsg) (not .IsHTMX)}} +
    +{{end}} diff --git a/templates/base/alert_details.tmpl b/templates/base/alert_details.tmpl new file mode 100644 index 0000000..6801c82 --- /dev/null +++ b/templates/base/alert_details.tmpl @@ -0,0 +1,7 @@ +{{.Message}} +
    + {{.Summary}} + + {{.Details | SanitizeHTML}} + +
    diff --git a/templates/base/disable_form_autofill.tmpl b/templates/base/disable_form_autofill.tmpl new file mode 100644 index 0000000..6f06395 --- /dev/null +++ b/templates/base/disable_form_autofill.tmpl @@ -0,0 +1,31 @@ +{{/* +Why we need to disable form autofill: +1. Many pages contain different password inputs for different usages, eg: repo setting, autofill will make a mess. +2. We have `areYouSure` confirm dialog if a user leaves a pages without submit. +Autofill will make the form changed even if the user didn't input anything. Then the user keeps seeing annoying confirm dialog. + +In history, Gitea put `` in forms to bypass the autofill, +but there were still many forms suffered the autofill problem. + +Now we improve it. + +Solutions which do NOT work: +1. Adding `autocomplete=off` doesn't help. New Chrome completely ignores it. +2. Use a JavaScript to run in a few seconds later after the page is loaded to process the autofilled inputs, it doesn't work. +Because for security reason, the inputs won't be filled before the user makes an interaction in the page. +So we can not predict the correct time to run the JavaScript code. + +Solutions which work: +1. Some hacky methods like: https://github.com/matteobad/detect-autofill +2. This solution: use invisible inputs. Be aware of: +(a) The inputs must be at the beginning of the form, and can not be hidden. +(b) The input for username must have a valid name. +(c) There should be no negative word (eg: fake) in the `name` attribute. +(d) Chrome seems to use a weighted algorithm to choose an input to fill text, so the using "username" as input name is better than using "user". +We make the names of these dummy inputs begin with an underline to indicate it is for special usage, +and these dummy form values won't be used by backend code. +*/}} + diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl new file mode 100644 index 0000000..fed426a --- /dev/null +++ b/templates/base/footer.tmpl @@ -0,0 +1,20 @@ +{{if false}} + {{/* to make html structure "likely" complete to prevent IDE warnings */}} + + +
    +{{end}} + + {{template "custom/body_inner_post" .}} + +
    + + {{template "custom/body_outer_post" .}} + + {{template "base/footer_content" .}} + + + + {{template "custom/footer" .}} + + diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl new file mode 100644 index 0000000..5db7464 --- /dev/null +++ b/templates/base/footer_content.tmpl @@ -0,0 +1,32 @@ +
    + + +
    diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl new file mode 100644 index 0000000..7753f49 --- /dev/null +++ b/templates/base/head.tmpl @@ -0,0 +1,50 @@ + + + + + {{/* Display `- .Repository.FullName` only if `.Title` does not already start with that. */}} + {{if .Title}}{{.Title}} - {{end}}{{if and (.Repository.Name) (not (StringUtils.HasPrefix .Title .Repository.FullName))}}{{.Repository.FullName}} - {{end}}{{AppDisplayName}} + {{if .ManifestData}}{{end}} + + + + +{{if .GoGetImport}} + + +{{end}} +{{if and .EnableFeed .FeedURL}} + + +{{end}} + + + {{template "base/head_script" .}} + + {{template "base/head_opengraph" .}} + {{template "base/head_style" .}} + {{template "custom/header" .}} + + + {{template "custom/body_outer_pre" .}} + +
    + + + {{template "custom/body_inner_pre" .}} + + {{if not .PageIsInstall}} + {{template "base/head_navbar" .}} + {{end}} + +{{if false}} + {{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    + + +{{end}} diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl new file mode 100644 index 0000000..ba17222 --- /dev/null +++ b/templates/base/head_navbar.tmpl @@ -0,0 +1,205 @@ +{{$notificationUnreadCount := 0}} +{{if and .IsSigned .NotificationUnreadCount}} + {{$notificationUnreadCount = call .NotificationUnreadCount}} +{{end}} + + diff --git a/templates/base/head_opengraph.tmpl b/templates/base/head_opengraph.tmpl new file mode 100644 index 0000000..292c3bd --- /dev/null +++ b/templates/base/head_opengraph.tmpl @@ -0,0 +1,53 @@ +{{- /* og:description - a one to two sentence description of your object, maybe it only needs at most 300 bytes */ -}} +{{if .PageIsUserProfile}} + + + + + {{if .ContextUser.Description}} + + {{end}} +{{else if .Repository}} + {{if .Issue}} + + + {{if .Issue.Content}} + + {{end}} + {{else if or .PageIsDiff .IsViewFile}} + + + {{if and .PageIsDiff .Commit}} + {{- $commitMessageParts := StringUtils.Cut .Commit.Message "\n" -}} + {{- $commitMessageBody := index $commitMessageParts 1 -}} + {{- if $commitMessageBody -}} + + {{- end -}} + {{end}} + {{else if .Pages}} + + + {{if .Repository.Description}} + + {{end}} + {{else}} + + + {{if .Repository.Description}} + + {{end}} + {{end}} + + {{if (.Repository.AvatarLink ctx)}} + + {{else}} + + {{end}} +{{else}} + + + + + +{{end}} + diff --git a/templates/base/head_script.tmpl b/templates/base/head_script.tmpl new file mode 100644 index 0000000..22e08e9 --- /dev/null +++ b/templates/base/head_script.tmpl @@ -0,0 +1,50 @@ +{{/* +==== DO NOT EDIT ==== +If you are customizing Gitea, please do not change this file. +If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly. +*/}} + + diff --git a/templates/base/head_style.tmpl b/templates/base/head_style.tmpl new file mode 100644 index 0000000..0793eac --- /dev/null +++ b/templates/base/head_style.tmpl @@ -0,0 +1,2 @@ + + diff --git a/templates/base/modal_actions_confirm.tmpl b/templates/base/modal_actions_confirm.tmpl new file mode 100644 index 0000000..c44320d --- /dev/null +++ b/templates/base/modal_actions_confirm.tmpl @@ -0,0 +1,35 @@ +{{/* +Two buttons (negative, positive): +* ModalButtonTypes: "yes" (default) or "confirm" +* ModalButtonColors: "primary" (default) / "blue" / "yellow" +* ModalButtonCancelText +* ModalButtonOkText + +Single danger button (GitHub-like): +* ModalButtonDangerText "This action will destroy your data" + +The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal internally +*/}} +
    + {{if .ModalButtonDangerText}} + + {{else}} + {{$textNegitive := ctx.Locale.Tr "modal.no"}} + {{$textPositive := ctx.Locale.Tr "modal.yes"}} + {{if eq .ModalButtonTypes "confirm"}} + {{$textNegitive = ctx.Locale.Tr "modal.cancel"}} + {{$textPositive = ctx.Locale.Tr "modal.confirm"}} + {{end}} + {{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}} + {{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}} + + {{$stylePositive := "primary"}} + {{if eq .ModalButtonColors "blue"}} + {{$stylePositive = "blue"}} + {{else if eq .ModalButtonColors "yellow"}} + {{$stylePositive = "yellow"}} + {{end}} + + + {{end}} +
    diff --git a/templates/base/paginate.tmpl b/templates/base/paginate.tmpl new file mode 100644 index 0000000..2ca72f6 --- /dev/null +++ b/templates/base/paginate.tmpl @@ -0,0 +1,34 @@ +{{$paginationParams := .Page.GetParams}} +{{$paginationLink := $.Link}} +{{if eq $paginationLink AppSubUrl}}{{$paginationLink = print $paginationLink "/"}}{{end}} +{{with .Page.Paginater}} + {{if gt .TotalPages 1}} + + {{end}} +{{end}} diff --git a/templates/custom/body_inner_post.tmpl b/templates/custom/body_inner_post.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/body_inner_pre.tmpl b/templates/custom/body_inner_pre.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/body_outer_post.tmpl b/templates/custom/body_outer_post.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/body_outer_pre.tmpl b/templates/custom/body_outer_pre.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/extra_links.tmpl b/templates/custom/extra_links.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/extra_links_footer.tmpl b/templates/custom/extra_links_footer.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/extra_tabs.tmpl b/templates/custom/extra_tabs.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/footer.tmpl b/templates/custom/footer.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/header.tmpl b/templates/custom/header.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/custom/repo_flag_banners.tmpl b/templates/custom/repo_flag_banners.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/devtest/fetch-action.tmpl b/templates/devtest/fetch-action.tmpl new file mode 100644 index 0000000..be15a53 --- /dev/null +++ b/templates/devtest/fetch-action.tmpl @@ -0,0 +1,44 @@ +{{template "base/head" .}} +
    + {{template "base/alert" .}} +
    +

    link-action

    +
    + Use "window.fetch" to send a request to backend, the request is defined in an "A" or "BUTTON" element. + It might be renamed to "link-fetch-action" to match the "form-fetch-action". +
    +
    + + + +
    +
    +
    +

    form-fetch-action

    +
    Use "window.fetch" to send a form request to backend
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    bad action url
    +
    +
    +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl new file mode 100644 index 0000000..015ab1e --- /dev/null +++ b/templates/devtest/flex-list.tmpl @@ -0,0 +1,115 @@ +{{template "base/head" .}} + +
    +
    +

    Flex List (standalone)

    +
    +
    +
    +
    + {{svg "octicon-info" 32}} +
    +
    +
    + Flex Item + + with label + +
    +
    + consists of leading/main/trailing part +
    +
    + main part contains title and (multiple) body lines +
    +
    +
    + + + +
    +
    + +
    +
    + {{svg "octicon-info" 32}} +
    +
    +
    + Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong title +
    +
    + consists of leading/main/trailing part +
    +
    + Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content + Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content +
    +
    +
    + +
    +
    + +
    +
    + {{svg "octicon-repo" 32}} +
    +
    + +
    + when inside header, the trailing part will wrap below the title +
    +
    +
    +
    + +
    + +

    Flex List (with "ui segment")

    +
    +
    +
    item 1
    +
    item 2
    +
    +
    +
    +

    Flex List (with "ui segment")

    +
    +
    item 1
    +
    item 2
    +
    +
    + +

    If parent provides the padding/margin space:

    +
    +
    +
    item 1 (no padding top)
    +
    item 2 (no padding bottom)
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/devtest/fomantic-modal.tmpl b/templates/devtest/fomantic-modal.tmpl new file mode 100644 index 0000000..5cd3672 --- /dev/null +++ b/templates/devtest/fomantic-modal.tmpl @@ -0,0 +1,86 @@ +{{template "base/head" .}} +
    + {{template "base/alert" .}} + + + + + + + + + + + + + + + + + + + + + +
    +{{template "base/footer" .}} diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl new file mode 100644 index 0000000..8c5db4d --- /dev/null +++ b/templates/devtest/gitea-ui.tmpl @@ -0,0 +1,330 @@ +{{template "base/head" .}} + +
    +
    +

    Link

    +
    + normal + muted + suppressed + silenced +
    +

    Button

    +
    + Style: + + + + +
    +
    + State: + +
    +
    +
      +
    • +

      General purpose:

      + + + + + + + + +
    • +
    • +

      Recommended colors:

      + + + + + + + + + + +
    • +
    • +

      Supported but not recommended:

      +

      Do not use if there is no strong requirement. Do not use grey/black buttons, they don't work well with dark theme.

      + + + + + + + + + + + + + + +
    • +
    • +

      Inline / Plain:

      +
      + + + +
      +
    • +
    + +
    +
    + +
    +

    Buttons

    +
    +
    +
    +
    +
    + +
    +

    Tooltip

    +
    text with tooltip
    +
    text with interactive tooltip
    +
    + +
    +

    Loading

    +
    loading ...
    +
    +

    loading ...

    +

    loading ...

    +

    loading ...

    +

    loading ...

    +
    +
    + +
    +

    <origin-url>

    +
    +
    +
    + +
    +

    <overflow-menu>

    + + + +
    + +
    +

    GiteaAbsoluteDate

    +
    +
    +
    +
    +
    +
    relative-time:
    +
    + +
    +

    LocaleNumber

    +
    {{ctx.Locale.PrettyNumber 1}}
    +
    {{ctx.Locale.PrettyNumber 12}}
    +
    {{ctx.Locale.PrettyNumber 123}}
    +
    {{ctx.Locale.PrettyNumber 1234}}
    +
    {{ctx.Locale.PrettyNumber 12345}}
    +
    {{ctx.Locale.PrettyNumber 123456}}
    +
    {{ctx.Locale.PrettyNumber 1234567}}
    +
    + +
    +

    TimeSince

    +
    Now: {{TimeSince .TimeNow ctx.Locale}}
    +
    5s past: {{TimeSince .TimePast5s ctx.Locale}}
    +
    5s future: {{TimeSince .TimeFuture5s ctx.Locale}}
    +
    2m past: {{TimeSince .TimePast2m ctx.Locale}}
    +
    2m future: {{TimeSince .TimeFuture2m ctx.Locale}}
    +
    1y past: {{TimeSince .TimePast1y ctx.Locale}}
    +
    1y future: {{TimeSince .TimeFuture1y ctx.Locale}}
    +
    + +
    +

    SVG alignment

    + +

    Text with SVG

    +
    {{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)
    +
    {{svg "octicon-alert"}} {{svg "octicon-x"}} text
    (inline)
    + +
    {{svg "octicon-alert"}} flex item with very very very very very very very very long content
    + +
    +
    {{svg "octicon-alert"}} flex every line
    +
    {{svg "octicon-alert"}} flex every item
    +
    {{svg "octicon-alert"}} flex item with very very very very very very very very long content
    +
    + +

    Button with SVG

    +
    + +
    + + 123 +
    + +
    + +

    Input with SVG

    +
    + +
    + +

    Dropdown with SVG

    +
    + + + + +
    + + +
    +
    + +
    + + + + +
    + +
    + + + + +
    + +
    +
    +
    Button align with ...
    + +
    +
    + +
    +

    Toast

    +
    + + + +
    +
    + +
    +

    ComboMarkdownEditor

    +
    ps: no JS code attached, so just a layout
    + {{template "shared/combomarkdowneditor" .}} +
    + +

    Tailwind CSS Demo

    +
    + +
    + + +
    +{{template "base/footer" .}} diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl new file mode 100644 index 0000000..c4b52a3 --- /dev/null +++ b/templates/devtest/label.tmpl @@ -0,0 +1,27 @@ +{{template "base/head" .}} + +
    +
    +

    Label

    +
    + simple label + red label + green label +
    +
    + basic label + basic red label + basic green label +
    +
    + long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
    +
    + very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
    +
    + very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/devtest/list.tmpl b/templates/devtest/list.tmpl new file mode 100644 index 0000000..90b1fcc --- /dev/null +++ b/templates/devtest/list.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} + + + + + +{{template "base/footer" .}} diff --git a/templates/devtest/tmplerr-sub.tmpl b/templates/devtest/tmplerr-sub.tmpl new file mode 100644 index 0000000..f7974eb --- /dev/null +++ b/templates/devtest/tmplerr-sub.tmpl @@ -0,0 +1,3 @@ +sub template triggers an executing error + + {{ctx.Locale.NoSuch "asdf"}} diff --git a/templates/devtest/tmplerr.tmpl b/templates/devtest/tmplerr.tmpl new file mode 100644 index 0000000..dd938c8 --- /dev/null +++ b/templates/devtest/tmplerr.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
    +
    +
    + hello hello hello hello hello hello hello hello hello hello +
    +
    + {{template "devtest/tmplerr-sub" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl new file mode 100644 index 0000000..039933f --- /dev/null +++ b/templates/explore/code.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "shared/search/code/search" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl new file mode 100644 index 0000000..8e619fa --- /dev/null +++ b/templates/explore/navbar.tmpl @@ -0,0 +1,20 @@ + + + diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl new file mode 100644 index 0000000..59bc6c8 --- /dev/null +++ b/templates/explore/repo_list.tmpl @@ -0,0 +1,73 @@ +
    + {{range .Repos}} +
    +
    + {{template "repo/icon" .}} +
    +
    +
    +
    + {{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}} + {{.Owner.Name}}/ + {{end}} + {{.Name}} + + {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} + {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} + {{end}} + +
    + +
    + {{$description := .DescriptionHTML $.Context}} + {{if $description}} +
    {{$description}}
    + {{end}} + {{if .Topics}} +
    + {{range .Topics}} + {{if ne . ""}}{{.}}{{end}} + {{end}} +
    + {{end}} +
    {{ctx.Locale.Tr "org.repo_updated" (TimeSinceUnix .UpdatedUnix ctx.Locale)}}
    +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "search.no_results"}} +
    + {{end}} +
    diff --git a/templates/explore/repos.tmpl b/templates/explore/repos.tmpl new file mode 100644 index 0000000..53742bf --- /dev/null +++ b/templates/explore/repos.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/explore/search.tmpl b/templates/explore/search.tmpl new file mode 100644 index 0000000..1d984a2 --- /dev/null +++ b/templates/explore/search.tmpl @@ -0,0 +1,23 @@ + +
    diff --git a/templates/explore/user_list.tmpl b/templates/explore/user_list.tmpl new file mode 100644 index 0000000..f2cf939 --- /dev/null +++ b/templates/explore/user_list.tmpl @@ -0,0 +1,33 @@ +
    + {{range .Users}} +
    +
    + {{ctx.AvatarUtils.Avatar . 48}} +
    +
    +
    + {{template "shared/user/name" .}} + {{if .Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} + {{end}} +
    +
    + {{if .Location}} + {{svg "octicon-location"}}{{.Location}} + {{end}} + {{if and .Email (or (and $.ShowUserEmail $.IsSigned (not .KeepEmailPrivate)) $.PageIsAdminUsers)}} + + {{svg "octicon-mail"}} + {{.Email}} + + {{end}} + {{svg "octicon-calendar"}}{{ctx.Locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix)}} +
    +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "search.no_results"}} +
    + {{end}} +
    diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl new file mode 100644 index 0000000..e904612 --- /dev/null +++ b/templates/explore/users.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +
    + {{template "explore/navbar" .}} +
    + {{template "explore/search" .}} + {{template "explore/user_list" .}} + {{template "base/paginate" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/home.tmpl b/templates/home.tmpl new file mode 100644 index 0000000..a974344 --- /dev/null +++ b/templates/home.tmpl @@ -0,0 +1,51 @@ +{{template "base/head" .}} +
    +
    +
    + +
    +

    + {{AppDisplayName}} +

    +

    {{ctx.Locale.Tr "startpage.app_desc"}}

    +
    +
    +
    +
    +
    +

    + {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}} +

    +

    + {{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}} +

    +
    +
    +

    + {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}} +

    +

    + {{ctx.Locale.Tr "startpage.platform_desc"}} +

    +
    +
    +
    +
    +

    + {{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}} +

    +

    + {{ctx.Locale.Tr "startpage.lightweight_desc"}} +

    +
    +
    +

    + {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}} +

    +

    + {{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}} +

    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/htmx/milestone_sidebar.tmpl b/templates/htmx/milestone_sidebar.tmpl new file mode 100644 index 0000000..05bbd80 --- /dev/null +++ b/templates/htmx/milestone_sidebar.tmpl @@ -0,0 +1,4 @@ +
    + {{template "repo/issue/view_content/comments" .}} +
    +{{template "repo/issue/view_content/sidebar/milestones" .}} diff --git a/templates/install.tmpl b/templates/install.tmpl new file mode 100644 index 0000000..ae800df --- /dev/null +++ b/templates/install.tmpl @@ -0,0 +1,367 @@ +{{template "base/head" .}} +
    +
    +
    +

    + {{ctx.Locale.Tr "install.title"}} +

    +
    + {{template "base/alert" .}} + +
    +

    {{ctx.Locale.Tr "install.docker_helper" "https://forgejo.org/docs/latest/admin/installation-docker/"}}

    + + +

    {{ctx.Locale.Tr "install.db_title"}}

    +

    {{ctx.Locale.Tr "install.require_db_desc"}}

    +
    + + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + + + {{ctx.Locale.Tr "install.db_schema_helper"}} +
    +
    + +
    +
    + + + {{ctx.Locale.Tr "install.sqlite_helper"}} +
    +
    + + {{if .Err_DbInstalledBefore}} +
    +

    {{ctx.Locale.Tr "install.reinstall_confirm_message"}}

    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + {{end}} + + +

    {{ctx.Locale.Tr "install.general_title"}}

    +
    + + + {{ctx.Locale.Tr "install.app_name_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.app_slogan_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.repo_path_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.lfs_path_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.run_user_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.domain_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.ssh_port_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.http_port_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.app_url_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.log_root_path_helper"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.disable_registration.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.enable_update_checker_helper_forgejo"}} +
    + + +

    {{ctx.Locale.Tr "install.optional_title"}}

    + + +
    + + {{ctx.Locale.Tr "install.email_title"}} + +
    + + +
    +
    + + +
    +
    + + + {{ctx.Locale.TrString "install.smtp_from_helper"}}{{/* it contains lt/gt chars*/}} +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +
    + + {{ctx.Locale.Tr "install.server_service_title"}} + +
    +
    + + +
    + {{ctx.Locale.Tr "install.offline_mode.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.disable_gravatar.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.federated_avatar_lookup.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.openid_signin.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.allow_only_external_registration.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.openid_signup.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.enable_captcha.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.require_sign_in_view.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.default_keep_email_private.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.default_allow_create_organization.description"}} +
    +
    +
    + + +
    + {{ctx.Locale.Tr "install.default_enable_timetracking.description"}} +
    +
    + + + {{ctx.Locale.Tr "install.no_reply_address_helper"}} +
    +
    + + + {{ctx.Locale.Tr "install.password_algorithm_helper"}} +
    +
    + + +
    + + {{ctx.Locale.Tr "install.admin_title"}} + +

    {{ctx.Locale.Tr "install.admin_setting.description"}}

    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + {{if .EnvConfigKeys}} + +

    {{ctx.Locale.Tr "install.env_config_keys"}}

    +
    +
    + {{ctx.Locale.Tr "install.env_config_keys_prompt"}} +
    +
    + {{range .EnvConfigKeys}}{{.}}{{end}} +
    +
    + {{end}} + +

    {{ctx.Locale.Tr "install.config_location_hint"}} {{.CustomConfFile}}

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/mail/auth/2fa_disabled.tmpl b/templates/mail/auth/2fa_disabled.tmpl new file mode 100644 index 0000000..3f9d379 --- /dev/null +++ b/templates/mail/auth/2fa_disabled.tmpl @@ -0,0 +1,15 @@ + + + + + + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.totp_disabled.text_1"}}


    + {{if not .HasWebAuthn}}

    {{.locale.Tr "mail.totp_disabled.no_2fa"}}


    {{end}} +

    {{.locale.Tr "mail.account_security_caution.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_2"}}


    + + {{template "common/footer_simple" .}} + + diff --git a/templates/mail/auth/activate.tmpl b/templates/mail/auth/activate.tmpl new file mode 100644 index 0000000..eb7ea5a --- /dev/null +++ b/templates/mail/auth/activate.tmpl @@ -0,0 +1,16 @@ + + + + + + + +{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + +

    {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}


    +

    {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

    {{$activate_url}}


    +

    {{.locale.Tr "mail.link_not_working_do_paste"}}

    + +

    © {{AppName}}

    + + diff --git a/templates/mail/auth/activate_email.tmpl b/templates/mail/auth/activate_email.tmpl new file mode 100644 index 0000000..9ca54d3 --- /dev/null +++ b/templates/mail/auth/activate_email.tmpl @@ -0,0 +1,16 @@ + + + + + + + +{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

    {{$activate_url}}


    +

    {{.locale.Tr "mail.link_not_working_do_paste"}}

    + +

    © {{AppName}}

    + + diff --git a/templates/mail/auth/password_change.tmpl b/templates/mail/auth/password_change.tmpl new file mode 100644 index 0000000..4366b8d --- /dev/null +++ b/templates/mail/auth/password_change.tmpl @@ -0,0 +1,16 @@ + + + + + + + + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.password_change.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_2"}}


    + + {{template "common/footer_simple" .}} + + diff --git a/templates/mail/auth/primary_mail_change.tmpl b/templates/mail/auth/primary_mail_change.tmpl new file mode 100644 index 0000000..d17be19 --- /dev/null +++ b/templates/mail/auth/primary_mail_change.tmpl @@ -0,0 +1,14 @@ + + + + + + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.primary_mail_change.text_1" .NewPrimaryMail}}


    +

    {{.locale.Tr "mail.account_security_caution.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_2"}}


    + + {{template "common/footer_simple" .}} + + diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl new file mode 100644 index 0000000..d3a668b --- /dev/null +++ b/templates/mail/auth/register_notify.tmpl @@ -0,0 +1,17 @@ + + + + + + + +{{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}} + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.register_notify.text_1" AppName}}


    +

    {{.locale.Tr "mail.register_notify.text_2" .Username}}

    {{AppUrl}}user/login


    +

    {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}


    + +

    © {{AppName}}

    + + diff --git a/templates/mail/auth/removed_security_key.tmpl b/templates/mail/auth/removed_security_key.tmpl new file mode 100644 index 0000000..18ae187 --- /dev/null +++ b/templates/mail/auth/removed_security_key.tmpl @@ -0,0 +1,15 @@ + + + + + + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.removed_security_key.text_1" .SecurityKeyName}}


    + {{if and (not .HasWebAuthn) (not .HasTOTP)}}

    {{.locale.Tr "mail.removed_security_key.no_2fa"}}


    {{end}} +

    {{.locale.Tr "mail.account_security_caution.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_2"}}


    + + {{template "common/footer_simple" .}} + + diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl new file mode 100644 index 0000000..b85b770 --- /dev/null +++ b/templates/mail/auth/reset_passwd.tmpl @@ -0,0 +1,16 @@ + + + + + + + +{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    +

    {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

    {{$recover_url}}


    +

    {{.locale.Tr "mail.link_not_working_do_paste"}}

    + +

    © {{AppName}}

    + + diff --git a/templates/mail/auth/totp_enrolled.tmpl b/templates/mail/auth/totp_enrolled.tmpl new file mode 100644 index 0000000..9c665e0 --- /dev/null +++ b/templates/mail/auth/totp_enrolled.tmpl @@ -0,0 +1,15 @@ + + + + + + + + +

    {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}


    + {{if .HasWebAuthn}}

    {{.locale.Tr "mail.totp_enrolled.text_1.has_webauthn"}}

    {{else}}

    {{.locale.Tr "mail.totp_enrolled.text_1.no_webauthn"}}

    {{end}}
    +

    {{.locale.Tr "mail.account_security_caution.text_1"}}


    +

    {{.locale.Tr "mail.account_security_caution.text_2"}}


    + {{template "common/footer_simple" .}} + + diff --git a/templates/mail/common/footer_simple.tmpl b/templates/mail/common/footer_simple.tmpl new file mode 100644 index 0000000..baec3e5 --- /dev/null +++ b/templates/mail/common/footer_simple.tmpl @@ -0,0 +1 @@ +

    {{AppName}}

    diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl new file mode 100644 index 0000000..f8ad62a --- /dev/null +++ b/templates/mail/issue/assigned.tmpl @@ -0,0 +1,28 @@ + + + + + + + +{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} +{{$link := HTMLFormat "#%d" .Link .Issue.Index}} + +

    + {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

    + + + diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl new file mode 100644 index 0000000..a94a10e --- /dev/null +++ b/templates/mail/issue/default.tmpl @@ -0,0 +1,90 @@ + + + + + + + + + + + {{if .IsMention}}

    {{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

    {{end}} + {{if eq .ActionName "push"}} +

    + {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink}} + {{else}} + {{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}} + {{end}} +

    + {{end}} +

    + {{if eq .ActionName "close"}} + {{.locale.Tr "mail.issue.action.close" .Doer.Name .Issue.Index}} + {{else if eq .ActionName "reopen"}} + {{.locale.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index}} + {{else if eq .ActionName "merge"}} + {{.locale.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch}} + {{else if eq .ActionName "approve"}} + {{.locale.Tr "mail.issue.action.approve" .Doer.Name}} + {{else if eq .ActionName "reject"}} + {{.locale.Tr "mail.issue.action.reject" .Doer.Name}} + {{else if eq .ActionName "review"}} + {{.locale.Tr "mail.issue.action.review" .Doer.Name}} + {{else if eq .ActionName "review_dismissed"}} + {{.locale.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name}} + {{else if eq .ActionName "ready_for_review"}} + {{.locale.Tr "mail.issue.action.ready_for_review" .Doer.Name}} + {{end}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} + {{- range .ReviewComments}} +


    + {{$.locale.Tr "mail.issue.in_tree_path" .TreePath}} +
    +
    {{.Patch}}
    +
    {{.RenderedContent}}
    +
    + {{end -}} + {{if eq .ActionName "push"}} + + {{end}} +

    + + + diff --git a/templates/mail/notify/admin_new_user.tmpl b/templates/mail/notify/admin_new_user.tmpl new file mode 100644 index 0000000..655c7ce --- /dev/null +++ b/templates/mail/notify/admin_new_user.tmpl @@ -0,0 +1,20 @@ + + + + + + + + + + + +

    {{.Body | SanitizeHTML}}

    + + diff --git a/templates/mail/notify/collaborator.tmpl b/templates/mail/notify/collaborator.tmpl new file mode 100644 index 0000000..6108d40 --- /dev/null +++ b/templates/mail/notify/collaborator.tmpl @@ -0,0 +1,20 @@ + + + + + + + + +

    {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}

    + + + diff --git a/templates/mail/notify/repo_transfer.tmpl b/templates/mail/notify/repo_transfer.tmpl new file mode 100644 index 0000000..bc4c4b3 --- /dev/null +++ b/templates/mail/notify/repo_transfer.tmpl @@ -0,0 +1,18 @@ + + + + + + +{{$url := HTMLFormat "%[2]s" .Link .Repo}} + +

    {{.Subject}}. + {{.locale.Tr "mail.repo.transfer.body" $url}} +

    +

    + --- +
    + {{.locale.Tr "mail.view_it_on" AppName}}. +

    + + diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl new file mode 100644 index 0000000..8c01aec --- /dev/null +++ b/templates/mail/release.tmpl @@ -0,0 +1,60 @@ + + + + + + + + + +{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} +{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} + +

    + {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

    +

    {{.locale.Tr "mail.release.title" .Release.Title}}

    +

    + {{.locale.Tr "mail.release.note"}}
    + {{- if eq .Release.RenderedNote ""}} + {{else}} + {{.Release.RenderedNote}} + {{end -}} +

    +

    +

    + --- +
    + {{.locale.Tr "mail.release.downloads"}} +

    +

    + + + diff --git a/templates/mail/team_invite.tmpl b/templates/mail/team_invite.tmpl new file mode 100644 index 0000000..cb0c0c0 --- /dev/null +++ b/templates/mail/team_invite.tmpl @@ -0,0 +1,15 @@ + + + + + + + +

    {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

    +

    {{.locale.Tr "mail.team_invite.text_2"}}

    {{.InviteURL}}

    +

    {{.locale.Tr "mail.link_not_working_do_paste"}}

    +

    {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}}

    + +

    © {{AppName}}

    + + diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl new file mode 100644 index 0000000..ad172ea --- /dev/null +++ b/templates/org/create.tmpl @@ -0,0 +1,57 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "new_org.title"}} +

    +
    + {{template "base/alert" .}} +
    + + + {{ctx.Locale.Tr "org.org_name_helper"}} +
    + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/follow_unfollow.tmpl b/templates/org/follow_unfollow.tmpl new file mode 100644 index 0000000..ba0bd01 --- /dev/null +++ b/templates/org/follow_unfollow.tmpl @@ -0,0 +1,7 @@ + diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl new file mode 100644 index 0000000..494dedf --- /dev/null +++ b/templates/org/header.tmpl @@ -0,0 +1,37 @@ +
    + {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}} +
    +
    +
    + {{.Org.DisplayName}} + + {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} + {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} + +
    + + {{if .EnableFeed}} + + {{svg "octicon-rss" 24}} + + {{end}} + {{if .IsSigned}} + {{template "org/follow_unfollow" .}} + {{end}} + {{if .IsOrganizationMember}} + {{ctx.Locale.Tr "org.open_dashboard"}} + {{end}} + +
    + {{if .RenderedDescription}}
    {{.RenderedDescription}}
    {{end}} +
    + {{if .Org.Location}}
    {{svg "octicon-location"}} {{.Org.Location}}
    {{end}} + {{if .Org.Website}}
    {{svg "octicon-link"}} {{.Org.Website}}
    {{end}} + {{if .IsSigned}} + {{if .Org.Email}}
    {{svg "octicon-mail"}} {{.Org.Email}}
    {{end}} + {{end}} +
    +
    +
    + +{{template "org/menu" .}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl new file mode 100644 index 0000000..3ae5f01 --- /dev/null +++ b/templates/org/home.tmpl @@ -0,0 +1,73 @@ +{{template "base/head" .}} +
    + {{if .Flash}} +
    + {{template "base/alert" .}} +
    + {{end}} + {{template "org/header" .}} + +
    +
    +
    + {{if .ProfileReadme}} +
    {{.ProfileReadme}}
    + {{end}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    + + {{if .ShowMemberAndTeamTab}} +
    + {{if .CanCreateOrgRepo}} +
    + {{ctx.Locale.Tr "new_repo.link"}} + {{if not .DisableNewPullMirrors}} + {{ctx.Locale.Tr "new_migrate.link"}} + {{end}} +
    +
    + {{end}} + {{if .NumMembers}} +

    + {{ctx.Locale.Tr "org.members"}} + {{.NumMembers}} {{svg "octicon-chevron-right"}} +

    +
    + {{$isMember := .IsOrganizationMember}} + {{range .Members}} + {{if or $isMember (call $.IsPublicMember .ID)}} + {{ctx.AvatarUtils.Avatar . 48}} + {{end}} + {{end}} +
    + {{end}} + {{if .IsOrganizationMember}} +
    + {{ctx.Locale.Tr "org.teams"}} + {{.Org.NumTeams}} {{svg "octicon-chevron-right"}} +
    + + {{if .IsOrganizationOwner}} + + {{end}} + {{end}} +
    + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl new file mode 100644 index 0000000..4388dc9 --- /dev/null +++ b/templates/org/member/members.tmpl @@ -0,0 +1,90 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} + +
    + {{range .Members}} + {{$isPublic := index $.MembersIsPublicMember .ID}} +
    + +
    +
    + {{template "shared/user/name" .}} + {{if not $isPublic}} + {{ctx.Locale.Tr "org.members.private"}} + {{end}} +
    + {{if not $.PublicOnly}} +
    + {{ctx.Locale.Tr "org.members.member_role"}} + {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}} +
    + {{if $.IsOrganizationOwner}} +
    + {{ctx.Locale.Tr "admin.users.2fa"}} + + {{if index $.MembersTwoFaStatus .ID}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} + +
    + {{end}} + {{end}} +
    +
    + {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} + {{if $isPublic}} + {{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}} + {{else}} + {{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}} + {{end}} + {{end}} + {{if eq $.SignedUser.ID .ID}} +
    + +
    + {{else if $.IsOrganizationOwner}} +
    + +
    + {{end}} +
    +
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    + + + +{{template "base/footer" .}} diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl new file mode 100644 index 0000000..9ac3a61 --- /dev/null +++ b/templates/org/menu.tmpl @@ -0,0 +1,57 @@ + diff --git a/templates/org/projects/list.tmpl b/templates/org/projects/list.tmpl new file mode 100644 index 0000000..80dde1c --- /dev/null +++ b/templates/org/projects/list.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "projects/list" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "projects/list" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/org/projects/new.tmpl b/templates/org/projects/new.tmpl new file mode 100644 index 0000000..fc52130 --- /dev/null +++ b/templates/org/projects/new.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
    + {{template "shared/user/org_profile_avatar" .}} +
    + {{template "user/overview/header" .}} + {{template "projects/new" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/projects/view.tmpl b/templates/org/projects/view.tmpl new file mode 100644 index 0000000..e1ab81c --- /dev/null +++ b/templates/org/projects/view.tmpl @@ -0,0 +1,11 @@ +{{template "base/head" .}} +
    + {{template "shared/user/org_profile_avatar" .}} +
    + {{template "user/overview/header" .}} +
    +
    + {{template "projects/view" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/settings/actions.tmpl b/templates/org/settings/actions.tmpl new file mode 100644 index 0000000..abb9c98 --- /dev/null +++ b/templates/org/settings/actions.tmpl @@ -0,0 +1,11 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings actions")}} +
    + {{if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications.tmpl b/templates/org/settings/applications.tmpl new file mode 100644 index 0000000..df5f4e9 --- /dev/null +++ b/templates/org/settings/applications.tmpl @@ -0,0 +1,9 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
    +

    + {{ctx.Locale.Tr "settings.applications"}} +

    + + {{template "user/settings/applications_oauth2_list" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications_oauth2_edit.tmpl b/templates/org/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..987803a --- /dev/null +++ b/templates/org/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
    + {{template "user/settings/applications_oauth2_edit_form" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/blocked_users.tmpl b/templates/org/settings/blocked_users.tmpl new file mode 100644 index 0000000..f685a1b --- /dev/null +++ b/templates/org/settings/blocked_users.tmpl @@ -0,0 +1,21 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings blocked-users")}} +
    +
    +
    + {{.CsrfTokenHtml}} + +
    + +
    + +
    +
    +
    + {{template "shared/blocked_users_list" .}} +
    +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl new file mode 100644 index 0000000..e1ef471 --- /dev/null +++ b/templates/org/settings/delete.tmpl @@ -0,0 +1,35 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings delete")}} + +
    +

    + {{ctx.Locale.Tr "org.settings.delete_account"}} +

    +
    +
    +

    {{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    +
    +
    + + + +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl new file mode 100644 index 0000000..f89ee5f --- /dev/null +++ b/templates/org/settings/hook_new.tmpl @@ -0,0 +1,7 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}} +
    + {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl new file mode 100644 index 0000000..9f30796 --- /dev/null +++ b/templates/org/settings/hooks.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings webhooks")}} +
    + {{template "repo/settings/webhook/list" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl new file mode 100644 index 0000000..25a562c --- /dev/null +++ b/templates/org/settings/labels.tmpl @@ -0,0 +1,15 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}} +
    +
    +
    + {{ctx.Locale.Tr "org.settings.labels_desc"}} +
    + +
    +
    + {{template "repo/issue/labels/label_new" .}} + {{template "repo/issue/labels/label_list" .}} +
    +{{template "repo/issue/labels/edit_delete_label" .}} +{{template "org/settings/layout_footer" .}} + diff --git a/templates/org/settings/layout_footer.tmpl b/templates/org/settings/layout_footer.tmpl new file mode 100644 index 0000000..09d88c0 --- /dev/null +++ b/templates/org/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    + {{/* block: org-setting-content */}} +{{end}} + +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/settings/layout_head.tmpl b/templates/org/settings/layout_head.tmpl new file mode 100644 index 0000000..31dad2c --- /dev/null +++ b/templates/org/settings/layout_head.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .ctxData}} +
    + {{template "org/header" .ctxData}} +
    + {{template "org/settings/navbar" .ctxData}} +
    + {{template "base/alert" .ctxData}} + {{/* block: org-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    +{{end}} diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl new file mode 100644 index 0000000..b245768 --- /dev/null +++ b/templates/org/settings/navbar.tmpl @@ -0,0 +1,48 @@ + diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl new file mode 100644 index 0000000..62debfc --- /dev/null +++ b/templates/org/settings/options.tmpl @@ -0,0 +1,102 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
    +

    + {{ctx.Locale.Tr "org.settings.options"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    + + {{if .SignedUser.IsAdmin}} +
    + +
    + + +

    {{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}

    +
    + {{end}} + +
    + +
    +
    + +
    + +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + +
    +
    +
    +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages.tmpl b/templates/org/settings/packages.tmpl new file mode 100644 index 0000000..91106c3 --- /dev/null +++ b/templates/org/settings/packages.tmpl @@ -0,0 +1,6 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
    + {{template "package/shared/cleanup_rules/list" .}} + {{template "package/shared/cargo" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_edit.tmpl b/templates/org/settings/packages_cleanup_rules_edit.tmpl new file mode 100644 index 0000000..ff4c2dd --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
    + {{template "package/shared/cleanup_rules/edit" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_preview.tmpl b/templates/org/settings/packages_cleanup_rules_preview.tmpl new file mode 100644 index 0000000..5a2f061 --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_preview.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
    + {{template "package/shared/cleanup_rules/preview" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/runners_edit.tmpl b/templates/org/settings/runners_edit.tmpl new file mode 100644 index 0000000..acd67a4 --- /dev/null +++ b/templates/org/settings/runners_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings runners")}} +
    + {{template "shared/actions/runner_edit" .}} +
    +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl new file mode 100644 index 0000000..1167828 --- /dev/null +++ b/templates/org/team/invite.tmpl @@ -0,0 +1,23 @@ +{{template "base/head" .}} +
    +
    + {{template "base/alert" .}} +
    +
    + {{ctx.AvatarUtils.Avatar .Organization 140}} +
    +
    +
    {{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}
    +
    {{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
    +
    {{ctx.Locale.Tr "org.teams.invite.description"}}
    +
    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl new file mode 100644 index 0000000..7e9a59a --- /dev/null +++ b/templates/org/team/members.tmpl @@ -0,0 +1,88 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} +
    + {{template "org/team/sidebar" .}} +
    + {{template "org/team/navbar" .}} + {{if .IsOrganizationOwner}} +
    +
    + {{.CsrfTokenHtml}} + + + +
    +
    + {{end}} +
    +
    + {{range .Team.Members}} +
    + +
    +
    + {{template "shared/user/name" .}} +
    +
    +
    + {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} +
    + +
    + {{end}} +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "org.teams.members.none"}} +
    + {{end}} +
    +
    + {{if and .Invites $.IsOrganizationOwner}} +

    {{ctx.Locale.Tr "org.teams.invite_team_member.list"}}

    +
    +
    + {{range .Invites}} +
    +
    + {{.Email}} +
    +
    +
    + {{$.CsrfTokenHtml}} + + +
    +
    +
    + {{end}} +
    +
    + {{end}} +
    +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl new file mode 100644 index 0000000..8f2571e --- /dev/null +++ b/templates/org/team/navbar.tmpl @@ -0,0 +1,4 @@ + diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl new file mode 100644 index 0000000..ed9cb98 --- /dev/null +++ b/templates/org/team/new.tmpl @@ -0,0 +1,148 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{ctx.Locale.Tr "org.teams.settings"}}{{end}} +

    +
    + {{template "base/alert" .}} +
    + + {{if eq .Team.LowerName "owners"}} + + {{end}} + + {{ctx.Locale.Tr "org.team_name_helper"}} +
    +
    + + + {{ctx.Locale.Tr "org.team_desc_helper"}} +
    + {{if not (eq .Team.LowerName "owners")}} +
    + {{ctx.Locale.Tr "org.team_access_desc"}} + + + + +
    +
    + {{ctx.Locale.Tr "org.team_permission_desc"}} + + +
    + {{ctx.Locale.Tr "org.team_unit_desc"}} + {{ctx.Locale.Tr "org.teams.none_access_helper"}} + + + + + + + + + + + + {{range $t, $unit := $.Units}} + {{if ge $unit.MaxPerm 2}} + + + + + + + {{end}} + {{end}} + +
    {{ctx.Locale.Tr "units.unit"}}{{ctx.Locale.Tr "org.teams.none_access"}}{{ctx.Locale.Tr "org.teams.read_access"}}{{ctx.Locale.Tr "org.teams.write_access"}}
    + + + + + + + +
    +
    + {{range $t, $unit := $.Units}} + {{if lt $unit.MaxPerm 2}} + + {{end}} + {{end}} +
    +
    +
    + {{end}} + +
    + {{if .PageIsOrgTeamsNew}} + + {{else}} + + {{if not (eq .Team.LowerName "owners")}} + + {{end}} + {{end}} +
    +
    +
    +
    +
    +
    +
    + + +{{template "base/footer" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl new file mode 100644 index 0000000..f5d68ce --- /dev/null +++ b/templates/org/team/repositories.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} +
    + {{template "org/team/sidebar" .}} +
    + {{template "org/team/navbar" .}} + {{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}} + {{if $canAddRemove}} +
    +
    + {{.CsrfTokenHtml}} + + +
    +
    + + +
    +
    + {{end}} +
    +
    + {{range .Team.Repos}} +
    +
    + {{template "repo/icon" .}} +
    + +
    + {{if $canAddRemove}} +
    + {{$.CsrfTokenHtml}} + +
    + {{end}} +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "org.teams.repos.none"}} +
    + {{end}} +
    +
    +
    +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl new file mode 100644 index 0000000..c9f8025 --- /dev/null +++ b/templates/org/team/sidebar.tmpl @@ -0,0 +1,94 @@ +
    +

    + {{.Team.Name}} +
    + {{if .Team.IsMember ctx $.SignedUser.ID}} +
    + +
    + {{else if .IsOrganizationOwner}} +
    + {{$.CsrfTokenHtml}} + + +
    + {{end}} +
    +

    +
    +
    + {{if .Team.Description}} + {{.Team.Description}} + {{else}} + {{ctx.Locale.Tr "org.teams.no_desc"}} + {{end}} +
    + {{if eq .Team.LowerName "owners"}} +
    + {{ctx.Locale.Tr "org.teams.owners_permission_desc"}} +
    + {{else}} +
    +

    {{ctx.Locale.Tr "org.team_access_desc"}}

    +
      + {{if .Team.IncludesAllRepositories}} +
    • {{ctx.Locale.Tr "org.teams.all_repositories"}}
    • + {{else}} +
    • {{ctx.Locale.Tr "org.teams.specific_repositories"}}
    • + {{end}} + {{if .Team.CanCreateOrgRepo}} +
    • {{ctx.Locale.Tr "org.teams.can_create_org_repo"}}
    • + {{end}} +
    + {{if (eq .Team.AccessMode 2)}} +

    {{ctx.Locale.Tr "org.settings.permission"}}

    + {{ctx.Locale.Tr "org.teams.write_permission_desc"}} + {{else if (eq .Team.AccessMode 3)}} +

    {{ctx.Locale.Tr "org.settings.permission"}}

    + {{ctx.Locale.Tr "org.teams.admin_permission_desc"}} + {{else}} + + + + + + + + + {{range $t, $unit := $.Units}} + {{if (not $unit.Type.UnitGlobalDisabled)}} + + + + + {{end}} + {{end}} + +
    {{ctx.Locale.Tr "units.unit"}}{{ctx.Locale.Tr "org.team_permission_desc"}}
    {{ctx.Locale.Tr $unit.NameKey}}{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}} + {{ctx.Locale.Tr "org.teams.none_access"}} + {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}} + {{ctx.Locale.Tr "org.teams.read_access"}} + {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}} + {{ctx.Locale.Tr "org.teams.write_access"}} + {{- end}}
    + {{end}} +
    + {{end}} +
    + {{if .IsOrganizationOwner}} + + {{end}} +
    + diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl new file mode 100644 index 0000000..53c909e --- /dev/null +++ b/templates/org/team/teams.tmpl @@ -0,0 +1,56 @@ +{{template "base/head" .}} +
    + {{template "org/header" .}} +
    + {{template "base/alert" .}} + {{if .IsOrganizationOwner}} + +
    + {{end}} + +
    + {{range .Teams}} +
    +
    + {{.Name}} +
    + {{ctx.Locale.Tr "view"}} + {{if .IsMember ctx $.SignedUser.ID}} +
    + +
    + {{else if $.IsOrganizationOwner}} +
    + {{$.CsrfTokenHtml}} + +
    + {{end}} +
    +
    +
    + {{range .Members}} + {{template "shared/user/avatarlink" dict "user" .}} + {{end}} +
    + +
    + {{end}} +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/package/content/alpine.tmpl b/templates/package/content/alpine.tmpl new file mode 100644 index 0000000..8914006 --- /dev/null +++ b/templates/package/content/alpine.tmpl @@ -0,0 +1,52 @@ +{{if eq .PackageDescriptor.Package.Type "alpine"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    /$branch/$repository
    +

    {{ctx.Locale.Tr "packages.alpine.registry.info"}}

    +
    +
    + +
    curl -JO 
    +
    +
    + +
    +
    sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
    +
    +
    +
    + +
    +
    +
    + +

    {{ctx.Locale.Tr "packages.alpine.repository"}}

    +
    + + + + + + + + + + + + + + + +
    {{ctx.Locale.Tr "packages.alpine.repository.branches"}}
    {{StringUtils.Join .Branches ", "}}
    {{ctx.Locale.Tr "packages.alpine.repository.repositories"}}
    {{StringUtils.Join .Repositories ", "}}
    {{ctx.Locale.Tr "packages.alpine.repository.architectures"}}
    {{StringUtils.Join .Architectures ", "}}
    +
    + + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{.PackageDescriptor.Metadata.Description}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/arch.tmpl b/templates/package/content/arch.tmpl new file mode 100644 index 0000000..6138b1d --- /dev/null +++ b/templates/package/content/arch.tmpl @@ -0,0 +1,143 @@ +{{if eq .PackageDescriptor.Package.Type "arch"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    +
    wget -O sign.gpg 
    +pacman-key --add sign.gpg
    +pacman-key --lsign-key '{{$.SignMail}}'
    +
    +
    +
    + +
    +
    
    +{{- if gt (len $.Groups) 1 -}}
    +# {{ctx.Locale.Tr "packages.arch.pacman.repo.multi" $.PackageDescriptor.Package.LowerName}}
    +
    +{{end -}}
    +{{- $GroupSize := (len .Groups) -}}
    +{{-  range $i,$v := .Groups -}}
    +{{- if gt $i 0}}
    +{{end -}}{{- if gt $GroupSize 1 -}}
    +# {{ctx.Locale.Tr "packages.arch.pacman.repo.multi.item" .}}
    +{{end -}}
    +[{{$.PackageDescriptor.Owner.LowerName}}.{{$.RegistryHost}}]
    +SigLevel = Required
    +Server = 
    +{{end -}}
    +
    +
    +
    +
    + +
    +
    pacman -Sy {{.PackageDescriptor.Package.LowerName}}
    +
    +
    +
    + +
    +
    +
    + +

    {{ctx.Locale.Tr "packages.arch.version.properties"}}

    +
    + + + + + + + + {{if .PackageDescriptor.Metadata.Groups}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Provides}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Depends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.OptDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.MakeDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.CheckDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Conflicts}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Replaces}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Backup}} + + + + + {{end}} + +
    +
    {{ctx.Locale.Tr "packages.arch.version.description"}}
    +
    {{.PackageDescriptor.Metadata.Description}}
    +
    {{ctx.Locale.Tr "packages.arch.version.groups"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Groups ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.provides"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Provides ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.depends"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Depends ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.optdepends"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.OptDepends ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.makedepends"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.MakeDepends ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.checkdepends"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.CheckDepends ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.conflicts"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Conflicts ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.replaces"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Replaces ", "}}
    +
    {{ctx.Locale.Tr "packages.arch.version.backup"}}
    +
    {{StringUtils.Join $.PackageDescriptor.Metadata.Backup ", "}}
    +
    + +{{end}} diff --git a/templates/package/content/cargo.tmpl b/templates/package/content/cargo.tmpl new file mode 100644 index 0000000..2f14945 --- /dev/null +++ b/templates/package/content/cargo.tmpl @@ -0,0 +1,63 @@ +{{if eq .PackageDescriptor.Package.Type "cargo"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    [registry]
    +default = "forgejo"
    +
    +[registries.forgejo]
    +index = "sparse+" # Sparse index
    +# index = "" # Git
    +
    +[net]
    +git-fetch-with-cli = true
    +
    +
    + +
    cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

    {{ctx.Locale.Tr "packages.about"}}

    + {{if .PackageDescriptor.Metadata.Description}}
    {{.PackageDescriptor.Metadata.Description}}
    {{end}} + {{if .PackageDescriptor.Metadata.Readme}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
    {{end}} + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + + + + + + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{.Name}}{{.Req}}
    +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/chef.tmpl b/templates/package/content/chef.tmpl new file mode 100644 index 0000000..d39164b --- /dev/null +++ b/templates/package/content/chef.tmpl @@ -0,0 +1,48 @@ +{{if eq .PackageDescriptor.Package.Type "chef"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    knife[:supermarket_site] = ''
    +
    +
    + +
    knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Description}}

    {{.PackageDescriptor.Metadata.Description}}

    {{end}} + {{if .PackageDescriptor.Metadata.LongDescription}}{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}{{end}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + + + + + + + {{range $dependency, $version := .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{$dependency}}{{$version}}
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/composer.tmpl b/templates/package/content/composer.tmpl new file mode 100644 index 0000000..73ab3ac --- /dev/null +++ b/templates/package/content/composer.tmpl @@ -0,0 +1,50 @@ +{{if eq .PackageDescriptor.Package.Type "composer"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    {
    +	"repositories": [{
    +			"type": "composer",
    +			"url": ""
    +		}
    +	]
    +}
    +
    +
    + +
    composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Comments}} +

    {{ctx.Locale.Tr "packages.about"}}

    + {{if .PackageDescriptor.Metadata.Description}}
    {{.PackageDescriptor.Metadata.Description}}
    {{end}} + {{if .PackageDescriptor.Metadata.Readme}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
    {{end}} + {{if .PackageDescriptor.Metadata.Comments}}
    {{StringUtils.Join .PackageDescriptor.Metadata.Comments " "}}
    {{end}} + {{end}} + + {{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    +
    + {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}} + {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}} +
    +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/composer_dependencies.tmpl b/templates/package/content/composer_dependencies.tmpl new file mode 100644 index 0000000..dba4575 --- /dev/null +++ b/templates/package/content/composer_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

    {{.title}}

    + + + + + + + + + {{range $dependency, $version := .dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{$dependency}}{{$version}}
    +{{end}} diff --git a/templates/package/content/conan.tmpl b/templates/package/content/conan.tmpl new file mode 100644 index 0000000..8ebc258 --- /dev/null +++ b/templates/package/content/conan.tmpl @@ -0,0 +1,34 @@ +{{if eq .PackageDescriptor.Package.Type "conan"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    conan remote add forgejo 
    +
    +
    + +
    conan install --remote=forgejo {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    + + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} +
    + {{end}} + + {{if or .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/conda.tmpl b/templates/package/content/conda.tmpl new file mode 100644 index 0000000..5ff7944 --- /dev/null +++ b/templates/package/content/conda.tmpl @@ -0,0 +1,30 @@ +{{if eq .PackageDescriptor.Package.Type "conda"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    channel_alias: 
    +channels:
    +  - 
    +default_channels:
    +  - 
    +
    +
    + + {{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}} +
    conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl new file mode 100644 index 0000000..b5fdcfe --- /dev/null +++ b/templates/package/content/container.tmpl @@ -0,0 +1,90 @@ +{{if eq .PackageDescriptor.Package.Type "container"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + + {{if eq .PackageDescriptor.Metadata.Type "helm"}} +
    helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}
    + {{else}} + {{$separator := ":"}} + {{if not .PackageDescriptor.Metadata.IsTagged}} + {{$separator = "@"}} + {{end}} +
    docker pull {{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}}{{$separator}}{{.PackageDescriptor.Version.LowerVersion}}
    + {{end}} +
    +
    + +
    {{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}
    +
    +
    + +
    +
    +
    + {{if .PackageDescriptor.Metadata.Manifests}} +

    {{ctx.Locale.Tr "packages.container.multi_arch"}}

    +
    + + + + + + + + + + {{range .PackageDescriptor.Metadata.Manifests}} + + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.container.digest"}}{{ctx.Locale.Tr "packages.container.multi_arch"}}{{ctx.Locale.Tr "admin.packages.size"}}
    {{.Digest}}{{.Platform}}{{ctx.Locale.TrSize .Size}}
    +
    + {{end}} + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{.PackageDescriptor.Metadata.Description}} +
    + {{end}} + {{if .PackageDescriptor.Metadata.ImageLayers}} +

    {{ctx.Locale.Tr "packages.container.layers"}}

    +
    + + + {{range .PackageDescriptor.Metadata.ImageLayers}} + + + + {{end}} + +
    {{.}}
    +
    + {{end}} + {{if .PackageDescriptor.Metadata.Labels}} +

    {{ctx.Locale.Tr "packages.container.labels"}}

    +
    + + + + + + + + + {{range $key, $value := .PackageDescriptor.Metadata.Labels}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.container.labels.key"}}{{ctx.Locale.Tr "packages.container.labels.value"}}
    {{$key}}{{$value}}
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/cran.tmpl b/templates/package/content/cran.tmpl new file mode 100644 index 0000000..df7a48c --- /dev/null +++ b/templates/package/content/cran.tmpl @@ -0,0 +1,59 @@ +{{if eq .PackageDescriptor.Package.Type "cran"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    options("repos" = c(getOption("repos"), c(forgejo="")))
    +
    +
    + +
    install.packages("{{.PackageDescriptor.Package.Name}}")
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}} +
    + {{end}} + + {{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + {{if .PackageDescriptor.Metadata.Imports}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.Depends}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.LinkingTo}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.Suggests}} + + + + + {{end}} + +
    Imports{{StringUtils.Join .PackageDescriptor.Metadata.Imports ", "}}
    Depends{{StringUtils.Join .PackageDescriptor.Metadata.Depends ", "}}
    LinkingTo{{StringUtils.Join .PackageDescriptor.Metadata.LinkingTo ", "}}
    Suggests{{StringUtils.Join .PackageDescriptor.Metadata.Suggests ", "}}
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/debian.tmpl b/templates/package/content/debian.tmpl new file mode 100644 index 0000000..782ac1c --- /dev/null +++ b/templates/package/content/debian.tmpl @@ -0,0 +1,65 @@ +{{if eq .PackageDescriptor.Package.Type "debian"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    sudo curl  -o /etc/apt/keyrings/forgejo-{{$.PackageDescriptor.Owner.Name}}.asc
    +echo "deb [signed-by=/etc/apt/keyrings/forgejo-{{$.PackageDescriptor.Owner.Name}}.asc]  $distribution $component" | sudo tee -a /etc/apt/sources.list.d/forgejo.list
    +sudo apt update
    +

    {{ctx.Locale.Tr "packages.debian.registry.info"}}

    +
    +
    + +
    +
    sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
    +
    +
    +
    + +
    +
    +
    + +

    {{ctx.Locale.Tr "packages.debian.repository"}}

    +
    + + + + + + + + + + + + + + + +
    {{ctx.Locale.Tr "packages.debian.repository.distributions"}}
    {{StringUtils.Join .Distributions ", "}}
    {{ctx.Locale.Tr "packages.debian.repository.components"}}
    {{StringUtils.Join .Components ", "}}
    {{ctx.Locale.Tr "packages.debian.repository.architectures"}}
    {{StringUtils.Join .Architectures ", "}}
    +
    + + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{.PackageDescriptor.Metadata.Description}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + {{end}} + +
    {{.}}
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl new file mode 100644 index 0000000..4ebfb91 --- /dev/null +++ b/templates/package/content/generic.tmpl @@ -0,0 +1,18 @@ +{{if eq .PackageDescriptor.Package.Type "generic"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    
    +{{- range .PackageDescriptor.Files -}}
    +curl -OJ 
    +{{end -}}
    +				
    +
    +
    + +
    +
    +
    +{{end}} diff --git a/templates/package/content/go.tmpl b/templates/package/content/go.tmpl new file mode 100644 index 0000000..5e32ea7 --- /dev/null +++ b/templates/package/content/go.tmpl @@ -0,0 +1,14 @@ +{{if eq .PackageDescriptor.Package.Type "go"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    GOPROXY= go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}
    +
    +
    + +
    +
    +
    +{{end}} diff --git a/templates/package/content/helm.tmpl b/templates/package/content/helm.tmpl new file mode 100644 index 0000000..9d85555 --- /dev/null +++ b/templates/package/content/helm.tmpl @@ -0,0 +1,57 @@ +{{if eq .PackageDescriptor.Package.Type "helm"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    helm repo add {{AppDomain}} 
    +helm repo update
    +
    +
    + +
    helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}
    +
    +
    + +
    +
    +
    + + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{.PackageDescriptor.Metadata.Description}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + + + + + + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{.Name}}{{.Version}}
    +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl new file mode 100644 index 0000000..7f7e3fa --- /dev/null +++ b/templates/package/content/maven.tmpl @@ -0,0 +1,75 @@ +{{if eq .PackageDescriptor.Package.Type "maven"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    <repositories>
    +	<repository>
    +		<id>gitea</id>
    +		<url></url>
    +	</repository>
    +</repositories>
    +
    +<distributionManagement>
    +	<repository>
    +		<id>gitea</id>
    +		<url></url>
    +	</repository>
    +
    +	<snapshotRepository>
    +		<id>gitea</id>
    +		<url></url>
    +	</snapshotRepository>
    +</distributionManagement>
    +
    + {{if .PackageDescriptor.Metadata}} +
    + +
    <dependency>
    +	<groupId>{{.PackageDescriptor.Metadata.GroupID}}</groupId>
    +	<artifactId>{{.PackageDescriptor.Metadata.ArtifactID}}</artifactId>
    +	<version>{{.PackageDescriptor.Version.Version}}</version>
    +</dependency>
    +
    +
    + +
    mvn install
    +
    +
    + +
    mvn dependency:get -DremoteRepositories= -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    + {{end}} +
    +
    + + {{if .PackageDescriptor.Metadata}} + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{.PackageDescriptor.Metadata.Description}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    +
    + {{range .PackageDescriptor.Metadata.Dependencies}} +
    + {{svg "octicon-package-dependencies" 16 ""}} +
    +
    {{.GroupID}}:{{.ArtifactID}}
    +
    {{.Version}}
    +
    +
    + {{end}} +
    +
    + {{end}} + {{end}} +{{end}} diff --git a/templates/package/content/npm.tmpl b/templates/package/content/npm.tmpl new file mode 100644 index 0000000..1ffbd19 --- /dev/null +++ b/templates/package/content/npm.tmpl @@ -0,0 +1,65 @@ +{{if eq .PackageDescriptor.Package.Type "npm"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    {{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=
    +
    +
    + +
    npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
    +
    +
    + +
    "{{.PackageDescriptor.Package.Name}}": "{{.PackageDescriptor.Version.Version}}"
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Readme}} +
    + {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}} +
    + {{else if .PackageDescriptor.Metadata.Description}} + {{.PackageDescriptor.Metadata.Description}} + {{end}} +
    + {{end}} + + {{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    +
    + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (ctx.Locale.Tr "packages.npm.dependencies")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.development")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.peer")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.optional")}} +
    +
    + {{end}} + + {{if .PackageDescriptor.Metadata.BundleDependencies}} +

    {{ctx.Locale.Tr "packages.npm.dependencies.bundle"}}

    +
    + {{range .PackageDescriptor.Metadata.BundleDependencies}} + {{.}} + {{end}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/npm_dependencies.tmpl b/templates/package/content/npm_dependencies.tmpl new file mode 100644 index 0000000..dba4575 --- /dev/null +++ b/templates/package/content/npm_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

    {{.title}}

    + + + + + + + + + {{range $dependency, $version := .dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{$dependency}}{{$version}}
    +{{end}} diff --git a/templates/package/content/nuget.tmpl b/templates/package/content/nuget.tmpl new file mode 100644 index 0000000..ea665c7 --- /dev/null +++ b/templates/package/content/nuget.tmpl @@ -0,0 +1,51 @@ +{{if eq .PackageDescriptor.Package.Type "nuget"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token 
    +
    +
    + +
    dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}
    +
    +
    + +
    +
    +
    + + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes .PackageDescriptor.Metadata.Readme}} +

    {{ctx.Locale.Tr "packages.about"}}

    + {{if .PackageDescriptor.Metadata.Description}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Description}}
    {{end}} + {{if .PackageDescriptor.Metadata.Readme}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
    {{end}} + {{if .PackageDescriptor.Metadata.ReleaseNotes}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.ReleaseNotes}}
    {{end}} + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    + + + + + + + + + + {{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}} + {{range $dependencies}} + + + + + + {{end}} + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}
    {{.ID}}{{.Version}}{{$framework}}
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/pub.tmpl b/templates/package/content/pub.tmpl new file mode 100644 index 0000000..8448b97 --- /dev/null +++ b/templates/package/content/pub.tmpl @@ -0,0 +1,19 @@ +{{if eq .PackageDescriptor.Package.Type "pub"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=
    +
    +
    + +
    +
    +
    + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

    {{ctx.Locale.Tr "packages.about"}}

    + {{if .PackageDescriptor.Metadata.Description}}
    {{.PackageDescriptor.Metadata.Description}}
    {{end}} + {{if .PackageDescriptor.Metadata.Readme}}
    {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
    {{end}} + {{end}} +{{end}} diff --git a/templates/package/content/pypi.tmpl b/templates/package/content/pypi.tmpl new file mode 100644 index 0000000..6addac3 --- /dev/null +++ b/templates/package/content/pypi.tmpl @@ -0,0 +1,31 @@ +{{if eq .PackageDescriptor.Package.Type "pypi"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    pip install --index-url  {{.PackageDescriptor.Package.Name}}
    +
    +
    + +
    +
    +
    + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    +

    {{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}

    + {{if .PackageDescriptor.Metadata.LongDescription}} + {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}} + {{else if .PackageDescriptor.Metadata.Description}} + {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Description}} + {{end}} +
    + {{end}} + {{if .PackageDescriptor.Metadata.RequiresPython}} +

    {{ctx.Locale.Tr "packages.requirements"}}

    +
    + {{ctx.Locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/rpm.tmpl b/templates/package/content/rpm.tmpl new file mode 100644 index 0000000..f5d5662 --- /dev/null +++ b/templates/package/content/rpm.tmpl @@ -0,0 +1,56 @@ +{{if eq .PackageDescriptor.Package.Type "rpm"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    {{- if gt (len .Groups) 1 -}}
    +# {{ctx.Locale.Tr "packages.rpm.repository.multiple_groups"}}
    +
    +{{end -}}
    +# {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
    +{{- range $group := .Groups}}
    +	{{- if $group}}{{$group = print "/" $group}}{{end}}
    +dnf config-manager --add-repo 
    +{{- end}}
    +
    +# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
    +{{- range $group := .Groups}}
    +	{{- if $group}}{{$group = print "/" $group}}{{end}}
    +zypper addrepo 
    +{{- end}}
    +
    +
    + +
    +
    # {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
    +dnf install {{$.PackageDescriptor.Package.Name}}
    +
    +# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
    +zypper install {{$.PackageDescriptor.Package.Name}}
    +
    +
    +
    + +
    +
    +
    + +

    {{ctx.Locale.Tr "packages.rpm.repository"}}

    +
    + + + + + + + +
    {{ctx.Locale.Tr "packages.rpm.repository.architectures"}}
    {{StringUtils.Join .Architectures ", "}}
    +
    + + {{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    + {{if .PackageDescriptor.Metadata.Summary}}
    {{.PackageDescriptor.Metadata.Summary}}
    {{end}} + {{if .PackageDescriptor.Metadata.Description}}
    {{.PackageDescriptor.Metadata.Description}}
    {{end}} + {{end}} +{{end}} diff --git a/templates/package/content/rubygems.tmpl b/templates/package/content/rubygems.tmpl new file mode 100644 index 0000000..009fd70 --- /dev/null +++ b/templates/package/content/rubygems.tmpl @@ -0,0 +1,40 @@ +{{if eq .PackageDescriptor.Package.Type "rubygems"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source ""
    +
    +
    + +
    source "" do
    +	gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
    +end
    +
    +
    + +
    +
    +
    + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    {{.PackageDescriptor.Metadata.Description}}
    + {{end}} + {{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}} +

    {{ctx.Locale.Tr "packages.requirements"}}

    +
    + {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}

    {{ctx.Locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

    {{end}} + {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}

    {{ctx.Locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

    {{end}} +
    + {{end}} + {{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}} +

    {{ctx.Locale.Tr "packages.dependencies"}}

    +
    +
    + {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.runtime")}} + {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.development")}} +
    +
    + {{end}} +{{end}} diff --git a/templates/package/content/rubygems_dependencies.tmpl b/templates/package/content/rubygems_dependencies.tmpl new file mode 100644 index 0000000..2c42dce --- /dev/null +++ b/templates/package/content/rubygems_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

    {{.title}}

    + + + + + + + + + {{range .dependencies}} + + + + + {{end}} + +
    {{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
    {{.Name}}{{range $i, $v := .Version}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}
    +{{end}} diff --git a/templates/package/content/swift.tmpl b/templates/package/content/swift.tmpl new file mode 100644 index 0000000..68db444 --- /dev/null +++ b/templates/package/content/swift.tmpl @@ -0,0 +1,40 @@ +{{if eq .PackageDescriptor.Package.Type "swift"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    swift package-registry set 
    +
    +
    + +
    dependencies: [
    +	.package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}")
    +]
    +
    +
    + +
    swift package resolve
    +
    +
    + +
    +
    +
    + + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    + {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} +
    + {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

    {{ctx.Locale.Tr "packages.keywords"}}

    +
    + {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
    + {{end}} +{{end}} diff --git a/templates/package/content/vagrant.tmpl b/templates/package/content/vagrant.tmpl new file mode 100644 index 0000000..4dc3e62 --- /dev/null +++ b/templates/package/content/vagrant.tmpl @@ -0,0 +1,18 @@ +{{if eq .PackageDescriptor.Package.Type "vagrant"}} +

    {{ctx.Locale.Tr "packages.installation"}}

    +
    +
    +
    + +
    vagrant box add --box-version {{.PackageDescriptor.Version.Version}} ""
    +
    +
    + +
    +
    +
    + {{if .PackageDescriptor.Metadata.Description}} +

    {{ctx.Locale.Tr "packages.about"}}

    +
    {{.PackageDescriptor.Metadata.Description}}
    + {{end}} +{{end}} diff --git a/templates/package/metadata/alpine.tmpl b/templates/package/metadata/alpine.tmpl new file mode 100644 index 0000000..3e7f10f --- /dev/null +++ b/templates/package/metadata/alpine.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "alpine"}} + {{if .PackageDescriptor.Metadata.Maintainer}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/arch.tmpl b/templates/package/metadata/arch.tmpl new file mode 100644 index 0000000..89001b9 --- /dev/null +++ b/templates/package/metadata/arch.tmpl @@ -0,0 +1,4 @@ +{{if eq .PackageDescriptor.Package.Type "arch"}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/cargo.tmpl b/templates/package/metadata/cargo.tmpl new file mode 100644 index 0000000..5ad3c20 --- /dev/null +++ b/templates/package/metadata/cargo.tmpl @@ -0,0 +1,7 @@ +{{if eq .PackageDescriptor.Package.Type "cargo"}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/chef.tmpl b/templates/package/metadata/chef.tmpl new file mode 100644 index 0000000..23a9ce3 --- /dev/null +++ b/templates/package/metadata/chef.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "chef"}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/composer.tmpl b/templates/package/metadata/composer.tmpl new file mode 100644 index 0000000..0f6ff9d --- /dev/null +++ b/templates/package/metadata/composer.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "composer"}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.Name}}
    {{end}} + {{if .PackageDescriptor.Metadata.Homepage}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/conan.tmpl b/templates/package/metadata/conan.tmpl new file mode 100644 index 0000000..4e05ec2 --- /dev/null +++ b/templates/package/metadata/conan.tmpl @@ -0,0 +1,6 @@ +{{if eq .PackageDescriptor.Package.Type "conan"}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/conda.tmpl b/templates/package/metadata/conda.tmpl new file mode 100644 index 0000000..3628686 --- /dev/null +++ b/templates/package/metadata/conda.tmpl @@ -0,0 +1,6 @@ +{{if eq .PackageDescriptor.Package.Type "conda"}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/container.tmpl b/templates/package/metadata/container.tmpl new file mode 100644 index 0000000..f5abb7e --- /dev/null +++ b/templates/package/metadata/container.tmpl @@ -0,0 +1,9 @@ +{{if eq .PackageDescriptor.Package.Type "container"}} +
    {{svg "octicon-package" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Type.Name}}
    + {{if .PackageDescriptor.Metadata.Platform}}
    {{svg "octicon-cpu" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Platform}}
    {{end}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.}}
    {{end}} + {{if .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Licenses}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/cran.tmpl b/templates/package/metadata/cran.tmpl new file mode 100644 index 0000000..1d5a11e --- /dev/null +++ b/templates/package/metadata/cran.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "cran"}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.}}
    {{end}} + {{range .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/debian.tmpl b/templates/package/metadata/debian.tmpl new file mode 100644 index 0000000..3cd845c --- /dev/null +++ b/templates/package/metadata/debian.tmpl @@ -0,0 +1,4 @@ +{{if eq .PackageDescriptor.Package.Type "debian"}} + {{if .PackageDescriptor.Metadata.Maintainer}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/generic.tmpl b/templates/package/metadata/generic.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/package/metadata/helm.tmpl b/templates/package/metadata/helm.tmpl new file mode 100644 index 0000000..50ea484 --- /dev/null +++ b/templates/package/metadata/helm.tmpl @@ -0,0 +1,4 @@ +{{if eq .PackageDescriptor.Package.Type "helm"}} + {{range .PackageDescriptor.Metadata.Maintainers}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.Name}}
    {{end}} + {{if .PackageDescriptor.Metadata.Home}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/maven.tmpl b/templates/package/metadata/maven.tmpl new file mode 100644 index 0000000..62573a1 --- /dev/null +++ b/templates/package/metadata/maven.tmpl @@ -0,0 +1,5 @@ +{{if and (eq .PackageDescriptor.Package.Type "maven") .PackageDescriptor.Metadata}} + {{if .PackageDescriptor.Metadata.Name}}
    {{svg "octicon-note" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Name}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/npm.tmpl b/templates/package/metadata/npm.tmpl new file mode 100644 index 0000000..df37504 --- /dev/null +++ b/templates/package/metadata/npm.tmpl @@ -0,0 +1,8 @@ +{{if eq .PackageDescriptor.Package.Type "npm"}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{range .PackageDescriptor.VersionProperties}} + {{if eq .Name "npm.tag"}}
    {{svg "octicon-versions" 16 "tw-mr-2"}} {{.Value}}
    {{end}} + {{end}} +{{end}} diff --git a/templates/package/metadata/nuget.tmpl b/templates/package/metadata/nuget.tmpl new file mode 100644 index 0000000..5534577 --- /dev/null +++ b/templates/package/metadata/nuget.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "nuget"}} + {{if .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Authors}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/pub.tmpl b/templates/package/metadata/pub.tmpl new file mode 100644 index 0000000..16f7cec --- /dev/null +++ b/templates/package/metadata/pub.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "pub"}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/pypi.tmpl b/templates/package/metadata/pypi.tmpl new file mode 100644 index 0000000..3d9b213 --- /dev/null +++ b/templates/package/metadata/pypi.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "pypi"}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/rpm.tmpl b/templates/package/metadata/rpm.tmpl new file mode 100644 index 0000000..eda8a48 --- /dev/null +++ b/templates/package/metadata/rpm.tmpl @@ -0,0 +1,4 @@ +{{if eq .PackageDescriptor.Package.Type "rpm"}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/rubygems.tmpl b/templates/package/metadata/rubygems.tmpl new file mode 100644 index 0000000..9b11287 --- /dev/null +++ b/templates/package/metadata/rubygems.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "rubygems"}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "tw-mr-2"}} {{.}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/swift.tmpl b/templates/package/metadata/swift.tmpl new file mode 100644 index 0000000..fdffb6d --- /dev/null +++ b/templates/package/metadata/swift.tmpl @@ -0,0 +1,4 @@ +{{if eq .PackageDescriptor.Package.Type "swift"}} + {{if .PackageDescriptor.Metadata.Author.String}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} +{{end}} diff --git a/templates/package/metadata/vagrant.tmpl b/templates/package/metadata/vagrant.tmpl new file mode 100644 index 0000000..4628a2d --- /dev/null +++ b/templates/package/metadata/vagrant.tmpl @@ -0,0 +1,5 @@ +{{if eq .PackageDescriptor.Package.Type "vagrant"}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "tw-mr-2"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
    {{end}} +{{end}} diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl new file mode 100644 index 0000000..4b87734 --- /dev/null +++ b/templates/package/settings.tmpl @@ -0,0 +1,77 @@ +{{template "base/head" .}} +
    + {{if .ContextUser.IsOrganization}} + {{template "org/header" .}} + {{else}} + {{template "shared/user/org_profile_avatar" .}} + {{end}} +
    + {{if not .ContextUser.IsOrganization}} + {{template "user/overview/header" .}} + {{end}} + {{template "base/alert" .}} +

    {{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}}) / {{ctx.Locale.Tr "repo.settings"}}

    +

    + {{ctx.Locale.Tr "packages.settings.link"}} +

    +
    +

    {{ctx.Locale.Tr "packages.settings.link.description"}}

    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
    + +
    +
    + +
    +
    +
    +

    + {{ctx.Locale.Tr "repo.settings.danger_zone"}} +

    +
    +
    +
    +
    +
    {{ctx.Locale.Tr "packages.settings.delete"}}
    +
    {{ctx.Locale.Tr "packages.settings.delete.description"}}
    +
    +
    + +
    + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/package/shared/cargo.tmpl b/templates/package/shared/cargo.tmpl new file mode 100644 index 0000000..5b0f639 --- /dev/null +++ b/templates/package/shared/cargo.tmpl @@ -0,0 +1,27 @@ +

    + {{ctx.Locale.Tr "packages.owner.settings.cargo.title"}} +

    +
    +
    + {{if .CargoIndexExists}} +
    + +
    +
    + {{.CsrfTokenHtml}} + +
    + {{else}} +
    + +
    +
    + {{.CsrfTokenHtml}} + +
    + {{end}} +
    + +
    +
    +
    diff --git a/templates/package/shared/cleanup_rules/edit.tmpl b/templates/package/shared/cleanup_rules/edit.tmpl new file mode 100644 index 0000000..138a907 --- /dev/null +++ b/templates/package/shared/cleanup_rules/edit.tmpl @@ -0,0 +1,73 @@ +

    {{if .IsEditRule}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.edit"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.add"}}{{end}}

    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.title"}}

    +
    + + +
    +
    + + +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern.container"}}

    +
    +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.title"}}

    +
    + + +
    +
    + + +
    +
    + {{if .IsEditRule}} + + + {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}} + {{else}} + + {{end}} +
    +
    +
    diff --git a/templates/package/shared/cleanup_rules/list.tmpl b/templates/package/shared/cleanup_rules/list.tmpl new file mode 100644 index 0000000..ba1683b --- /dev/null +++ b/templates/package/shared/cleanup_rules/list.tmpl @@ -0,0 +1,56 @@ +

    + {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.title"}} + +

    +
    +
    + {{range .CleanupRules}} +
    +
    + {{svg .Type.SVGName 32}} +
    +
    + +
    +

    {{if .Enabled}}{{ctx.Locale.Tr "enabled"}}{{else}}{{ctx.Locale.Tr "disabled"}}{{end}}

    +
    + {{if .KeepCount}} +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:

    {{if eq .KeepCount 1}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}} +
    + {{end}} + {{if .KeepPattern}} +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:

    {{StringUtils.EllipsisString .KeepPattern 100}} +
    + {{end}} + {{if .RemoveDays}} +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:

    {{ctx.Locale.Tr "tool.days" .RemoveDays}} +
    + {{end}} + {{if .RemovePattern}} +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:

    {{StringUtils.EllipsisString .RemovePattern 100}} +
    + {{end}} +
    + +
    + {{else}} +
    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}
    + {{end}} +
    +
    diff --git a/templates/package/shared/cleanup_rules/preview.tmpl b/templates/package/shared/cleanup_rules/preview.tmpl new file mode 100644 index 0000000..0d9c4b0 --- /dev/null +++ b/templates/package/shared/cleanup_rules/preview.tmpl @@ -0,0 +1,34 @@ +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}

    +
    +

    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.overview" (len .VersionsToRemove)}}

    +
    +
    + + + + + + + + + + + + + {{range .VersionsToRemove}} + + + + + + + + + {{else}} + + + + {{end}} + +
    {{ctx.Locale.Tr "admin.packages.type"}}{{ctx.Locale.Tr "admin.packages.name"}}{{ctx.Locale.Tr "admin.packages.version"}}{{ctx.Locale.Tr "admin.packages.creator"}}{{ctx.Locale.Tr "admin.packages.size"}}{{ctx.Locale.Tr "admin.packages.published"}}
    {{.Package.Type.Name}}{{.Package.Name}}{{.Version.Version}}{{.Creator.Name}}{{ctx.Locale.TrSize .CalculateBlobSize}}{{DateTime "short" .Version.CreatedUnix}}
    {{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.none"}}
    +
    diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl new file mode 100644 index 0000000..36f8bc1 --- /dev/null +++ b/templates/package/shared/list.tmpl @@ -0,0 +1,57 @@ +{{template "base/alert" .}} +{{if .HasPackages}} +
    +
    + {{template "shared/search/input" dict "Value" .Query "Placeholder" (ctx.Locale.Tr "search.package_kind")}} + + {{template "shared/search/button"}} +
    +
    +{{end}} +
    + {{range .PackageDescriptors}} +
    +
    +
    +
    + {{.Package.Name}} + {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}} +
    +
    + {{$timeStr := TimeSinceUnix .Version.CreatedUnix ctx.Locale}} + {{$hasRepositoryAccess := false}} + {{if .Repository}} + {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} + {{end}} + {{if $hasRepositoryAccess}} + {{ctx.Locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink .Creator.GetDisplayName .Repository.Link .Repository.FullName}} + {{else}} + {{ctx.Locale.Tr "packages.published_by" $timeStr .Creator.HomeLink .Creator.GetDisplayName}} + {{end}} +
    +
    +
    +
    + {{else}} + {{if not .HasPackages}} +
    + {{svg "octicon-package" 48}} +

    {{ctx.Locale.Tr "packages.empty"}}

    + {{if and .Repository .CanWritePackages}} + {{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} +

    {{ctx.Locale.Tr "packages.empty.repo" $packagesUrl}}

    + {{end}} +

    {{ctx.Locale.Tr "packages.empty.documentation" "https://forgejo.org/docs/latest/user/packages/"}}

    +
    + {{else}} +

    {{ctx.Locale.Tr "packages.filter.no_result"}}

    + {{end}} + {{end}} + {{template "base/paginate" .}} +
    diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl new file mode 100644 index 0000000..e5c568e --- /dev/null +++ b/templates/package/shared/versionlist.tmpl @@ -0,0 +1,37 @@ +

    {{.PackageDescriptor.Package.Name}} / {{ctx.Locale.Tr "packages.versions"}}

    +
    +
    + {{template "shared/search/input" dict "Value" .Query "Placeholder" (ctx.Locale.Tr "search.package_kind")}} + + {{if eq .PackageDescriptor.Package.Type "container"}} + + {{end}} + {{template "shared/search/button"}} +
    +
    +
    + {{range .PackageDescriptors}} +
    +
    +
    + {{.Version.LowerVersion}} +
    + {{ctx.Locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix ctx.Locale) .Creator.HomeLink .Creator.GetDisplayName}} +
    +
    +
    +
    + {{else}} +

    {{ctx.Locale.Tr "packages.filter.no_result"}}

    + {{end}} + {{template "base/paginate" .}} +
    diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl new file mode 100644 index 0000000..fe88e54 --- /dev/null +++ b/templates/package/view.tmpl @@ -0,0 +1,116 @@ +{{template "base/head" .}} +
    + {{template "shared/user/org_profile_avatar" .}} +
    + {{template "user/overview/header" .}} +
    +
    +

    {{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})

    +
    +
    + {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix ctx.Locale}} + {{if .HasRepositoryAccess}} + {{ctx.Locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink .PackageDescriptor.Creator.GetDisplayName .PackageDescriptor.Repository.Link .PackageDescriptor.Repository.FullName}} + {{else}} + {{ctx.Locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink .PackageDescriptor.Creator.GetDisplayName}} + {{end}} +
    +
    +
    +
    + {{template "package/content/alpine" .}} + {{template "package/content/arch" .}} + {{template "package/content/cargo" .}} + {{template "package/content/chef" .}} + {{template "package/content/composer" .}} + {{template "package/content/conan" .}} + {{template "package/content/conda" .}} + {{template "package/content/container" .}} + {{template "package/content/cran" .}} + {{template "package/content/debian" .}} + {{template "package/content/generic" .}} + {{template "package/content/go" .}} + {{template "package/content/helm" .}} + {{template "package/content/maven" .}} + {{template "package/content/npm" .}} + {{template "package/content/nuget" .}} + {{template "package/content/pub" .}} + {{template "package/content/pypi" .}} + {{template "package/content/rpm" .}} + {{template "package/content/rubygems" .}} + {{template "package/content/swift" .}} + {{template "package/content/vagrant" .}} +
    +
    + {{ctx.Locale.Tr "packages.details"}} +
    +
    {{svg .PackageDescriptor.Package.Type.SVGName 16 "tw-mr-2"}} {{.PackageDescriptor.Package.Type.Name}}
    + {{if .HasRepositoryAccess}} +
    {{svg "octicon-repo" 16 "tw-mr-2"}} {{.PackageDescriptor.Repository.FullName}}
    + {{end}} +
    {{svg "octicon-calendar" 16 "tw-mr-2"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix ctx.Locale}}
    +
    {{svg "octicon-download" 16 "tw-mr-2"}} {{.PackageDescriptor.Version.DownloadCount}}
    + {{template "package/metadata/alpine" .}} + {{template "package/metadata/arch" .}} + {{template "package/metadata/cargo" .}} + {{template "package/metadata/chef" .}} + {{template "package/metadata/composer" .}} + {{template "package/metadata/conan" .}} + {{template "package/metadata/conda" .}} + {{template "package/metadata/container" .}} + {{template "package/metadata/cran" .}} + {{template "package/metadata/debian" .}} + {{template "package/metadata/generic" .}} + {{template "package/metadata/helm" .}} + {{template "package/metadata/maven" .}} + {{template "package/metadata/npm" .}} + {{template "package/metadata/nuget" .}} + {{template "package/metadata/pub" .}} + {{template "package/metadata/pypi" .}} + {{template "package/metadata/rpm" .}} + {{template "package/metadata/rubygems" .}} + {{template "package/metadata/swift" .}} + {{template "package/metadata/vagrant" .}} + {{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}} +
    {{svg "octicon-database" 16 "tw-mr-2"}} {{ctx.Locale.TrSize .PackageDescriptor.CalculateBlobSize}}
    + {{end}} +
    + {{if not (eq .PackageDescriptor.Package.Type "container")}} +
    + {{ctx.Locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}}) +
    + {{range .PackageDescriptor.Files}} +
    + {{.File.Name}} + {{ctx.Locale.TrSize .Blob.Size}} +
    + {{end}} +
    + {{end}} +
    + {{ctx.Locale.Tr "packages.versions"}} ({{.TotalVersionCount}}) + {{ctx.Locale.Tr "packages.versions.view_all"}} +
    + {{range .LatestVersions}} +
    + {{.Version}} + {{DateTime "short" .CreatedUnix}} +
    + {{end}} +
    + {{if or .CanWritePackages .HasRepositoryAccess}} +
    +
    + {{if .HasRepositoryAccess}} +
    {{svg "octicon-issue-opened" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.issues"}}
    + {{end}} + {{if .CanWritePackages}} +
    {{svg "octicon-tools" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.settings"}}
    + {{end}} +
    + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/post-install.tmpl b/templates/post-install.tmpl new file mode 100644 index 0000000..0dbfbdc --- /dev/null +++ b/templates/post-install.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +
    +
    +
    +
    +
    +
    +
    +
    + {{ctx.Locale.Tr +
    +
    +
    + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl new file mode 100644 index 0000000..b892cff --- /dev/null +++ b/templates/projects/list.tmpl @@ -0,0 +1,93 @@ +{{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + +{{end}} + +{{template "base/alert" .}} + +
    + + + + +
    + +
    + {{range .Projects}} +
  • +

    + {{svg .IconName 16}} + {{.Title}} +

    +
    +
    +
    + {{svg "octicon-issue-opened" 14}} + {{ctx.Locale.PrettyNumber (.NumOpenIssues ctx)}} {{ctx.Locale.Tr "repo.issues.open_title"}} +
    +
    + {{svg "octicon-check" 14}} + {{ctx.Locale.PrettyNumber (.NumClosedIssues ctx)}} {{ctx.Locale.Tr "repo.issues.closed_title"}} +
    +
    + {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + + {{end}} +
    + {{if .Description}} +
    + {{.RenderedContent}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    + +{{if and $.CanWriteProjects (not $.Repository.IsArchived)}} + +{{end}} diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl new file mode 100644 index 0000000..bd173b5 --- /dev/null +++ b/templates/projects/new.tmpl @@ -0,0 +1,66 @@ +

    + {{if .PageIsEditProjects}} + {{ctx.Locale.Tr "repo.projects.edit"}} +
    {{ctx.Locale.Tr "repo.projects.edit_subheader"}}
    + {{else}} + {{ctx.Locale.Tr "repo.projects.new"}} +
    {{ctx.Locale.Tr "repo.projects.new_subheader"}}
    + {{end}} +

    +{{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    + +
    + + +
    +
    + + +
    + + {{if not .PageIsEditProjects}} +
    + + +
    + {{end}} + +
    + + +
    +
    +
    +
    + + {{ctx.Locale.Tr "repo.milestones.cancel"}} + + +
    +
    diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl new file mode 100644 index 0000000..08b08b9 --- /dev/null +++ b/templates/projects/view.tmpl @@ -0,0 +1,180 @@ +{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} + +
    +
    +

    {{.Project.Title}}

    + {{if $canWriteProject}} + + + {{end}} +
    + +
    {{$.Project.RenderedContent}}
    + +
    +
    + +
    +
    + {{range .Columns}} +
    +
    +
    +
    + {{.NumIssues ctx}} +
    + {{.Title}} +
    + {{if $canWriteProject}} + + {{end}} +
    +
    +
    + {{range (index $.IssuesMap .ID)}} +
    + {{template "repo/issue/card" (dict "Issue" . "Page" $)}} +
    + {{end}} +
    +
    + {{end}} +
    +
    + +{{if .CanWriteProjects}} + +{{end}} diff --git a/templates/repo/actions/dispatch.tmpl b/templates/repo/actions/dispatch.tmpl new file mode 100644 index 0000000..48c2aa5 --- /dev/null +++ b/templates/repo/actions/dispatch.tmpl @@ -0,0 +1,101 @@ +
    + + {{ctx.Locale.Tr "actions.workflow.dispatch.trigger_found"}} + + + +
    diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl new file mode 100644 index 0000000..263530f --- /dev/null +++ b/templates/repo/actions/list.tmpl @@ -0,0 +1,92 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + + {{if .HasWorkflowsOrRuns}} +
    + +
    + + + {{if $.CurWorkflowDispatch}} + {{template "repo/actions/dispatch" .}} + {{end}} + + {{template "repo/actions/runs_list" .}} +
    +
    + {{else}} + {{template "repo/actions/no_workflows" .}} + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/actions/no_workflows.tmpl b/templates/repo/actions/no_workflows.tmpl new file mode 100644 index 0000000..88d6e51 --- /dev/null +++ b/templates/repo/actions/no_workflows.tmpl @@ -0,0 +1,8 @@ +
    + {{svg "octicon-no-entry" 48}} +

    {{ctx.Locale.Tr "actions.runs.no_workflows"}}

    + {{if and .CanWriteCode .CanWriteActions}} +

    {{ctx.Locale.Tr "actions.runs.no_workflows.quick_start" "https://forgejo.org/docs/latest/admin/actions/"}}

    + {{end}} +

    {{ctx.Locale.Tr "actions.runs.no_workflows.documentation" "https://forgejo.org/docs/latest/admin/actions/"}}

    +
    diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl new file mode 100644 index 0000000..7bab492 --- /dev/null +++ b/templates/repo/actions/runs_list.tmpl @@ -0,0 +1,43 @@ +
    + {{if not .Runs}} +
    + {{svg "octicon-no-entry" 48}} +

    {{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}

    +
    + {{end}} + {{range .Runs}} +
    +
    + {{template "repo/actions/status" (dict "status" .Status.String)}} +
    +
    + + {{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}} + +
    + {{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}} - + {{- if .ScheduleID -}} + {{ctx.Locale.Tr "actions.runs.scheduled"}} + {{- else -}} + {{ctx.Locale.Tr "actions.runs.commit"}} + {{ShortSha .CommitSHA}} + {{ctx.Locale.Tr "actions.runs.pushed_by"}} + {{.TriggerUser.GetDisplayName}} + {{- end -}} +
    +
    +
    + {{if .RefLink}} + {{.PrettyRef}} + {{else}} + {{.PrettyRef}} + {{end}} +
    +
    {{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated ctx.Locale}}
    +
    {{svg "octicon-stopwatch" 16}}{{.Duration}}
    +
    +
    +
    + {{end}} +
    +{{template "base/paginate" .}} diff --git a/templates/repo/actions/status.tmpl b/templates/repo/actions/status.tmpl new file mode 100644 index 0000000..a0e02cf --- /dev/null +++ b/templates/repo/actions/status.tmpl @@ -0,0 +1,29 @@ + +{{- $size := 16 -}} +{{- if .size -}} +{{- $size = .size -}} +{{- end -}} + +{{- $className := "" -}} +{{- if .className -}} +{{- $className = .className -}} +{{- end -}} + + +{{if eq .status "success"}} + {{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}} +{{else if eq .status "skipped"}} + {{svg "octicon-skip" $size (printf "text grey %s" $className)}} +{{else if eq .status "waiting"}} + {{svg "octicon-clock" $size (printf "text yellow %s" $className)}} +{{else if eq .status "blocked"}} + {{svg "octicon-blocked" $size (printf "text yellow %s" $className)}} +{{else if eq .status "running"}} + {{svg "octicon-meter" $size (printf "text yellow job-status-rotate %s" $className)}} +{{else if or (eq .status "failure") or (eq .status "cancelled") or (eq .status "unknown")}} + {{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}} +{{end}} + diff --git a/templates/repo/actions/view.tmpl b/templates/repo/actions/view.tmpl new file mode 100644 index 0000000..b787762 --- /dev/null +++ b/templates/repo/actions/view.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} + +
    + {{template "repo/header" .}} +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl new file mode 100644 index 0000000..19a09b9 --- /dev/null +++ b/templates/repo/activity.tmpl @@ -0,0 +1,19 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{if and (not .IsEmptyRepo) (.Permission.CanRead $.UnitTypeCode)}} +
    + {{template "repo/navbar" .}} +
    + {{end}} +
    + {{if .PageIsPulse}}{{template "repo/pulse" .}}{{end}} + {{if .PageIsContributors}}{{template "repo/contributors" .}}{{end}} + {{if .PageIsCodeFrequency}}{{template "repo/code_frequency" .}}{{end}} + {{if .PageIsRecentCommits}}{{template "repo/recent_commits" .}}{{end}} +
    +
    +
    +{{template "base/footer" .}} + diff --git a/templates/repo/admin_flags.tmpl b/templates/repo/admin_flags.tmpl new file mode 100644 index 0000000..2a65c9c --- /dev/null +++ b/templates/repo/admin_flags.tmpl @@ -0,0 +1,8 @@ +{{if .Repository.IsFlagged $.Context}} +
    + {{ctx.Locale.Tr "repo.admin.enabled_flags"}} + {{range .Repository.ListFlags $.Context}} + {{.Name}} + {{end}} +
    +{{end}} diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl new file mode 100644 index 0000000..58be0b1 --- /dev/null +++ b/templates/repo/blame.tmpl @@ -0,0 +1,96 @@ +{{if or .UsesIgnoreRevs .FaultyIgnoreRevsFile}} + {{$revsFileLink := URLJoin .RepoLink "src" .BranchNameSubURL "/.git-blame-ignore-revs"}} + {{if .UsesIgnoreRevs}} +
    +

    {{ctx.Locale.Tr "repo.blame.ignore_revs" $revsFileLink "?bypass-blame-ignore=true"}}

    +
    + {{else}} +
    +

    {{ctx.Locale.Tr "repo.blame.ignore_revs.failed" $revsFileLink}}

    +
    + {{end}} +{{end}} +
    +

    +
    + {{template "repo/file_info" .}} +
    +
    +
    + {{ctx.Locale.Tr "repo.file_raw"}} + {{if not .IsViewCommit}} + {{ctx.Locale.Tr "repo.file_permalink"}} + {{end}} + {{ctx.Locale.Tr "repo.normal_view"}} + {{ctx.Locale.Tr "repo.file_history"}} + + +
    +
    +

    +
    +
    + {{if .IsFileTooLarge}} + + + + + + +
    {{ctx.Locale.Tr "repo.file_too_large"}}
    + {{else}} + + + {{range $row := .BlameRows}} + + + + + {{if $.EscapeStatus.Escaped}} + + {{end}} + + + {{end}} + +
    +
    +
    +
    + {{$row.Avatar}} +
    + +
    + {{$row.CommitSince}} +
    +
    +
    +
    + {{if $row.PreviousSha}} + + {{svg "octicon-versions"}} + + {{end}} + + + + {{if $row.EscapeStatus.Escaped}} + + {{end}} + + {{$row.Code}} +
    +
    + {{if $.Permission.CanRead $.UnitTypeIssues}} + {{ctx.Locale.Tr "repo.issues.context.reference_issue"}} + {{end}} + {{ctx.Locale.Tr "repo.file_copy_permalink"}} +
    + {{end}} +
    +
    +
    diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl new file mode 100644 index 0000000..f5bffb0 --- /dev/null +++ b/templates/repo/branch/list.tmpl @@ -0,0 +1,262 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + {{template "repo/sub_menu" .}} + {{if .DefaultBranchBranch}} +

    + {{ctx.Locale.Tr "repo.default_branch"}} + {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} + + {{svg "octicon-arrow-switch"}} + + {{end}} +

    + +
    + + + + + + + +
    +
    + {{.DefaultBranchBranch.DBBranch.Name}} + {{if .DefaultBranchBranch.IsProtected}} + {{svg "octicon-shield-lock"}} + {{end}} + + {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}} +
    +

    {{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}} · {{ctx.Locale.Tr "org.repo_updated" (TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale)}} {{if .DefaultBranchBranch.DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}

    +
    + {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} + + {{end}} + {{if .EnableFeed}} + {{svg "octicon-rss"}} + {{end}} + {{if not $.DisableDownloadSourceArchives}} + + {{end}} + {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}} + + {{end}} +
    +
    + {{end}} + +

    +
    + {{ctx.Locale.Tr "repo.branches"}} +
    +

    + +
    +
    + {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.branch_kind")}} +
    +
    + +
    + + + {{range .Branches}} + + + + + + + {{end}} + +
    + {{if .DBBranch.IsDeleted}} +
    + {{.DBBranch.Name}} + +
    +

    {{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}

    + {{else}} +
    + {{.DBBranch.Name}} + {{if .IsProtected}} + {{svg "octicon-shield-lock"}} + {{end}} + + {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}} +
    +

    {{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha .DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}} · {{ctx.Locale.Tr "org.repo_updated" (TimeSince .DBBranch.CommitTime.AsTime ctx.Locale)}} {{if .DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}}  {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}

    + {{end}} +
    + {{if and (not .DBBranch.IsDeleted) $.DefaultBranchBranch}} +
    +
    +
    {{.CommitsBehind}}
    + {{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't cause any problem. */}} +
    +
    +
    +
    {{.CommitsAhead}}
    +
    +
    +
    + {{end}} +
    + {{if not .LatestPullRequest}} + {{if .IsIncluded}} + + {{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.branch.included"}} + + {{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} + + + + {{end}} + {{else if and .LatestPullRequest.HasMerged .MergeMovedOn}} + {{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} + + + + {{end}} + {{else}} + {{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}} + {{if .LatestPullRequest.HasMerged}} + {{svg "octicon-git-merge" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.pulls.merged"}} + {{else if .LatestPullRequest.Issue.IsClosed}} + {{svg "octicon-git-pull-request-closed" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.closed_title"}} + {{else if .LatestPullRequest.IsWorkInProgress ctx}} + {{svg "octicon-git-pull-request-draft" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.draft_title"}} + {{else}} + {{svg "octicon-git-pull-request" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.open_title"}} + {{end}} + {{end}} + + {{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}} + + {{end}} + {{if $.EnableFeed}} + {{svg "octicon-rss"}} + {{end}} + {{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}} + + {{end}} + {{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}} + + {{end}} + {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} + {{if .DBBranch.IsDeleted}} + + {{else}} + + {{end}} + {{end}} +
    +
    + {{template "base/paginate" .}} +
    +
    + + + + + + +{{template "base/footer" .}} diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl new file mode 100644 index 0000000..dcb1792 --- /dev/null +++ b/templates/repo/branch_dropdown.tmpl @@ -0,0 +1,89 @@ +{{/* Attributes: +* root +* ContainerClasses +* (TODO: search "branch_dropdown" in the template directory) +*/}} +{{$defaultSelectedRefName := $.root.BranchName}} +{{if and .root.IsViewTag (not .noTag)}} + {{$defaultSelectedRefName = .root.TagName}} +{{end}} +{{if eq $defaultSelectedRefName ""}} + {{$defaultSelectedRefName = $.root.Repository.DefaultBranch}} +{{end}} + +{{$type := ""}} +{{if and .root.IsViewTag (not .noTag)}} + {{$type = "tag"}} +{{else if .root.IsViewBranch}} + {{$type = "branch"}} +{{else}} + {{$type = "tree"}} +{{end}} + +{{$showBranchesInDropdown := not .root.HideBranchesInDropdown}} + + + +
    + {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} + +
    diff --git a/templates/repo/cite/cite_buttons.tmpl b/templates/repo/cite/cite_buttons.tmpl new file mode 100644 index 0000000..5a6de23 --- /dev/null +++ b/templates/repo/cite/cite_buttons.tmpl @@ -0,0 +1,8 @@ + +BibTeX + + + + diff --git a/templates/repo/cite/cite_modal.tmpl b/templates/repo/cite/cite_modal.tmpl new file mode 100644 index 0000000..1ce959a --- /dev/null +++ b/templates/repo/cite/cite_modal.tmpl @@ -0,0 +1,20 @@ + diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl new file mode 100644 index 0000000..89daba9 --- /dev/null +++ b/templates/repo/clone_buttons.tmpl @@ -0,0 +1,15 @@ + +{{if $.CloneButtonShowHTTPS}} + +{{end}} +{{if $.CloneButtonShowSSH}} + +{{end}} + + diff --git a/templates/repo/clone_script.tmpl b/templates/repo/clone_script.tmpl new file mode 100644 index 0000000..40dae76 --- /dev/null +++ b/templates/repo/clone_script.tmpl @@ -0,0 +1,50 @@ + diff --git a/templates/repo/code/recently_pushed_new_branches.tmpl b/templates/repo/code/recently_pushed_new_branches.tmpl new file mode 100644 index 0000000..d996acc --- /dev/null +++ b/templates/repo/code/recently_pushed_new_branches.tmpl @@ -0,0 +1,17 @@ +{{range .RecentlyPushedNewBranches}} +
    +
    + {{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}} + {{$repo := .GetRepo $.Context}} + {{$name := .Name}} + {{if ne $repo.ID $.Repository.ID}} + {{$name = (print $repo.FullName ":" .Name)}} + {{end}} + {{$branchLink := (print ($repo.Link) "/src/branch/" (PathEscapeSegments .Name))}} + {{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $name $timeSince $branchLink}} +
    + + {{ctx.Locale.Tr "repo.pulls.compare_changes"}} + +
    +{{end}} diff --git a/templates/repo/code_frequency.tmpl b/templates/repo/code_frequency.tmpl new file mode 100644 index 0000000..50ec1be --- /dev/null +++ b/templates/repo/code_frequency.tmpl @@ -0,0 +1,9 @@ +{{if .Permission.CanRead $.UnitTypeCode}} +
    +
    +{{end}} diff --git a/templates/repo/commit_load_branches_and_tags.tmpl b/templates/repo/commit_load_branches_and_tags.tmpl new file mode 100644 index 0000000..ffa0e53 --- /dev/null +++ b/templates/repo/commit_load_branches_and_tags.tmpl @@ -0,0 +1,20 @@ +{{if not .PageIsWiki}} +
    + +
    +
    +
    {{ctx.Locale.Tr "repo.commit.contained_in"}}
    +
    +
    {{svg "octicon-git-branch"}}
    +
    +
    +
    +
    {{svg "octicon-tag"}}
    +
    +
    +
    +
    +{{end}} diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl new file mode 100644 index 0000000..e376860 --- /dev/null +++ b/templates/repo/commit_page.tmpl @@ -0,0 +1,285 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{$class := ""}} + {{if .Commit.Signature}} + {{$class = (print $class " isSigned")}} + {{if .Verification.Verified}} + {{if eq .Verification.TrustStatus "trusted"}} + {{$class = (print $class " isVerified")}} + {{else if eq .Verification.TrustStatus "untrusted"}} + {{$class = (print $class " isVerifiedUntrusted")}} + {{else}} + {{$class = (print $class " isVerifiedUnmatched")}} + {{end}} + {{else if .Verification.Warning}} + {{$class = (print $class " isWarning")}} + {{end}} + {{end}} +
    +
    +

    {{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}

    + {{if not $.PageIsWiki}} +
    + + {{ctx.Locale.Tr "repo.diff.browse_source"}} + + {{if and ($.Permission.CanWrite $.UnitTypeCode) (not $.Repository.IsArchived) (not .IsDeleted)}}{{- /* */ -}} + + {{end}} +
    + {{end}} +
    + {{if IsMultilineCommitMessage .Commit.Message}} +
    {{RenderCommitBody $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}
    + {{end}} + {{template "repo/commit_load_branches_and_tags" .}} +
    +
    +
    + {{if .Author}} + {{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}} + {{if .Author.FullName}} + {{.Author.FullName}} + {{else}} + {{.Commit.Author.Name}} + {{end}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "tw-mr-2"}} + {{.Commit.Author.Name}} + {{end}} + {{TimeSince .Commit.Author.When ctx.Locale}} + {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} + {{ctx.Locale.Tr "repo.diff.committed_by"}} + {{if ne .Verification.CommittingUser.ID 0}} + {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mx-2"}} + {{.Commit.Committer.Name}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "tw-mr-2"}} + {{.Commit.Committer.Name}} + {{end}} + {{end}} +
    +
    + {{if .Parents}} +
    + {{ctx.Locale.Tr "repo.diff.parent"}} + {{range .Parents}} + {{if $.PageIsWiki}} + {{ShortSha .}} + {{else}} + {{ShortSha .}} + {{end}} + {{end}} +
    + {{end}} +
    + {{ctx.Locale.Tr "repo.diff.commit"}} + {{ShortSha .CommitID}} +
    +
    +
    + {{if .Commit.Signature}} +
    +
    + {{if .Verification.Verified}} + {{if ne .Verification.SigningUser.ID 0}} + {{svg "gitea-lock" 16 "tw-mr-2"}} + {{if eq .Verification.TrustStatus "trusted"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}}: + {{else if eq .Verification.TrustStatus "untrusted"}} + {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: + {{else}} + {{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: + {{end}} + {{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}} + {{.Verification.SigningUser.GetDisplayName}} + {{else}} + {{svg "gitea-lock-cog" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}}: + {{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}} + {{.Verification.SigningUser.GetDisplayName}} + {{end}} + {{else}} + {{svg "gitea-unlock" 16 "tw-mr-2"}} + {{ctx.Locale.Tr .Verification.Reason}} + {{end}} +
    +
    + {{if .Verification.Verified}} + {{if ne .Verification.SigningUser.ID 0}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{if .Verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.Verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.Verification.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{svg "octicon-unverified" 16 "tw-mr-2"}} + {{if .Verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.Verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.Verification.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{else if .Verification.Warning}} + {{svg "octicon-unverified" 16 "tw-mr-2"}} + {{if .Verification.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.Verification.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.Verification.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{if .Verification.SigningKey}} + {{if ne .Verification.SigningKey.KeyID ""}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{.Verification.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{if .Verification.SigningSSHKey}} + {{if ne .Verification.SigningSSHKey.Fingerprint ""}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{.Verification.SigningSSHKey.Fingerprint}} + {{end}} + {{end}} + {{end}} +
    +
    + {{end}} + {{if .NoteRendered}} +
    + {{svg "octicon-note" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.diff.git-notes"}}: + {{if .NoteAuthor}} + + {{if .NoteAuthor.FullName}} + {{.NoteAuthor.FullName}} + {{else}} + {{.NoteCommit.Author.Name}} + {{end}} + + {{else}} + {{.NoteCommit.Author.Name}} + {{end}} + {{TimeSince .NoteCommit.Author.When ctx.Locale}} +
    +
    +
    {{.NoteRendered | SanitizeHTML}}
    +
    + {{end}} + {{template "repo/diff/box" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl new file mode 100644 index 0000000..eb700ab --- /dev/null +++ b/templates/repo/commit_status.tmpl @@ -0,0 +1,16 @@ + +{{if eq .State "pending"}} + {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} +{{end}} +{{if eq .State "success"}} + {{svg "octicon-check" 18 "commit-status icon text green"}} +{{end}} +{{if eq .State "error"}} + {{svg "gitea-exclamation" 18 "commit-status icon text red"}} +{{end}} +{{if eq .State "failure"}} + {{svg "octicon-x" 18 "commit-status icon text red"}} +{{end}} +{{if eq .State "warning"}} + {{svg "gitea-exclamation" 18 "commit-status icon text yellow"}} +{{end}} diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl new file mode 100644 index 0000000..f451ac0 --- /dev/null +++ b/templates/repo/commit_statuses.tmpl @@ -0,0 +1,14 @@ +{{if .Statuses}} + {{if and (eq (len .Statuses) 1) .Status.TargetURL}} + + {{template "repo/commit_status" .Status}} + + {{else}} + + {{template "repo/commit_status" .Status}} + + {{end}} +
    + {{template "repo/pulls/status" (dict "CommitStatuses" .Statuses "CommitStatus" .Status)}} +
    +{{end}} diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl new file mode 100644 index 0000000..86df88f --- /dev/null +++ b/templates/repo/commits.tmpl @@ -0,0 +1,23 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/sub_menu" .}} +
    +
    + {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} + + {{svg "octicon-git-branch"}} + {{ctx.Locale.Tr "repo.commit_graph"}} + +
    +
    + {{template "repo/commits_table" .}} + {{if .OldFilename}} +
    + {{ctx.Locale.Tr "repo.commits.renamed_from" .OldFilename}} ({{ctx.Locale.Tr "repo.commits.browse_further"}}) +
    + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl new file mode 100644 index 0000000..c8c695e --- /dev/null +++ b/templates/repo/commits_list.tmpl @@ -0,0 +1,96 @@ +
    + + + + + + + + + + + + {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} + {{range .Commits}} + + + + + {{if .Committer}} + + {{else}} + + {{end}} + + + {{end}} + +
    {{ctx.Locale.Tr "repo.commits.author"}}{{StringUtils.ToUpper $.Repository.ObjectFormatName}}{{ctx.Locale.Tr "repo.commits.message"}}{{ctx.Locale.Tr "repo.commits.date"}}
    +
    + {{$userName := .Author.Name}} + {{if .User}} + {{if and .User.FullName DefaultShowFullName}} + {{$userName = .User.FullName}} + {{end}} + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + {{$userName}} + {{end}} +
    +
    + {{$class := "ui sha label"}} + {{if .Signature}} + {{$class = (print $class " isSigned")}} + {{if .Verification.Verified}} + {{if eq .Verification.TrustStatus "trusted"}} + {{$class = (print $class " isVerified")}} + {{else if eq .Verification.TrustStatus "untrusted"}} + {{$class = (print $class " isVerifiedUntrusted")}} + {{else}} + {{$class = (print $class " isVerifiedUnmatched")}} + {{end}} + {{else if .Verification.Warning}} + {{$class = (print $class " isWarning")}} + {{end}} + {{end}} + {{$commitShaLink := ""}} + {{if $.PageIsWiki}} + {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{else if $.PageIsPullCommits}} + {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} + {{else if $.Reponame}} + {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{end}} + + {{ShortSha .ID.String}} + {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} + + + + {{if $.PageIsWiki}} + {{.Summary | RenderEmoji $.Context}} + {{else}} + {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{end}} + + {{if IsMultilineCommitMessage .Message}} + + {{end}} + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + {{if IsMultilineCommitMessage .Message}} +
    {{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
    + {{end}} +
    {{TimeSince .Committer.When ctx.Locale}}{{TimeSince .Author.When ctx.Locale}} + + {{if not $.PageIsWiki}} + + {{svg "octicon-file-code"}} + + {{end}} +
    +
    diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl new file mode 100644 index 0000000..4c67319 --- /dev/null +++ b/templates/repo/commits_list_small.tmpl @@ -0,0 +1,55 @@ +{{$index := 0}} +
    +{{range .comment.Commits}} + {{$tag := printf "%s-%d" $.comment.HashTag $index}} + {{$index = Eval $index "+" 1}} +
    + {{svg "octicon-git-commit"}} + {{if .User}} + {{ctx.AvatarUtils.Avatar .User 20}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20}} + {{end}} + + {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} + + + {{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} + + + {{if IsMultilineCommitMessage .Message}} + + {{end}} + + + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + {{$class := "ui sha label"}} + {{if .Signature}} + {{$class = (print $class " isSigned")}} + {{if .Verification.Verified}} + {{if eq .Verification.TrustStatus "trusted"}} + {{$class = (print $class " isVerified")}} + {{else if eq .Verification.TrustStatus "untrusted"}} + {{$class = (print $class " isVerifiedUntrusted")}} + {{else}} + {{$class = (print $class " isVerifiedUnmatched")}} + {{end}} + {{else if .Verification.Warning}} + {{$class = (print $class " isWarning")}} + {{end}} + {{end}} + + {{ShortSha .ID.String}} + {{if .Signature}} + {{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}} + {{end}} + + +
    + {{if IsMultilineCommitMessage .Message}} +
    +		{{- RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
    +	
    + {{end}} +{{end}} +
    diff --git a/templates/repo/commits_search_dropdown.tmpl b/templates/repo/commits_search_dropdown.tmpl new file mode 100644 index 0000000..5aa3f4f --- /dev/null +++ b/templates/repo/commits_search_dropdown.tmpl @@ -0,0 +1,8 @@ + diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl new file mode 100644 index 0000000..7249bec --- /dev/null +++ b/templates/repo/commits_table.tmpl @@ -0,0 +1,36 @@ +

    +
    + {{if or .PageIsCommits (gt .CommitCount 0)}} + {{ctx.Locale.TrN .CommitCount "repo.n_commit_one" "repo.n_commit_few" (StringUtils.ToString .CommitCount)}} + {{else if .IsNothingToCompare}} + {{ctx.Locale.Tr "repo.commits.nothing_to_compare"}} + {{else}} + {{ctx.Locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} + {{end}} +
    + {{if .IsDiffCompare}} + + {{end}} +

    + +{{if .PageIsCommits}} +
    +
    +
    + {{template "shared/search/input" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.commit_kind")}} + {{template "repo/commits_search_dropdown" .}} + {{template "shared/search/button" dict "Tooltip" (ctx.Locale.Tr "repo.commits.search.tooltip")}} +
    +
    +
    +{{end}} + +{{if and .Commits (gt .CommitCount 0)}} + {{template "repo/commits_list" .}} +{{end}} + +{{template "base/paginate" .}} diff --git a/templates/repo/contributors.tmpl b/templates/repo/contributors.tmpl new file mode 100644 index 0000000..f7f5d79 --- /dev/null +++ b/templates/repo/contributors.tmpl @@ -0,0 +1,14 @@ +{{if .Permission.CanRead $.UnitTypeCode}} +
    +
    +{{end}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl new file mode 100644 index 0000000..df4288a --- /dev/null +++ b/templates/repo/create.tmpl @@ -0,0 +1,224 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "new_repo.title"}} +

    +
    + {{template "base/alert" .}} + {{template "repo/create_helper" .}} + + {{if not .CanCreateRepo}} +
    +

    {{ctx.Locale.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimit}}

    +
    + {{end}} +
    + + + {{ctx.Locale.Tr "repo.owner_helper"}} +
    + +
    + + + {{ctx.Locale.Tr "repo.repo_name_helper"}} +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    +
    + + +
    + +
    +
    + +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    +
    + + +
    + +
    + +
    + + + {{ctx.Locale.Tr "repo.repo_gitignore_helper_desc"}} +
    +
    + + + {{ctx.Locale.Tr "repo.license_helper_desc" "https://choosealicense.com/"}} +
    + +
    + + + {{ctx.Locale.Tr "repo.readme_helper_desc"}} +
    +
    +
    + + +
    +
    +
    + + + {{ctx.Locale.Tr "repo.default_branch_helper"}} +
    +
    + + + {{ctx.Locale.Tr "repo.object_format_helper"}} +
    +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/create_helper.tmpl b/templates/repo/create_helper.tmpl new file mode 100644 index 0000000..70c28b7 --- /dev/null +++ b/templates/repo/create_helper.tmpl @@ -0,0 +1,3 @@ +{{if not $.DisableMigrations}} +

    {{ctx.Locale.Tr "repo.new_repo_helper" (print AppSubUrl "/repo/migrate")}}

    +{{end}} diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl new file mode 100644 index 0000000..d6ab87f --- /dev/null +++ b/templates/repo/diff/blob_excerpt.tmpl @@ -0,0 +1,80 @@ +{{if $.IsSplitStyle}} + {{range $k, $line := $.section.Lines}} + + {{if eq .GetType 4}} + +
    + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
    + + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}} + {{else}} + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}} + + {{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} + {{if $line.LeftIdx}}{{end}} + {{/* + */}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + + {{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} + {{if $line.RightIdx}}{{end}} + {{/* + */}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + {{end}} + + {{end}} +{{else}} + {{range $k, $line := $.section.Lines}} + + {{if eq .GetType 4}} + +
    + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
    + + {{else}} + + + {{end}} + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}} + {{if $inlineDiff.EscapeStatus.Escaped}}{{end}} + + {{$inlineDiff.Content}} + + {{end}} +{{end}} diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl new file mode 100644 index 0000000..230e497 --- /dev/null +++ b/templates/repo/diff/box.tmpl @@ -0,0 +1,260 @@ +{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}} +
    +
    +
    + {{if $showFileTree}} + + + {{end}} + {{if not .DiffNotAvailable}} +
    + {{svg "octicon-diff" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}} +
    + {{end}} +
    +
    + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}} +
    + + +
    + {{end}} + {{template "repo/diff/whitespace_dropdown" .}} + {{template "repo/diff/options_dropdown" .}} + {{if .PageIsPullFiles}} +
    + {{/* + the following will be replaced by vue component + but this avoids any loading artifacts till the vue component is initialized + */}} + +
    + {{end}} + {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} + {{template "repo/diff/new_review" .}} + {{end}} +
    +
    + {{if not .DiffNotAvailable}} + {{if and .IsShowingOnlySingleCommit .PageIsPullFiles}} +
    +
    {{ctx.Locale.Tr "repo.pulls.showing_only_single_commit" (ShortSha .AfterCommitID)}} - {{ctx.Locale.Tr "repo.pulls.show_all_commits"}}
    +
    + {{else if and (not .IsShowingAllCommits) .PageIsPullFiles}} +
    +
    {{ctx.Locale.Tr "repo.pulls.showing_specified_commit_range" (ShortSha .BeforeCommitID) (ShortSha .AfterCommitID)}} - {{ctx.Locale.Tr "repo.pulls.show_all_commits"}}
    +
    + {{end}} + +
    + {{end}} +
    + {{if $showFileTree}} +
    + + {{end}} + {{if .DiffNotAvailable}} +

    {{ctx.Locale.Tr "repo.diff.data_not_available"}}

    + {{else}} +
    + {{range $i, $file := .Diff.Files}} + {{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}} + {{$blobBase := call $.GetBlobByPathForCommit $.BeforeCommit $file.OldName}} + {{$blobHead := call $.GetBlobByPathForCommit $.HeadCommit $file.Name}} + {{$sniffedTypeBase := call $.GetSniffedTypeForBlob $blobBase}} + {{$sniffedTypeHead := call $.GetSniffedTypeForBlob $blobHead}} + {{$isImage:= or (call $.IsSniffedTypeAnImage $sniffedTypeBase) (call $.IsSniffedTypeAnImage $sniffedTypeHead)}} + {{$isCsv := (call $.IsCsvFile $file)}} + {{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}} + {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} + {{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}} +
    +

    +
    + +
    + {{if $file.IsBin}} + + {{ctx.Locale.Tr "repo.diff.bin"}} + + {{else}} + {{template "repo/diff/stats" dict "file" . "root" $}} + {{end}} +
    + {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}} + {{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}} + + {{if $file.IsGenerated}} + {{ctx.Locale.Tr "repo.diff.generated"}} + {{end}} + {{if $file.IsVendored}} + {{ctx.Locale.Tr "repo.diff.vendored"}} + {{end}} + {{if and $file.Mode $file.OldMode}} + {{$old := ctx.Locale.Tr ($file.ModeTranslationKey $file.OldMode)}} + {{$new := ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}} + {{ctx.Locale.Tr "git.filemode.changed_filemode" $old $new}} + {{else if $file.Mode}} + {{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}} + {{end}} + +
    +
    + {{if $showFileViewToggle}} +
    + + +
    + {{end}} + {{if $file.IsProtected}} + {{ctx.Locale.Tr "repo.diff.protected"}} + {{end}} + {{if and $isReviewFile $file.HasChangedSinceLastReview}} + {{ctx.Locale.Tr "repo.pulls.has_changed_since_last_review"}} + {{end}} + {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}} + + + {{end}} + {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} + {{if $file.IsDeleted}} + {{ctx.Locale.Tr "repo.diff.view_file"}} + {{else}} + {{ctx.Locale.Tr "repo.diff.view_file"}} + {{if and $.HeadBranchIsEditable (not $file.IsLFSFile)}} + {{ctx.Locale.Tr "repo.editor.edit_this_file"}} + {{end}} + {{end}} + {{end}} + {{if $isReviewFile}} + + {{end}} +
    +

    +
    +
    + {{if or $file.IsIncomplete $file.IsBin}} +
    + {{if $file.IsIncomplete}} + {{if $file.IsIncompleteLineTooLong}} + {{ctx.Locale.Tr "repo.diff.file_suppressed_line_too_long"}} + {{else}} + {{ctx.Locale.Tr "repo.diff.file_suppressed"}} + {{ctx.Locale.Tr "repo.diff.load"}} + {{end}} + {{else}} + {{ctx.Locale.Tr "repo.diff.bin_not_shown"}} + {{end}} +
    + {{else}} + + {{if $.IsSplitStyle}} + {{template "repo/diff/section_split" dict "file" . "root" $}} + {{else}} + {{template "repo/diff/section_unified" dict "file" . "root" $}} + {{end}} +
    + {{end}} +
    + {{if $showFileViewToggle}} + {{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}} +
    + + {{if $isImage}} + {{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}} + {{else}} + {{template "repo/diff/csv_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}} + {{end}} +
    +
    + {{end}} +
    +
    + {{end}} + + {{if .Diff.IsIncomplete}} +
    +

    + {{ctx.Locale.Tr "repo.diff.too_many_files"}} + {{ctx.Locale.Tr "repo.diff.show_more"}} +

    +
    + {{end}} +
    + {{end}} +
    + + {{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}} + + {{end}} + {{if (not .DiffNotAvailable)}} + {{template "repo/issue/view_content/reference_issue_dialog" .}} + {{end}} +
    diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl new file mode 100644 index 0000000..856b3da --- /dev/null +++ b/templates/repo/diff/comment_form.tmpl @@ -0,0 +1,49 @@ +{{if and $.root.SignedUserID (not $.Repository.IsArchived)}} +
    + {{$.root.CsrfTokenHtml}} + + + + + + + + + + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print $.root.Repository.Link "/markup") + "MarkdownPreviewContext" $.root.RepoLink + "TextareaName" "content" + "TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder") + "DropzoneParentContainer" "form" + "DisableAutosize" "true" + )}} + + {{if $.root.IsAttachmentEnabled}} +
    + {{template "repo/upload" $.root}} +
    + {{end}} + + +
    +{{end}} diff --git a/templates/repo/diff/comment_form_datahandler.tmpl b/templates/repo/diff/comment_form_datahandler.tmpl new file mode 100644 index 0000000..d0e4934 --- /dev/null +++ b/templates/repo/diff/comment_form_datahandler.tmpl @@ -0,0 +1,7 @@ +{{if $.comment}} + {{template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}} +{{else if $.root}} + {{template "repo/diff/comment_form" $}} +{{else}} + {{template "repo/diff/comment_form" dict "root" $}} +{{end}} diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl new file mode 100644 index 0000000..2e0c85d --- /dev/null +++ b/templates/repo/diff/comments.tmpl @@ -0,0 +1,75 @@ +{{range .comments}} + +{{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} +
    + {{if .OriginalAuthor}} + {{ctx.AvatarUtils.Avatar nil}} + {{else}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} +
    +
    +
    + {{if .OriginalAuthor}} + + {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} + {{.OriginalAuthor}} + + + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} + + + {{if $.root.Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" $.root.Repository.OriginalURL $.root.Repository.GetOriginalURLHostname}}) + {{end}} + + {{else}} + + {{template "shared/user/namelink" .Poster}} + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} + + {{end}} +
    +
    + {{if .Invalidated}} + {{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}} + + {{ctx.Locale.Tr "repo.issues.review.outdated"}} + + {{end}} + {{if and .Review}} + {{if eq .Review.Type 0}} +
    + {{ctx.Locale.Tr "repo.issues.review.pending"}} +
    + {{else}} +
    + {{ctx.Locale.Tr "repo.issues.review.review"}} +
    + {{end}} + {{end}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $.root "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID)}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $.root "item" . "delete" true "issue" false "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}} +
    +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}} + {{end}} +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $.root "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions}} + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl new file mode 100644 index 0000000..110f8ac --- /dev/null +++ b/templates/repo/diff/compare.tmpl @@ -0,0 +1,238 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{$showDiffBox := false}} +
    +

    + {{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}} + {{ctx.Locale.Tr "repo.pulls.compare_changes"}} +
    {{ctx.Locale.Tr "repo.pulls.compare_changes_desc"}}
    + {{else}} + {{ctx.Locale.Tr "action.compare_commits_general"}} + {{end}} +

    + {{$BaseCompareName := $.BaseName -}} + {{- $HeadCompareName := $.HeadRepo.OwnerName -}} + {{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}} + {{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}} + {{- end -}} + {{- $OwnForkCompareName := "" -}} + {{- if .OwnForkRepo -}} + {{- $OwnForkCompareName = .OwnForkRepo.OwnerName -}} + {{- end -}} + {{- $RootRepoCompareName := "" -}} + {{- if .RootRepo -}} + {{- $RootRepoCompareName = .RootRepo.OwnerName -}} + {{- if eq $.HeadRepo.OwnerName .RootRepo.OwnerName -}} + {{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}} + {{- end -}} + {{- end -}} +
    + {{svg "octicon-git-compare"}} + + {{svg "octicon-arrow-left" 16}}
    {{.CompareSeparator}}
    + +
    + + {{if .IsNothingToCompare}} + {{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) .PageIsComparePull}} +
    {{ctx.Locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}
    +
    + +
    +
    + {{template "repo/issue/new_form" .}} +
    + {{else if and .HeadIsBranch .BaseIsBranch}} +
    {{ctx.Locale.Tr "repo.pulls.nothing_to_compare"}}
    + {{else}} +
    {{ctx.Locale.Tr "repo.pulls.nothing_to_compare_have_tag"}}
    + {{end}} + {{else if and .PageIsComparePull (gt .CommitCount 0)}} + {{if .HasPullRequest}} +
    +
    + {{ctx.Locale.Tr "repo.pulls.has_pull_request" (print $.RepoLink "/pulls/" .PullRequest.Issue.Index) $.RepoRelPath .PullRequest.Index}} +

    + {{RenderIssueTitle $.Context .PullRequest.Issue.Title ($.Repository.ComposeMetas ctx)}} + #{{.PullRequest.Issue.Index}} +

    +
    + +
    + {{else}} + {{if and $.IsSigned (not .Repository.IsArchived)}} +
    + +
    + {{else if .Repository.IsArchived}} +
    + {{if .Repository.ArchivedUnix.IsZero}} + {{ctx.Locale.Tr "repo.archive.title"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}} + {{end}} +
    + {{end}} + {{if $.IsSigned}} +
    + {{template "repo/issue/new_form" .}} +
    + {{end}} + {{$showDiffBox = true}} + {{end}} + {{else if not .IsNothingToCompare}} + {{$showDiffBox = true}} + {{end}} +
    + + {{if $showDiffBox}} +
    + {{template "repo/commits_table" .}} + {{template "repo/diff/box" .}} +
    + {{end}} +
    +{{template "base/footer" .}} diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl new file mode 100644 index 0000000..c80d999 --- /dev/null +++ b/templates/repo/diff/conversation.tmpl @@ -0,0 +1,66 @@ +{{$resolved := (index .comments 0).IsResolved}} +{{$invalid := (index .comments 0).Invalidated}} +{{$resolveDoer := (index .comments 0).ResolveDoer}} +{{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}} +{{$referenceUrl := printf "%s#%s" $.Issue.Link (index .comments 0).HashTag}} +
    + {{if $resolved}} +
    +
    + {{svg "octicon-check" 16 "icon tw-mr-1"}} + {{$resolveDoer.Name}} {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} + {{if $invalid}} + + + {{ctx.Locale.Tr "repo.issues.review.outdated"}} + + {{end}} +
    +
    + + +
    +
    + {{end}} +
    +
    + + {{template "repo/diff/comments" dict "root" $ "comments" .comments}} + +
    +
    +
    + + +
    + {{if and $.CanMarkConversation $isNotPending}} + + {{end}} + {{if and $.SignedUserID (not $.Repository.IsArchived)}} + + {{end}} +
    + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}} +
    +
    diff --git a/templates/repo/diff/conversations.tmpl b/templates/repo/diff/conversations.tmpl new file mode 100644 index 0000000..5945337 --- /dev/null +++ b/templates/repo/diff/conversations.tmpl @@ -0,0 +1,3 @@ +{{range .conversations}} + {{template "repo/diff/conversation" dict "." $ "comments" .}} +{{end}} diff --git a/templates/repo/diff/csv_diff.tmpl b/templates/repo/diff/csv_diff.tmpl new file mode 100644 index 0000000..0f46da3 --- /dev/null +++ b/templates/repo/diff/csv_diff.tmpl @@ -0,0 +1,58 @@ + + + {{$result := call .root.CreateCsvDiff .file .blobBase .blobHead}} + {{if $result.Error}} +
    {{$result.Error}}
    + {{else if $result.Sections}} + + {{range $i, $section := $result.Sections}} + + {{range $j, $row := $section.Rows}} + + {{if and (eq $i 0) (eq $j 0)}} + + {{range $j, $cell := $row.Cells}} + {{if not $cell}} + + {{else if eq $cell.Type 2}} + + {{else if eq $cell.Type 3}} + + {{else if eq $cell.Type 4}} + + {{else if eq $cell.Type 5}} + + {{else if eq $cell.Type 6}} + + {{else}} + + {{end}} + {{end}} + {{else}} + + {{range $j, $cell := $row.Cells}} + {{if not $cell}} + + {{else if eq $cell.Type 2}} + + {{else if eq $cell.Type 3}} + + {{else if eq $cell.Type 4}} + + {{else if eq $cell.Type 5}} + + {{else if eq $cell.Type 6}} + + {{else}} + + {{end}} + {{end}} + {{end}} + + {{end}} + + {{end}} +
    {{.RowIdx}}{{.LeftCell}} {{.RightCell}}{{.RightCell}}{{.LeftCell}}{{.RightCell}}{{.LeftCell}} {{.RightCell}}{{.RightCell}}{{if .RowIdx}}{{.RowIdx}}{{end}}{{.LeftCell}} {{.RightCell}}{{.RightCell}}{{.LeftCell}}{{.RightCell}}{{.LeftCell}} {{.RightCell}}{{.RightCell}}
    + {{end}} + + diff --git a/templates/repo/diff/escape_title.tmpl b/templates/repo/diff/escape_title.tmpl new file mode 100644 index 0000000..e70f402 --- /dev/null +++ b/templates/repo/diff/escape_title.tmpl @@ -0,0 +1,2 @@ +{{if .diff.EscapeStatus.HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{/* +*/}}{{if .diff.EscapeStatus.HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}} diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl new file mode 100644 index 0000000..0612854 --- /dev/null +++ b/templates/repo/diff/image_diff.tmpl @@ -0,0 +1,83 @@ +{{if or .blobBase .blobHead}} + + +
    + + + +
    +
    +
    + {{if .blobBase}} + +

    {{ctx.Locale.Tr "repo.diff.file_before"}}

    + +

    + + {{ctx.Locale.Tr "repo.diff.file_image_width"}}: +  |  + {{ctx.Locale.Tr "repo.diff.file_image_height"}}: +  |  + + {{ctx.Locale.Tr "repo.diff.file_byte_size"}}: {{ctx.Locale.TrSize .blobBase.Size}} +

    +
    + {{end}} + {{if .blobHead}} + +

    {{ctx.Locale.Tr "repo.diff.file_after"}}

    + +

    + + {{ctx.Locale.Tr "repo.diff.file_image_width"}}: +  |  + {{ctx.Locale.Tr "repo.diff.file_image_height"}}: +  |  + + {{ctx.Locale.Tr "repo.diff.file_byte_size"}}: {{ctx.Locale.TrSize .blobHead.Size}} +

    +
    + {{end}} +
    +
    + {{if and .blobBase .blobHead}} +
    +
    +
    + + + + + + + + +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    + {{end}} +
    +
    + + +{{end}} diff --git a/templates/repo/diff/new_comment.tmpl b/templates/repo/diff/new_comment.tmpl new file mode 100644 index 0000000..6a71539 --- /dev/null +++ b/templates/repo/diff/new_comment.tmpl @@ -0,0 +1,5 @@ +
    +
    + {{template "repo/diff/comment_form_datahandler" .}} +
    +
    diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl new file mode 100644 index 0000000..a2eae00 --- /dev/null +++ b/templates/repo/diff/new_review.tmpl @@ -0,0 +1,52 @@ +
    + + {{if $.IsShowingAllCommits}} +
    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    {{ctx.Locale.Tr "repo.diff.review.header"}}
    + {{svg "octicon-x" 16}} +
    +
    + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.review.placeholder") + "DropzoneParentContainer" "form" + )}} +
    + {{if .IsAttachmentEnabled}} +
    + {{template "repo/upload" .}} +
    + {{end}} +
    + {{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}} + {{if $showSelfTooltip}} + + + + {{else}} + + {{end}} + + {{if $showSelfTooltip}} + + + + {{else}} + + {{end}} +
    +
    +
    + {{end}} +
    diff --git a/templates/repo/diff/options_dropdown.tmpl b/templates/repo/diff/options_dropdown.tmpl new file mode 100644 index 0000000..09b7b80 --- /dev/null +++ b/templates/repo/diff/options_dropdown.tmpl @@ -0,0 +1,33 @@ + diff --git a/templates/repo/diff/section_code.tmpl b/templates/repo/diff/section_code.tmpl new file mode 100644 index 0000000..3e8303e --- /dev/null +++ b/templates/repo/diff/section_code.tmpl @@ -0,0 +1 @@ +{{.diff.Content}} diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl new file mode 100644 index 0000000..50522d9 --- /dev/null +++ b/templates/repo/diff/section_split.tmpl @@ -0,0 +1,156 @@ +{{$file := .file}} +{{$blobExcerptRepoLink := or $.root.CommitRepoLink $.root.RepoLink}} + + + + + + + + + + +{{range $j, $section := $file.Sections}} + {{range $k, $line := $section.Lines}} + {{$hasmatch := ne $line.Match -1}} + {{if or (ne .GetType 2) (not $hasmatch)}} + + {{if eq .GetType 4}} + +
    + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
    + {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}} + {{if $inlineDiff.EscapeStatus.Escaped}}{{end}} + {{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}} + {{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}} + {{$match := index $section.Lines $line.Match}} + {{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line ctx.Locale}}{{end}} + {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match ctx.Locale}}{{end}} + + {{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}{{end}}{{end}} + + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{if $line.LeftIdx}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $leftDiff}}{{/* + */}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + + {{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}{{end}}{{end}} + {{if $match.RightIdx}}{{end}} + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{if $match.RightIdx}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $rightDiff}}{{/* + */}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + {{else}} + {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}} + + {{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}{{end}}{{end}} + {{if $line.LeftIdx}}{{end}} + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{if $line.LeftIdx}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + + {{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}{{end}}{{end}} + {{if $line.RightIdx}}{{end}} + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{if $line.RightIdx}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + {{end}} + + {{if and (eq .GetType 3) $hasmatch}} + {{$match := index $section.Lines $line.Match}} + {{if or $line.Conversations $match.Conversations}} + + + {{if $line.Conversations}} + {{if eq $line.GetCommentSide "previous"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + {{end}} + {{end}} + {{if $match.Conversations}} + {{if eq $match.GetCommentSide "previous"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $match.Conversations}} + {{end}} + {{end}} + + + {{if $line.Conversations}} + {{if eq $line.GetCommentSide "proposed"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + {{end}} + {{end}} + {{if $match.Conversations}} + {{if eq $match.GetCommentSide "proposed"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $match.Conversations}} + {{end}} + {{end}} + + + {{end}} + {{else if $line.Conversations}} + + + {{if eq $line.GetCommentSide "previous"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + {{end}} + + + {{if eq $line.GetCommentSide "proposed"}} + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + {{end}} + + + {{end}} + {{end}} + {{end}} +{{end}} diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl new file mode 100644 index 0000000..ab78097 --- /dev/null +++ b/templates/repo/diff/section_unified.tmpl @@ -0,0 +1,72 @@ +{{$file := .file}} +{{$blobExcerptRepoLink := or $.root.CommitRepoLink $.root.RepoLink}} + + + + + + + +{{range $j, $section := $file.Sections}} + {{range $k, $line := $section.Lines}} + + {{if eq .GetType 4}} + {{if $.root.AfterCommitID}} + +
    + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
    + + {{else}} + {{/* for code file preview page or comment diffs on pull comment pages, do not show the expansion arrows */}} + + {{end}} + {{else}} + + + {{end}} + {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale -}} + + {{- if $inlineDiff.EscapeStatus.Escaped -}} + + {{- end -}} + + + {{if eq .GetType 4}} + {{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}} + {{else}} + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}} + {{end}} + + {{if $line.Conversations}} + + + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + + + {{end}} + {{end}} +{{end}} diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl new file mode 100644 index 0000000..d0dff1b --- /dev/null +++ b/templates/repo/diff/stats.tmpl @@ -0,0 +1,5 @@ +{{Eval .file.Addition "+" .file.Deletion}} + + {{/* if the denominator is zero, then the float result is "width: NaNpx", as before, it just works */}} +
    +
    diff --git a/templates/repo/diff/whitespace_dropdown.tmpl b/templates/repo/diff/whitespace_dropdown.tmpl new file mode 100644 index 0000000..c54de16 --- /dev/null +++ b/templates/repo/diff/whitespace_dropdown.tmpl @@ -0,0 +1,30 @@ + +{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}} diff --git a/templates/repo/editor/cherry_pick.tmpl b/templates/repo/editor/cherry_pick.tmpl new file mode 100644 index 0000000..f9c9eef --- /dev/null +++ b/templates/repo/editor/cherry_pick.tmpl @@ -0,0 +1,30 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + + +
    + +
    + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl new file mode 100644 index 0000000..9f81b1d --- /dev/null +++ b/templates/repo/editor/commit_form.tmpl @@ -0,0 +1,82 @@ +
    + {{ctx.AvatarUtils.Avatar .SignedUser 48 "commit-avatar"}} +
    +

    {{- if .CanCommitToBranch.WillSign}} + {{svg "octicon-lock" 24}} + {{ctx.Locale.Tr "repo.editor.commit_signed_changes"}} + {{- else}} + {{svg "octicon-unlock" 24}} + {{ctx.Locale.Tr "repo.editor.commit_changes"}} + {{- end}}

    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + {{if not .Repository.IsEmpty}} +
    +
    + {{if .CanCreatePullRequest}} + + {{else}} + + {{end}} + +
    +
    +
    +
    + {{svg "octicon-git-branch"}} + + +
    +
    + {{end}} +
    +
    + + +
    +
    + + {{ctx.Locale.Tr "repo.editor.cancel"}} +
    diff --git a/templates/repo/editor/delete.tmpl b/templates/repo/editor/delete.tmpl new file mode 100644 index 0000000..2c0c2fc --- /dev/null +++ b/templates/repo/editor/delete.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/editor/diff_preview.tmpl b/templates/repo/editor/diff_preview.tmpl new file mode 100644 index 0000000..e2e922b --- /dev/null +++ b/templates/repo/editor/diff_preview.tmpl @@ -0,0 +1,11 @@ +
    +
    +
    + + + {{template "repo/diff/section_unified" dict "file" .File "root" $}} + +
    +
    +
    +
    diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl new file mode 100644 index 0000000..71cecf1 --- /dev/null +++ b/templates/repo/editor/edit.tmpl @@ -0,0 +1,74 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + +
    + +
    + + {{template "repo/editor/commit_form" .}} +
    +
    + +
    +{{template "base/footer" .}} diff --git a/templates/repo/editor/patch.tmpl b/templates/repo/editor/patch.tmpl new file mode 100644 index 0000000..1f046a8 --- /dev/null +++ b/templates/repo/editor/patch.tmpl @@ -0,0 +1,57 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} + + +
    + +
    + + {{template "repo/editor/commit_form" .}} +
    +
    + + +
    +{{template "base/footer" .}} diff --git a/templates/repo/editor/upload.tmpl b/templates/repo/editor/upload.tmpl new file mode 100644 index 0000000..5725020 --- /dev/null +++ b/templates/repo/editor/upload.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    + +
    +
    + {{template "repo/upload" .}} +
    + {{template "repo/editor/commit_form" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl new file mode 100644 index 0000000..7613643 --- /dev/null +++ b/templates/repo/empty.tmpl @@ -0,0 +1,82 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "base/alert" .}} + {{if .Repository.IsArchived}} +
    + {{if .Repository.ArchivedUnix.IsZero}} + {{ctx.Locale.Tr "repo.archive.title"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}} + {{end}} +
    + {{end}} + {{if .Repository.IsBroken}} +
    + {{ctx.Locale.Tr "repo.broken_message"}} +
    + {{else if .CanWriteCode}} +

    + {{ctx.Locale.Tr "repo.quick_guide"}} +

    +
    +
    +

    {{ctx.Locale.Tr "repo.clone_this_repo"}} {{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository"}}

    + +
    + {{if and .CanWriteCode (not .Repository.IsArchived)}} + + {{ctx.Locale.Tr "repo.editor.new_file"}} + + {{if .RepositoryUploadEnabled}} + + {{ctx.Locale.Tr "repo.editor.upload_file"}} + + {{end}} + {{end}} +
    + {{template "repo/clone_buttons" .}} +
    +
    +
    + + {{if not .Repository.IsArchived}} +
    + +
    +

    {{ctx.Locale.Tr "repo.create_new_repo_command"}}

    +
    +
    touch README.md
    +git init
    +{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
    +git add README.md
    +git commit -m "first commit"
    +git remote add origin {{$.CloneButtonOriginLink.HTTPS}}
    +git push -u origin {{.Repository.DefaultBranch}}
    +
    +
    +
    + +
    +

    {{ctx.Locale.Tr "repo.push_exist_repo"}}

    +
    +
    git remote add origin {{$.CloneButtonOriginLink.HTTPS}}
    +git push -u origin {{.Repository.DefaultBranch}}
    +
    +
    + {{end}} + {{else}} +
    + {{ctx.Locale.Tr "repo.empty_message"}} +
    + {{end}} + {{template "repo/clone_script" .}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/file_info.tmpl b/templates/repo/file_info.tmpl new file mode 100644 index 0000000..6ae7c15 --- /dev/null +++ b/templates/repo/file_info.tmpl @@ -0,0 +1,53 @@ +
    + {{if .FileIsSymlink}} +
    + {{ctx.Locale.Tr "repo.symbolic_link"}} +
    + {{end}} + {{if .NumLinesSet}}{{/* Explicit attribute needed to show 0 line changes */}} +
    + {{.NumLines}} {{ctx.Locale.TrN .NumLines "repo.line" "repo.lines"}} +
    + {{end}} + {{if .HasNoTrailingEOL}} +
    + {{ctx.Locale.Tr "repo.no_eol.text"}} +
    + {{end}} + {{if .FileSize}} +
    + {{ctx.Locale.TrSize .FileSize}}{{if .IsLFSFile}} ({{ctx.Locale.Tr "repo.stored_lfs"}}){{end}} +
    + {{end}} + {{if .LFSLock}} +
    + {{svg "octicon-lock" 16 "tw-mr-1"}} + {{.LFSLockOwner}} +
    + {{end}} + {{if .LexerName}} +
    + {{.LexerName}} +
    + {{end}} + {{if .IsExecutable}} +
    + {{ctx.Locale.Tr "repo.executable_file"}} +
    + {{end}} + {{if .IsVendored}} +
    + {{ctx.Locale.Tr "repo.vendored"}} +
    + {{end}} + {{if .IsGenerated}} +
    + {{ctx.Locale.Tr "repo.generated"}} +
    + {{end}} + {{if .ImageSize}} +
    + {{.ImageSize}} +
    + {{end}} +
    diff --git a/templates/repo/find/files.tmpl b/templates/repo/find/files.tmpl new file mode 100644 index 0000000..548ce2f --- /dev/null +++ b/templates/repo/find/files.tmpl @@ -0,0 +1,21 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{.RepoName}} + / +
    + +
    +
    + + + +
    +
    +

    {{ctx.Locale.Tr "repo.find_file.no_matching"}}

    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/flags.tmpl b/templates/repo/flags.tmpl new file mode 100644 index 0000000..620357b --- /dev/null +++ b/templates/repo/flags.tmpl @@ -0,0 +1,33 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    +

    + {{ctx.Locale.Tr "repo.admin.manage_flags"}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{ctx.Locale.Tr "repo.admin.enabled_flags"}} +
    + {{range $flag, $checked := .Flags}} +
    +
    + + +
    +
    + {{end}} +
    + +
    + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl new file mode 100644 index 0000000..412c59b --- /dev/null +++ b/templates/repo/forks.tmpl @@ -0,0 +1,18 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    + {{ctx.Locale.Tr "repo.forks"}} +

    + {{range .Forks}} +
    + {{ctx.AvatarUtils.Avatar .Owner}} + {{.Owner.Name}} / {{.Name}} +
    + {{end}} +
    + + {{template "base/paginate" .}} +
    +{{template "base/footer" .}} diff --git a/templates/repo/graph.tmpl b/templates/repo/graph.tmpl new file mode 100644 index 0000000..04b056c --- /dev/null +++ b/templates/repo/graph.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    +
    +

    {{ctx.Locale.Tr "repo.commit_graph"}}

    + +
    +
    + + +
    +
    +
    +
    + {{template "repo/graph/svgcontainer" .}} + {{template "repo/graph/commits" .}} +
    +
    +
    +
    + +{{template "base/footer" .}} diff --git a/templates/repo/graph/commits.tmpl b/templates/repo/graph/commits.tmpl new file mode 100644 index 0000000..5c768f3 --- /dev/null +++ b/templates/repo/graph/commits.tmpl @@ -0,0 +1,79 @@ +
    + +
    diff --git a/templates/repo/graph/div.tmpl b/templates/repo/graph/div.tmpl new file mode 100644 index 0000000..c0bd4e2 --- /dev/null +++ b/templates/repo/graph/div.tmpl @@ -0,0 +1,7 @@ +
    + {{template "repo/graph/svgcontainer" .}} + {{template "repo/graph/commits" .}} + +
    diff --git a/templates/repo/graph/svgcontainer.tmpl b/templates/repo/graph/svgcontainer.tmpl new file mode 100644 index 0000000..99c3c87 --- /dev/null +++ b/templates/repo/graph/svgcontainer.tmpl @@ -0,0 +1,24 @@ +
    + + {{range $flowid, $flow := .Graph.Flows}} + + + {{range $flow.Commits}} + + {{end}} + + {{end}} + +
    diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl new file mode 100644 index 0000000..777453e --- /dev/null +++ b/templates/repo/header.tmpl @@ -0,0 +1,201 @@ +
    +{{with .Repository}} +
    +
    +
    +
    + {{template "repo/icon" .}} +
    + +
    + {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} +
    {{svg "octicon-archive" 18}}
    + {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} +
    {{svg "octicon-lock" 18}}
    + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} +
    {{svg "octicon-shield-lock" 18}}
    + {{end}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} +
    {{svg "octicon-repo-template" 18}}
    + {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} + {{end}} +
    +
    + {{if not (or .IsBeingCreated .IsBroken)}} +
    + {{if $.RepoTransfer}} +
    + {{$.CsrfTokenHtml}} +
    + +
    +
    +
    + {{$.CsrfTokenHtml}} +
    + +
    +
    + {{end}} + {{if $.EnableFeed}} + {{/* An extra div-element is not necessary here, as this button does not secretly contain two buttons. */}} + + {{svg "octicon-rss" 16}} + + {{end}} + {{template "repo/watch_unwatch" $}} + {{if not $.DisableStars}} + {{template "repo/star_unstar" $}} + {{end}} + {{if not $.DisableForks}} + {{template "repo/header_fork" $}} + {{end}} +
    + {{end}} +
    + {{if $.PullMirror}} +
    + {{ctx.Locale.Tr "repo.mirror_from"}} + {{$.PullMirror.RemoteAddress}} + {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}} +
    + {{end}} + {{if .IsFork}}
    {{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
    {{end}} + {{if .IsGenerated}}
    {{ctx.Locale.Tr "repo.generated_from"}} {{(.TemplateRepo ctx).FullName}}
    {{end}} +
    +{{end}} + + {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} +
    + {{if .Permission.CanRead $.UnitTypeCode}} + + {{svg "octicon-code"}} {{ctx.Locale.Tr "repo.code"}} + + {{end}} + + {{if .Permission.CanRead $.UnitTypeIssues}} + + {{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues"}} + {{if .Repository.NumOpenIssues}} + {{CountFmt .Repository.NumOpenIssues}} + {{end}} + + {{end}} + + {{if .Permission.CanRead $.UnitTypeExternalTracker}} + + {{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues"}} + + {{end}} + + {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} + + {{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.pulls"}} + {{if .Repository.NumOpenPulls}} + {{CountFmt .Repository.NumOpenPulls}} + {{end}} + + {{end}} + + {{if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}} + + {{svg "octicon-project"}} {{ctx.Locale.Tr "repo.project"}} + {{if .Repository.NumOpenProjects}} + {{CountFmt .Repository.NumOpenProjects}} + {{end}} + + {{end}} + + {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo)}} + + {{svg "octicon-tag"}} {{ctx.Locale.Tr "repo.releases"}} + {{if .NumReleases}} + {{CountFmt .NumReleases}} + {{end}} + + {{end}} + + {{if .Permission.CanRead $.UnitTypePackages}} + + {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}} + {{if .NumPackages}} + {{CountFmt .NumPackages}} + {{end}} + + {{end}} + + {{if .Permission.CanRead $.UnitTypeWiki}} + + {{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}} + + {{end}} + + {{if .Permission.CanRead $.UnitTypeExternalWiki}} + + {{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.wiki"}} + + {{end}} + + {{if and (.Permission.CanReadAny $.UnitTypeCode $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases)}} + + {{svg "octicon-pulse"}} {{ctx.Locale.Tr "repo.activity"}} + + {{end}} + + {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}} + + {{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}} + {{if .Repository.NumOpenActionRuns}} + {{CountFmt .Repository.NumOpenActionRuns}} + {{end}} + + {{end}} + + {{template "custom/extra_tabs" .}} + + {{if and RepoFlagsEnabled .SignedUser.IsAdmin}} + + {{svg "octicon-milestone"}} {{ctx.Locale.Tr "repo.admin.manage_flags"}} + + {{end}} + + {{if .Permission.IsAdmin}} + {{$highlightSettings := true}} + {{if and .SignedUser.EnableRepoUnitHints (not (.Repository.AllUnitsEnabled ctx))}} + {{$highlightSettings = false}} + + {{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.settings.units.add_more"}} + + {{end}} + + {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} + + {{end}} +
    + {{else if .Permission.IsAdmin}} + + {{end}} +
    +
    +
    diff --git a/templates/repo/header_fork.tmpl b/templates/repo/header_fork.tmpl new file mode 100644 index 0000000..de83000 --- /dev/null +++ b/templates/repo/header_fork.tmpl @@ -0,0 +1,52 @@ +{{with .Repository}} +{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}} +
    + + {{svg "octicon-repo-forked"}}{{ctx.Locale.Tr "repo.fork"}} + + + + {{CountFmt .NumForks}} + +
    +{{end}} +{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl new file mode 100644 index 0000000..f2a6179 --- /dev/null +++ b/templates/repo/home.tmpl @@ -0,0 +1,164 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + {{template "repo/code/recently_pushed_new_branches" .}} + {{if and (not .HideRepoInfo) (not .IsBlame)}} +
    +
    + {{$description := .Repository.DescriptionHTML $.Context}} + {{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.no_desc"}}{{end}} + {{if .Repository.Website}}{{.Repository.Website}}{{end}} +
    +
    +
    + + {{template "shared/search/button"}} +
    +
    +
    +
    + {{/* it should match the code in issue-home.js */}} + {{range .Topics}}{{.Name}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{end}} +
    + {{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} +
    + +
    + + +
    +
    + {{end}} + + {{if RepoFlagsEnabled}} + {{template "custom/repo_flag_banners" .}} + {{if .SignedUser.IsAdmin}} + {{template "repo/admin_flags" .}} + {{end}} + {{end}} + + {{if .Repository.IsArchived}} +
    + {{if .Repository.ArchivedUnix.IsZero}} + {{ctx.Locale.Tr "repo.archive.title"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}} + {{end}} +
    + {{end}} + {{template "repo/sub_menu" .}} + {{$n := len .TreeNames}} + {{$l := Eval $n "-" 1}} + {{$isHomepage := (eq $n 0)}} +
    +
    + {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} + {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} + {{$cmpBranch := ""}} + {{if ne .Repository.ID .BaseRepo.ID}} + {{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}} + {{end}} + {{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}} + {{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}} + + {{svg "octicon-git-pull-request"}} + + {{end}} + + {{if $isHomepage}} + {{ctx.Locale.Tr "repo.find_file.go_to_file"}} + {{end}} + + {{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}} + + {{end}} + + {{if and $isHomepage (.Repository.IsTemplate)}} + + {{ctx.Locale.Tr "repo.use_template"}} + + {{end}} + {{if (not $isHomepage)}} + + {{StringUtils.EllipsisString .Repository.Name 30}} + {{- range $i, $v := .TreeNames -}} + / + {{- if eq $i $l -}} + {{$v}} + {{- else -}} + {{$p := index $.Paths $i}}{{$v}} + {{- end -}} + {{- end -}} + + {{end}} +
    +
    + + {{if $isHomepage}} +
    + {{template "repo/clone_buttons" .}} + + {{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}} +
    + {{template "repo/cite/cite_modal" .}} + {{end}} + {{if and (not $isHomepage) (not .IsViewFile) (not .IsBlame)}}{{/* IsViewDirectory (not home), TODO: split the templates, avoid using "if" tricks */}} + + {{svg "octicon-history" 16 "tw-mr-2"}}{{ctx.Locale.Tr "repo.file_history"}} + + {{end}} +
    +
    + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}}{{/* IsViewDirectory */}} + {{template "repo/view_list" .}} + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl new file mode 100644 index 0000000..e5e0bd6 --- /dev/null +++ b/templates/repo/icon.tmpl @@ -0,0 +1,10 @@ +{{$avatarLink := (.RelAvatarLink ctx)}} +{{if $avatarLink}} + {{.FullName}} +{{else if $.IsMirror}} + {{svg "octicon-mirror" 24}} +{{else if $.IsFork}} + {{svg "octicon-repo-forked" 24}} +{{else}} + {{svg "octicon-repo" 24}} +{{end}} diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl new file mode 100644 index 0000000..0b255d6 --- /dev/null +++ b/templates/repo/issue/card.tmpl @@ -0,0 +1,78 @@ +{{with .Issue}} + {{if eq $.Page.Project.CardType 1}}{{/* Images and Text*/}} + {{$attachments := index $.Page.issuesAttachmentMap .ID}} + {{if $attachments}} +
    + {{range $attachments}} + {{.Name}} + {{end}} +
    + {{end}} + {{end}} +
    +
    +
    + {{template "shared/issueicon" .}} +
    + {{RenderRefIssueTitle $.Context .Title}} + {{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}} + + {{svg "octicon-x" 16}} + + {{end}} +
    +
    + + {{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}} + {{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}} + {{if .OriginalAuthor}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{else if gt .Poster.ID 0}} + {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{else}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{end}} + +
    + {{if .MilestoneID}} + + {{end}} + {{if $.Page.LinkedPRs}} + {{range index $.Page.LinkedPRs .ID}} + + {{end}} + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} +
    + {{svg "octicon-checklist" 16 "tw-mr-1 tw-align-middle"}} + {{.GetTasksDone}} / {{$tasks}} +
    + {{end}} +
    + + {{if or .Labels .Assignees}} +
    +
    + {{range .Labels}} + {{RenderLabel ctx ctx.Locale .}} + {{end}} +
    +
    + {{range .Assignees}} + {{ctx.AvatarUtils.Avatar . 28}} + {{end}} +
    +
    + {{end}} +{{end}} diff --git a/templates/repo/issue/choose.tmpl b/templates/repo/issue/choose.tmpl new file mode 100644 index 0000000..38cf9e4 --- /dev/null +++ b/templates/repo/issue/choose.tmpl @@ -0,0 +1,59 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{template "repo/issue/navbar" .}} +
    +
    + {{range .IssueTemplates}} +
    +
    +
    + {{.Name}} +
    {{.About}} +
    + +
    +
    + {{end}} + {{range .IssueConfig.ContactLinks}} + + {{end}} + {{if .IssueConfig.BlankIssuesEnabled}} +
    +
    +
    + {{ctx.Locale.Tr "repo.issues.choose.blank"}} +
    {{ctx.Locale.Tr "repo.issues.choose.blank_about"}} +
    + +
    +
    + {{end}} + {{- if .IssueConfigError}}{{/* normal warning flash makes problems here*/}} +
    +
    +
    {{ctx.Locale.Tr "repo.issues.choose.invalid_config"}}
    +
    {{.IssueConfigError}}
    +
    +
    + {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl new file mode 100644 index 0000000..4197ea4 --- /dev/null +++ b/templates/repo/issue/comment_tab.tmpl @@ -0,0 +1,21 @@ +{{$textareaContent := .BodyQuery}} +{{if not $textareaContent}}{{$textareaContent = .IssueTemplate}}{{end}} +{{if not $textareaContent}}{{$textareaContent = .PullRequestTemplate}}{{end}} +{{if not $textareaContent}}{{$textareaContent = .content}}{{end}} + +
    + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaContent" $textareaContent + "TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder") + "DropzoneParentContainer" "form, .ui.form" + )}} +
    + +{{if .IsAttachmentEnabled}} +
    + {{template "repo/upload" .}} +
    +{{end}} diff --git a/templates/repo/issue/fields/checkboxes.tmpl b/templates/repo/issue/fields/checkboxes.tmpl new file mode 100644 index 0000000..531f401 --- /dev/null +++ b/templates/repo/issue/fields/checkboxes.tmpl @@ -0,0 +1,14 @@ +
    + {{template "repo/issue/fields/header" .}} + {{range $i, $opt := .item.Attributes.options}} +
    +
    + + +
    + {{if $opt.required}} + + {{end}} +
    + {{end}} +
    diff --git a/templates/repo/issue/fields/dropdown.tmpl b/templates/repo/issue/fields/dropdown.tmpl new file mode 100644 index 0000000..26505f5 --- /dev/null +++ b/templates/repo/issue/fields/dropdown.tmpl @@ -0,0 +1,17 @@ +
    + {{template "repo/issue/fields/header" .}} + {{/* FIXME: required validation */}} + +
    diff --git a/templates/repo/issue/fields/header.tmpl b/templates/repo/issue/fields/header.tmpl new file mode 100644 index 0000000..06c41af --- /dev/null +++ b/templates/repo/issue/fields/header.tmpl @@ -0,0 +1,6 @@ +{{if and (.item.Attributes.label) (not .item.Attributes.hide_label)}} +

    {{.item.Attributes.label}}{{if .item.Validations.required}}{{end}}

    +{{end}} +{{if .item.Attributes.description}} + {{RenderMarkdownToHtml .Context .item.Attributes.description}} +{{end}} diff --git a/templates/repo/issue/fields/input.tmpl b/templates/repo/issue/fields/input.tmpl new file mode 100644 index 0000000..039f9a9 --- /dev/null +++ b/templates/repo/issue/fields/input.tmpl @@ -0,0 +1,4 @@ +
    + {{template "repo/issue/fields/header" .}} + +
    diff --git a/templates/repo/issue/fields/markdown.tmpl b/templates/repo/issue/fields/markdown.tmpl new file mode 100644 index 0000000..934699e --- /dev/null +++ b/templates/repo/issue/fields/markdown.tmpl @@ -0,0 +1,3 @@ +
    +
    {{RenderMarkdownToHtml .Context .item.Attributes.value}}
    +
    diff --git a/templates/repo/issue/fields/textarea.tmpl b/templates/repo/issue/fields/textarea.tmpl new file mode 100644 index 0000000..3ad69e1 --- /dev/null +++ b/templates/repo/issue/fields/textarea.tmpl @@ -0,0 +1,24 @@ +{{$useMarkdownEditor := not .item.Attributes.render}} +
    + {{template "repo/issue/fields/header" .}} + + {{/* the real form element to provide the value */}} + + + {{if $useMarkdownEditor}} + {{template "shared/combomarkdowneditor" (dict + "ContainerClasses" "tw-hidden" + "MarkdownPreviewUrl" (print .root.RepoLink "/markup") + "MarkdownPreviewContext" .root.RepoLink + "TextareaContent" .item.Attributes.value + "TextareaPlaceholder" .item.Attributes.placeholder + "DropzoneParentContainer" ".combo-editor-dropzone" + )}} + + {{if .root.IsAttachmentEnabled}} +
    + {{template "repo/upload" .root}} +
    + {{end}} + {{end}} +
    diff --git a/templates/repo/issue/filter_actions.tmpl b/templates/repo/issue/filter_actions.tmpl new file mode 100644 index 0000000..58b1ef8 --- /dev/null +++ b/templates/repo/issue/filter_actions.tmpl @@ -0,0 +1,128 @@ + + diff --git a/templates/repo/issue/filter_list.tmpl b/templates/repo/issue/filter_list.tmpl new file mode 100644 index 0000000..09f87b5 --- /dev/null +++ b/templates/repo/issue/filter_list.tmpl @@ -0,0 +1,158 @@ + +{{template "shared/label_filter" .}} + +{{if not .Milestone}} + + +{{end}} + + + + + + + + + + +{{if .IsSigned}} + + +{{end}} + + + diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl new file mode 100644 index 0000000..06e7c1a --- /dev/null +++ b/templates/repo/issue/filters.tmpl @@ -0,0 +1,26 @@ +
    +
    + {{if and $.CanWriteIssuesOrPulls .Issues}} + + {{end}} + {{template "repo/issue/openclose" .}} + + {{if .TotalTrackedTime}} + + {{end}} +
    +
    + +
    +
    diff --git a/templates/repo/issue/label_precolors.tmpl b/templates/repo/issue/label_precolors.tmpl new file mode 100644 index 0000000..8000766 --- /dev/null +++ b/templates/repo/issue/label_precolors.tmpl @@ -0,0 +1,22 @@ +
    +
    + + + + + + + + +
    +
    + + + + + + + + +
    +
    diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl new file mode 100644 index 0000000..230777e --- /dev/null +++ b/templates/repo/issue/labels.tmpl @@ -0,0 +1,22 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{template "repo/issue/navbar" .}} + {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} + + {{end}} +
    + {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} + {{template "repo/issue/labels/label_new" .}} + {{end}} + {{template "base/alert" .}} + {{template "repo/issue/labels/label_list" .}} +
    +
    + +{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} + {{template "repo/issue/labels/edit_delete_label" .}} +{{end}} +{{template "base/footer" .}} diff --git a/templates/repo/issue/labels/edit_delete_label.tmpl b/templates/repo/issue/labels/edit_delete_label.tmpl new file mode 100644 index 0000000..fcf6921 --- /dev/null +++ b/templates/repo/issue/labels/edit_delete_label.tmpl @@ -0,0 +1,72 @@ + + + diff --git a/templates/repo/issue/labels/label.tmpl b/templates/repo/issue/labels/label.tmpl new file mode 100644 index 0000000..7844362 --- /dev/null +++ b/templates/repo/issue/labels/label.tmpl @@ -0,0 +1,8 @@ + + {{- RenderLabel $.Context ctx.Locale .label -}} + diff --git a/templates/repo/issue/labels/label_archived.tmpl b/templates/repo/issue/labels/label_archived.tmpl new file mode 100644 index 0000000..feaf77e --- /dev/null +++ b/templates/repo/issue/labels/label_archived.tmpl @@ -0,0 +1,5 @@ +{{if .IsArchived}} + + {{ctx.Locale.Tr "archived"}} + +{{end}} diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl new file mode 100644 index 0000000..8d7fc2c --- /dev/null +++ b/templates/repo/issue/labels/label_list.tmpl @@ -0,0 +1,88 @@ +

    + {{ctx.Locale.Tr "repo.issues.label_count" .NumLabels}} + +

    + +
    + {{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived)}} + {{template "repo/issue/labels/label_load_template" .}} +
    + {{else if and ($.PageIsOrgSettingsLabels) (eq .NumLabels 0)}} + {{template "repo/issue/labels/label_load_template" .}} +
    + {{end}} + + +
    diff --git a/templates/repo/issue/labels/label_load_template.tmpl b/templates/repo/issue/labels/label_load_template.tmpl new file mode 100644 index 0000000..0249430 --- /dev/null +++ b/templates/repo/issue/labels/label_load_template.tmpl @@ -0,0 +1,24 @@ +
    +
    +
    +

    {{ctx.Locale.Tr "repo.issues.label_templates.info"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    +
    +
    diff --git a/templates/repo/issue/labels/label_new.tmpl b/templates/repo/issue/labels/label_new.tmpl new file mode 100644 index 0000000..32fd8e7 --- /dev/null +++ b/templates/repo/issue/labels/label_new.tmpl @@ -0,0 +1,48 @@ + diff --git a/templates/repo/issue/labels/labels_selector_field.tmpl b/templates/repo/issue/labels/labels_selector_field.tmpl new file mode 100644 index 0000000..9e54e7a --- /dev/null +++ b/templates/repo/issue/labels/labels_selector_field.tmpl @@ -0,0 +1,46 @@ + diff --git a/templates/repo/issue/labels/labels_sidebar.tmpl b/templates/repo/issue/labels/labels_sidebar.tmpl new file mode 100644 index 0000000..81fc970 --- /dev/null +++ b/templates/repo/issue/labels/labels_sidebar.tmpl @@ -0,0 +1,11 @@ +
    + {{ctx.Locale.Tr "repo.issues.new.no_label"}} + + {{range .root.Labels}} + {{template "repo/issue/labels/label" dict "root" $.root "label" .}} + {{end}} + {{range .root.OrgLabels}} + {{template "repo/issue/labels/label" dict "root" $.root "label" .}} + {{end}} + +
    diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl new file mode 100644 index 0000000..8c81bf0 --- /dev/null +++ b/templates/repo/issue/list.tmpl @@ -0,0 +1,55 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + + {{if .PinnedIssues}} +
    + {{range .PinnedIssues}} +
    + {{template "repo/issue/card" (dict "Issue" . "Page" $ "isPinnedIssueCard" true)}} +
    + {{end}} +
    + {{end}} + +
    + {{template "repo/issue/navbar" .}} + {{template "repo/issue/search" .}} + {{if not .Repository.IsArchived}} + {{if .PageIsIssueList}} + {{ctx.Locale.Tr "repo.issues.new"}} + {{else}} + {{ctx.Locale.Tr "repo.pulls.new"}} + {{end}} + {{else}} + {{if not .PageIsIssueList}} + {{ctx.Locale.Tr "action.compare_commits_general"}} + {{end}} + {{end}} +
    + + {{template "repo/issue/filters" .}} + +
    +
    + {{template "repo/issue/openclose" .}} + + {{if .TotalTrackedTime}} + + {{end}} +
    +
    + {{template "repo/issue/filter_actions" .}} +
    +
    + {{template "shared/issuelist" dict "." . "listType" "repo"}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/milestone/filter_list.tmpl b/templates/repo/issue/milestone/filter_list.tmpl new file mode 100644 index 0000000..cc45d3b --- /dev/null +++ b/templates/repo/issue/milestone/filter_list.tmpl @@ -0,0 +1,16 @@ + + diff --git a/templates/repo/issue/milestone/select_menu.tmpl b/templates/repo/issue/milestone/select_menu.tmpl new file mode 100644 index 0000000..570acc2 --- /dev/null +++ b/templates/repo/issue/milestone/select_menu.tmpl @@ -0,0 +1,39 @@ +{{$useHTMX := not .NewIssuePage}} +{{if or .OpenMilestones .ClosedMilestones}} + +
    +{{end}} +
    {{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}
    +{{if and (not .OpenMilestones) (not .ClosedMilestones)}} +
    + {{ctx.Locale.Tr "repo.issues.new.no_items"}} +
    +{{else}} + {{if .OpenMilestones}} +
    +
    + {{ctx.Locale.Tr "repo.issues.new.open_milestone"}} +
    + {{range .OpenMilestones}} + + {{svg "octicon-milestone" 16 "tw-mr-1"}} + {{.Name}} + + {{end}} + {{end}} + {{if .ClosedMilestones}} +
    +
    + {{ctx.Locale.Tr "repo.issues.new.closed_milestone"}} +
    + {{range .ClosedMilestones}} + + {{svg "octicon-milestone" 16 "tw-mr-1"}} + {{.Name}} + + {{end}} + {{end}} +{{end}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl new file mode 100644 index 0000000..e5dc8cb --- /dev/null +++ b/templates/repo/issue/milestone_issues.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    +

    {{.Milestone.Name}}

    + {{if not .Repository.IsArchived}} +
    + {{if or .CanWriteIssues .CanWritePulls}} + {{if .Milestone.IsClosed}} + {{ctx.Locale.Tr "repo.milestones.open"}} + + {{else}} + {{ctx.Locale.Tr "repo.milestones.close"}} + + {{end}} + {{ctx.Locale.Tr "repo.milestones.edit"}} + {{end}} + {{ctx.Locale.Tr "repo.issues.new"}} +
    + {{end}} +
    + {{if .Milestone.RenderedContent}} +
    + {{.Milestone.RenderedContent}} +
    + {{end}} +
    + +
    +
    + {{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix ctx.Locale}} + {{if .IsClosed}} + {{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} + {{else}} + + {{if .Milestone.DeadlineString}} + + {{svg "octicon-calendar"}} + {{DateTime "short" .Milestone.DeadlineString}} + + {{else}} + {{svg "octicon-calendar"}} + {{ctx.Locale.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +
    +
    {{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness}}
    + {{if .TotalTrackedTime}} +
    + {{svg "octicon-clock"}} + {{.TotalTrackedTime | Sec2Time}} +
    + {{end}} +
    +
    +
    + + {{template "repo/issue/filters" .}} + + {{template "shared/issuelist" dict "." . "listType" "milestone"}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl new file mode 100644 index 0000000..9f32df0 --- /dev/null +++ b/templates/repo/issue/milestone_new.tmpl @@ -0,0 +1,59 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{template "repo/issue/navbar" .}} + {{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}} + + {{end}} +
    +
    +

    + {{if .PageIsEditMilestone}} + {{ctx.Locale.Tr "repo.milestones.edit"}} +
    {{ctx.Locale.Tr "repo.milestones.edit_subheader"}}
    + {{else}} + {{ctx.Locale.Tr "repo.milestones.new"}} +
    {{ctx.Locale.Tr "repo.milestones.new_subheader"}}
    + {{end}} +

    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + {{if .PageIsEditMilestone}} + + {{ctx.Locale.Tr "repo.milestones.cancel"}} + + + {{else}} + + {{end}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl new file mode 100644 index 0000000..63a6f6b --- /dev/null +++ b/templates/repo/issue/milestones.tmpl @@ -0,0 +1,110 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + +
    + {{template "repo/issue/navbar" .}} + {{template "repo/issue/search" .}} + {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} + + {{end}} +
    + + {{template "repo/issue/filters" .}} + + +
    + {{range .Milestones}} +
  • +
    +

    + {{svg "octicon-milestone" 16}} + {{.Name}} +

    +
    + {{.Completeness}}% + +
    +
    +
    +
    +
    + {{svg "octicon-issue-opened" 14}} + {{ctx.Locale.PrettyNumber .NumOpenIssues}} {{ctx.Locale.Tr "repo.issues.open_title"}} +
    +
    + {{svg "octicon-check" 14}} + {{ctx.Locale.PrettyNumber .NumClosedIssues}} {{ctx.Locale.Tr "repo.issues.closed_title"}} +
    + {{if .TotalTrackedTime}} +
    + {{svg "octicon-clock"}} + {{.TotalTrackedTime|Sec2Time}} +
    + {{end}} + {{if .UpdatedUnix}} +
    + {{svg "octicon-clock"}} + {{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale)}} +
    + {{end}} +
    + {{if .IsClosed}} + {{$closedDate:= TimeSinceUnix .ClosedDateUnix ctx.Locale}} + {{svg "octicon-clock" 14}} + {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} + {{else}} + {{if .DeadlineString}} + + {{svg "octicon-calendar" 14}} + {{DateTime "short" .DeadlineString}} + + {{else}} + {{svg "octicon-calendar" 14}} + {{ctx.Locale.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +
    +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} + + {{end}} +
    + {{if .Content}} +
    + {{.RenderedContent}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    +
    +
    + +{{if or .CanWriteIssues .CanWritePulls}} + +{{end}} +{{template "base/footer" .}} diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl new file mode 100644 index 0000000..30e42c7 --- /dev/null +++ b/templates/repo/issue/navbar.tmpl @@ -0,0 +1,4 @@ + diff --git a/templates/repo/issue/new.tmpl b/templates/repo/issue/new.tmpl new file mode 100644 index 0000000..ccd45fd --- /dev/null +++ b/templates/repo/issue/new.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/issue/new_form" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl new file mode 100644 index 0000000..c2cf4ee --- /dev/null +++ b/templates/repo/issue/new_form.tmpl @@ -0,0 +1,155 @@ +{{if .Flash}} +{{template "base/alert" .}} +{{end}} +
    + {{.CsrfTokenHtml}} +
    +
    +
    + {{ctx.AvatarUtils.Avatar .SignedUser 40}} +
    +
    + + {{if .PageIsComparePull}} +
    {{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}
    + {{end}} +
    + {{if .Fields}} + + {{range .Fields}} + {{if eq .Type "input"}} + {{template "repo/issue/fields/input" dict "Context" $.Context "item" .}} + {{else if eq .Type "markdown"}} + {{template "repo/issue/fields/markdown" dict "Context" $.Context "item" .}} + {{else if eq .Type "textarea"}} + {{template "repo/issue/fields/textarea" dict "Context" $.Context "item" . "root" $}} + {{else if eq .Type "dropdown"}} + {{template "repo/issue/fields/dropdown" dict "Context" $.Context "item" .}} + {{else if eq .Type "checkboxes"}} + {{template "repo/issue/fields/checkboxes" dict "Context" $.Context "item" .}} + {{end}} + {{end}} + {{else}} + {{template "repo/issue/comment_tab" .}} + {{end}} +
    + +
    +
    +
    +
    +
    + +
    + {{template "repo/issue/view_content/sidebar/branch_selector_field" .}} + + + {{template "repo/issue/labels/labels_selector_field" .}} + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} + +
    + + + +
    + {{ctx.Locale.Tr "repo.issues.new.no_milestone"}} + +
    + + {{if .IsProjectsEnabled}} +
    + + + +
    + {{ctx.Locale.Tr "repo.issues.new.no_projects"}} + +
    + {{end}} +
    + {{template "repo/issue/view_content/sidebar/assignees" dict "isExistingIssue" false "." .}} + {{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}} +
    +
    +
    + + +
    +
    + {{end}} +
    + +
    diff --git a/templates/repo/issue/openclose.tmpl b/templates/repo/issue/openclose.tmpl new file mode 100644 index 0000000..eb2d6e0 --- /dev/null +++ b/templates/repo/issue/openclose.tmpl @@ -0,0 +1,16 @@ + diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl new file mode 100644 index 0000000..f1c0ea3 --- /dev/null +++ b/templates/repo/issue/search.tmpl @@ -0,0 +1,20 @@ + diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl new file mode 100644 index 0000000..1ef9e73 --- /dev/null +++ b/templates/repo/issue/view.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/issue/view_title" .}} + {{if .Issue.IsPull}} + {{template "repo/pulls/tab_menu" .}} + {{end}} + {{template "repo/issue/view_content" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl new file mode 100644 index 0000000..683dea8 --- /dev/null +++ b/templates/repo/issue/view_content.tmpl @@ -0,0 +1,188 @@ +
    + + + + + + + + {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} +
    +
    +
    + {{if .Issue.OriginalAuthor}} + + {{ctx.AvatarUtils.Avatar nil 40}} + + {{else}} + + {{ctx.AvatarUtils.Avatar .Issue.Poster 40}} + + {{end}} +
    +
    +
    + {{if .Issue.OriginalAuthor}} + + {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} + {{.Issue.OriginalAuthor}} + + + {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} + + + {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}} + + {{else}} + + {{ctx.AvatarUtils.Avatar .Issue.Poster 24}} + + + {{template "shared/user/authorlink" .Issue.Poster}} + {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} + + {{end}} +
    +
    + {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true "IsPull" .Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} + {{end}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}} +
    +
    +
    +
    + {{if .Issue.RenderedContent}} + {{.Issue.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Issue.Content}}
    +
    + {{if .Issue.Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}} + {{end}} +
    + {{$reactions := .Issue.Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}} + {{end}} +
    +
    + + {{template "repo/issue/view_content/comments" .}} +
    + + {{if and .Issue.IsPull (not $.Repository.IsArchived)}} + {{template "repo/issue/view_content/pull".}} + {{end}} + + {{if .IsSigned}} + {{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}} +
    + + {{ctx.AvatarUtils.Avatar .SignedUser 40}} + +
    +
    + {{template "repo/issue/comment_tab" .}} + {{.CsrfTokenHtml}} + +
    +
    +
    + {{else if .Repository.IsArchived}} +
    + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.issue.nocomment"}} + {{end}} +
    + {{end}} + {{else}} {{/* not .IsSigned */}} + {{if .Repository.IsArchived}} +
    + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.issue.nocomment"}} + {{end}} +
    + {{else}} +
    + {{ctx.Locale.Tr "repo.issues.sign_in_require_desc" .SignInLink}} +
    + {{end}} + {{end}}{{/* end if: .IsSigned */}} +
    +
    + + {{template "repo/issue/view_content/sidebar" .}} +
    + + + +{{template "repo/issue/view_content/reference_issue_dialog" .}} + +
    + {{ctx.Locale.Tr "repo.issues.no_content"}} +
    + + diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl new file mode 100644 index 0000000..37931f2 --- /dev/null +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -0,0 +1,12 @@ +{{if .ctxData.IsSigned}} + +{{end}} diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl new file mode 100644 index 0000000..79085df --- /dev/null +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -0,0 +1,42 @@ +
    + {{if .Attachments}} +
    + {{end}} + {{$hasThumbnails := false}} + {{- range .Attachments -}} + + {{end -}} + + {{if $hasThumbnails}} +
    +
    + {{- range .Attachments -}} + {{if FilenameIsImage .Name}} + {{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}} + + {{.Name}} + + {{end}} + {{end}} + {{end -}} +
    + {{end}} + +
    diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl new file mode 100644 index 0000000..08c83c0 --- /dev/null +++ b/templates/repo/issue/view_content/comments.tmpl @@ -0,0 +1,691 @@ +{{template "base/alert"}} +{{range .Issue.Comments}} + {{if call $.ShouldShowCommentType .Type}} + {{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} + + + {{if eq .Type 0}} +
    + {{if .OriginalAuthor}} + + {{ctx.AvatarUtils.Avatar nil 40}} + + {{else}} + + {{ctx.AvatarUtils.Avatar .Poster 40}} + + {{end}} +
    +
    +
    + {{if .OriginalAuthor}} + + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} + {{.OriginalAuthor}} + + + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}} + + + ({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}} + + {{else}} + {{if gt .Poster.ID 0}} + + {{ctx.AvatarUtils.Avatar .Poster 24}} + + {{end}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} + + {{end}} +
    +
    + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole "IsPull" .Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} + {{end}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} +
    +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}} + {{end}} +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} + {{end}} +
    +
    + {{else if eq .Type 1}} +
    + {{svg "octicon-dot-fill"}} + {{if not .OriginalAuthor}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr}} + {{end}} + +
    + {{else if eq .Type 2}} +
    + {{svg "octicon-circle-slash"}} + {{if not .OriginalAuthor}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr}} + {{end}} + +
    + {{else if eq .Type 28}} +
    + {{svg "octicon-git-merge"}} + {{if not .OriginalAuthor}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}} + {{if eq $.Issue.PullRequest.Status 3}} + {{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (HTMLFormat `%[2]s` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "%[1]s" $.BaseTarget) $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.comment_pull_merged_at" (HTMLFormat `%[2]s` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "%[1]s" $.BaseTarget) $createdStr}} + {{end}} + +
    + {{else if eq .Type 3 5 6}} + {{$refFrom:= ""}} + {{if ne .RefRepoID .Issue.RepoID}} + {{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" .RefRepo.FullName}} + {{end}} + {{$refTr := "repo.issues.ref_issue_from"}} + {{if .Issue.IsPull}} + {{$refTr = "repo.issues.ref_pull_from"}} + {{else if eq .RefAction 1}} + {{$refTr = "repo.issues.ref_closing_from"}} + {{else if eq .RefAction 2}} + {{$refTr = "repo.issues.ref_reopening_from"}} + {{end}} + {{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} +
    + {{svg "octicon-bookmark"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{if eq .RefAction 3}}{{end}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}} + + {{if eq .RefAction 3}}{{end}} + + +
    + {{else if eq .Type 4}} +
    + {{svg "octicon-bookmark"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.pulls.commit_ref_at" .EventTag $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}} + {{end}} + +
    + {{svg "octicon-git-commit"}} + {{.Content | SanitizeHTML}} +
    +
    + {{else if eq .Type 7}} + {{if or .AddedLabels .RemovedLabels}} +
    + {{svg "octicon-tag"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if and .AddedLabels (not .RemovedLabels)}} + {{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels $.Context ctx.Locale .AddedLabels $.RepoLink .Issue.IsPull) $createdStr}} + {{else if and (not .AddedLabels) .RemovedLabels}} + {{ctx.Locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (RenderLabels $.Context ctx.Locale .RemovedLabels $.RepoLink .Issue.IsPull) $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.add_remove_labels" (RenderLabels $.Context ctx.Locale .AddedLabels $.RepoLink .Issue.IsPull) (RenderLabels $.Context ctx.Locale .RemovedLabels $.RepoLink .Issue.IsPull) $createdStr}} + {{end}} + +
    + {{end}} + {{else if eq .Type 8}} +
    + {{svg "octicon-milestone"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}} + +
    + {{else if and (eq .Type 9) (gt .AssigneeID 0)}} +
    + {{svg "octicon-person"}} + {{if .RemovedAssignee}} + {{template "shared/user/avatarlink" dict "user" .Assignee}} + + {{template "shared/user/authorlink" .Assignee}} + {{if eq .Poster.ID .Assignee.ID}} + {{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.remove_assignee_at" .Poster.GetDisplayName $createdStr}} + {{end}} + + {{else}} + {{template "shared/user/avatarlink" dict "user" .Assignee}} + + {{template "shared/user/authorlink" .Assignee}} + {{if eq .Poster.ID .AssigneeID}} + {{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.add_assignee_at" .Poster.GetDisplayName $createdStr}} + {{end}} + + {{end}} +
    + {{else if eq .Type 10}} +
    + {{svg "octicon-pencil"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.change_title_at" (RenderRefIssueTitle $.Context .OldTitle) (RenderRefIssueTitle $.Context .NewTitle) $createdStr}} + +
    + {{else if eq .Type 11}} +
    + {{svg "octicon-git-branch"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.delete_branch_at" .OldRef $createdStr}} + +
    + {{else if eq .Type 12}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}} + +
    + {{else if eq .Type 13}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.stop_tracking_history" $createdStr}} + + {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} +
    + {{svg "octicon-clock"}} + {{if .RenderedContent}} + {{/* compatibility with time comments made before v1.21 */}} + {{.RenderedContent}} + {{else}} + {{.Content|Sec2Time}} + {{end}} +
    +
    + {{else if eq .Type 14}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.add_time_history" $createdStr}} + + {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} +
    + {{svg "octicon-clock"}} + {{if .RenderedContent}} + {{/* compatibility with time comments made before v1.21 */}} + {{.RenderedContent}} + {{else}} + {{.Content|Sec2Time}} + {{end}} +
    +
    + {{else if eq .Type 15}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}} + +
    + {{else if eq .Type 16}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr}} + +
    + {{else if eq .Type 17}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{$parsedDeadline := StringUtils.Split .Content "|"}} + {{if eq (len $parsedDeadline) 2}} + {{$from := DateTime "long" (index $parsedDeadline 1)}} + {{$to := DateTime "long" (index $parsedDeadline 0)}} + {{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr}} + {{end}} + +
    + {{else if eq .Type 18}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr}} + +
    + {{else if eq .Type 19}} +
    + {{svg "octicon-package-dependents"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}} + + {{if .DependentIssue}} + + {{end}} +
    + {{else if eq .Type 20}} +
    + {{svg "octicon-package-dependents"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}} + + {{if .DependentIssue}} + + {{end}} +
    + {{else if eq .Type 22}} +
    +
    + {{if not .OriginalAuthor}} + {{/* Some timeline avatars need a offset to correctly align with their speech bubble. + The condition depends on whether the comment has contents/attachments or reviews */}} + + {{ctx.AvatarUtils.Avatar .Poster 40}} + + {{end}} + {{svg (printf "octicon-%s" .Review.Type.Icon)}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{if eq .Review.Type 1}} + {{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}} + {{else if eq .Review.Type 2}} + {{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}} + {{else if eq .Review.Type 3}} + {{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}} + {{end}} + {{if .Review.Dismissed}} +
    {{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}
    + {{end}} +
    +
    + {{if or .Content .Attachments}} +
    +
    +
    +
    + {{if gt .Poster.ID 0}} + + {{ctx.AvatarUtils.Avatar .Poster 24}} + + {{end}} + + {{if .OriginalAuthor}} + + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} + {{.OriginalAuthor}} + + {{if $.Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}} + {{else}} + {{template "shared/user/authorlink" .Poster}} + {{end}} + + {{ctx.Locale.Tr "repo.issues.review.left_comment"}} + +
    +
    + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole "IsPull" .Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} + {{end}} +
    +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}} + {{end}} +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} + {{end}} +
    +
    + {{end}} + + {{if .Review.CodeComments}} +
    + {{range $filename, $lines := .Review.CodeComments}} + {{range $line, $comms := $lines}} + {{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}} + {{end}} + {{end}} +
    + {{end}} +
    + {{else if eq .Type 23}} +
    + {{svg "octicon-lock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{if .Content}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}} + + {{else}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}} + + {{end}} +
    + {{else if eq .Type 24}} +
    + {{svg "octicon-key"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}} + +
    + {{else if eq .Type 25}} +
    + {{svg "octicon-git-branch"}} + {{if not .OriginalAuthor}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}} + +
    + {{else if eq .Type 26}} +
    + {{svg "octicon-clock"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + + {{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}} + +
    + {{svg "octicon-clock"}} + {{if .RenderedContent}} + {{/* compatibility with time comments made before v1.21 */}} + {{.RenderedContent}} + {{else}} + - {{.Content|Sec2Time}} + {{end}} +
    +
    + {{else if eq .Type 27}} +
    + {{svg "octicon-eye"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if (gt .AssigneeID 0)}} + {{if .RemovedAssignee}} + {{if eq .PosterID .AssigneeID}} + {{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.review.remove_review_request" .Assignee.GetDisplayName $createdStr}} + {{end}} + {{else}} + {{ctx.Locale.Tr "repo.issues.review.add_review_request" .Assignee.GetDisplayName $createdStr}} + {{end}} + {{else}} + + {{$teamName := "Ghost Team"}} + {{if .AssigneeTeam}} + {{$teamName = .AssigneeTeam.Name}} + {{end}} + {{if .RemovedAssignee}} + {{ctx.Locale.Tr "repo.issues.review.remove_review_request" $teamName $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.review.add_review_request" $teamName $createdStr}} + {{end}} + {{end}} + +
    + {{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}} + + {{if and .Issue.IsClosed (gt .ID $.LatestCloseCommentID)}} + {{continue}} + {{end}} +
    + {{svg "octicon-repo-push"}} + + {{template "shared/user/authorlink" .Poster}} + {{if .IsForcePush}} + {{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}} + {{else}} + {{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr}} + {{end}} + + {{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}} + + {{ctx.Locale.Tr "repo.issues.force_push_compare"}} + + {{end}} +
    + {{if not .IsForcePush}} + {{template "repo/commits_list_small" dict "comment" . "root" $}} + {{end}} + {{else if eq .Type 30}} + {{if not $.UnitProjectsGlobalDisabled}} +
    + {{svg "octicon-project"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{$oldProjectDisplayHtml := "Unknown Project"}} + {{if .OldProject}} + {{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}} + {{if not .OldProject.IsGhost}} + {{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .OldProject.Type)}} + {{end}} + {{$oldProjectDisplayHtml = HTMLFormat `%s` $tooltip .OldProject.Title}} + {{end}} + {{$newProjectDisplayHtml := "Unknown Project"}} + {{if .Project}} + {{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}} + {{if not .Project.IsGhost}} + {{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .Project.Type)}} + {{end}} + {{$newProjectDisplayHtml = HTMLFormat `%s` $tooltip .Project.Title}} + {{end}} + {{if and (gt .OldProjectID 0) (gt .ProjectID 0)}} + {{ctx.Locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr}} + {{else if gt .OldProjectID 0}} + {{ctx.Locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr}} + {{else if gt .ProjectID 0}} + {{ctx.Locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr}} + {{end}} + +
    + {{end}} + {{else if eq .Type 32}} +
    +
    + + + + {{svg "octicon-x" 16}} + + {{template "shared/user/authorlink" .Poster}} + {{$reviewerName := ""}} + {{if eq .Review.OriginalAuthor ""}} + {{$reviewerName = .Review.Reviewer.Name}} + {{else}} + {{$reviewerName = .Review.OriginalAuthor}} + {{end}} + {{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr}} + +
    + {{if .Content}} +
    +
    +
    + {{if gt .Poster.ID 0}} + + {{ctx.AvatarUtils.Avatar .Poster 24}} + + {{end}} + + {{ctx.Locale.Tr "action.review_dismissed_reason"}} + +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    +
    +
    + {{end}} +
    + {{else if eq .Type 33}} +
    + {{svg "octicon-git-branch"}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if and .OldRef .NewRef}} + {{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}} + {{else if .OldRef}} + {{ctx.Locale.Tr "repo.issues.remove_ref_at" .OldRef $createdStr}} + {{else}} + {{ctx.Locale.Tr "repo.issues.add_ref_at" .NewRef $createdStr}} + {{end}} + +
    + {{else if or (eq .Type 34) (eq .Type 35)}} +
    + {{svg "octicon-git-merge" 16}} + + {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} + {{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}} + {{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}} + +
    + {{else if or (eq .Type 36) (eq .Type 37)}} +
    + {{svg "octicon-pin" 16}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + + {{template "shared/user/authorlink" .Poster}} + {{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}} + {{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}} + +
    + {{end}} + {{end}} +{{end}} diff --git a/templates/repo/issue/view_content/comments_authorlink.tmpl b/templates/repo/issue/view_content/comments_authorlink.tmpl new file mode 100644 index 0000000..f652a0b --- /dev/null +++ b/templates/repo/issue/view_content/comments_authorlink.tmpl @@ -0,0 +1,11 @@ +{{if .comment.OriginalAuthor}} + + {{svg (MigrationIcon .ctxData.Repository.GetOriginalURLHostname)}} + {{.comment.OriginalAuthor}} + + {{if .ctxData.Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" .ctxData.Repository.OriginalURL .ctxData.Repository.GetOriginalURLHostname}}) + {{end}} +{{else}} + {{template "shared/user/authorlink" .comment.Poster}} +{{end}} diff --git a/templates/repo/issue/view_content/comments_delete_time.tmpl b/templates/repo/issue/view_content/comments_delete_time.tmpl new file mode 100644 index 0000000..2377e7c --- /dev/null +++ b/templates/repo/issue/view_content/comments_delete_time.tmpl @@ -0,0 +1,18 @@ +{{if and .comment.Time (.ctxData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}} + {{if (not .comment.Time.Deleted)}} + {{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}} + + + + + {{end}} + {{end}} +{{end}} diff --git a/templates/repo/issue/view_content/context_menu.tmpl b/templates/repo/issue/view_content/context_menu.tmpl new file mode 100644 index 0000000..4afd73c --- /dev/null +++ b/templates/repo/issue/view_content/context_menu.tmpl @@ -0,0 +1,27 @@ + diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl new file mode 100644 index 0000000..c788a61 --- /dev/null +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -0,0 +1,137 @@ +{{$invalid := (index .comments 0).Invalidated}} +{{$resolved := (index .comments 0).IsResolved}} +{{$resolveDoer := (index .comments 0).ResolveDoer}} +{{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}} +
    +
    +
    + {{(index .comments 0).TreePath}} + {{if $invalid}} + + {{ctx.Locale.Tr "repo.issues.review.outdated"}} + + {{end}} +
    +
    + {{if or $invalid $resolved}} + + + {{end}} +
    +
    + {{$diff := (CommentMustAsDiff ctx (index .comments 0))}} + {{if $diff}} + {{$file := (index $diff.Files 0)}} +
    +
    +
    + + + {{template "repo/diff/section_unified" dict "file" $file "root" $}} + +
    +
    +
    +
    + {{end}} +
    +
    + {{range .comments}} + {{$createdSubStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} +
    +
    +
    +
    + {{if not .OriginalAuthor}} + + {{ctx.AvatarUtils.Avatar .Poster 20}} + + {{end}} + + {{if .OriginalAuthor}} + + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} + {{.OriginalAuthor}} + + {{if $.Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}) + {{end}} + {{else}} + {{template "shared/user/authorlink" .Poster}} + {{end}} + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}} + +
    +
    + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole "IsPull" $.Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} + {{end}} +
    +
    +
    +
    + {{if .RenderedContent}} + {{.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
    +
    {{.Content}}
    +
    + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}} + {{end}} +
    + {{$reactions := .Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} + {{end}} +
    +
    + {{end}} +
    +
    +
    + {{if $resolved}} +
    + {{svg "octicon-check" 16 "tw-mr-1"}} + {{$resolveDoer.Name}} {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} +
    + {{end}} +
    +
    + {{if and $.CanMarkConversation $isNotPending}} + + {{end}} + {{if and $.SignedUserID (not $.Repository.IsArchived)}} + + {{end}} +
    +
    + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}} +
    +
    diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl new file mode 100644 index 0000000..bbbb8bf --- /dev/null +++ b/templates/repo/issue/view_content/pull.tmpl @@ -0,0 +1,396 @@ +{{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}} +{{/* Then the merge box will not be displayed because this page already contains enough information */}} +{{else}} +
    +
    {{svg "octicon-git-merge" 40}}
    +
    + {{if .LatestCommitStatus}} +
    + {{template "repo/pulls/status" (dict + "CommitStatus" .LatestCommitStatus + "CommitStatuses" .LatestCommitStatuses + "MissingRequiredChecks" .MissingRequiredChecks + "ShowHideChecks" true + "is_context_required" .is_context_required + )}} +
    + {{end}} + {{$showGeneralMergeForm := false}} +
    + {{if .Issue.PullRequest.HasMerged}} + {{if .IsPullBranchDeletable}} +
    +
    +

    + {{ctx.Locale.Tr "repo.pulls.merged_success"}} +

    + +
    +
    + +
    +
    + {{end}} + {{else if .Issue.IsClosed}} +
    +
    +

    {{ctx.Locale.Tr "repo.pulls.closed"}}

    + +
    + {{if and .IsPullBranchDeletable (not .IsPullRequestBroken)}} +
    + +
    + {{end}} +
    + {{else if .IsPullFilesConflicted}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.files_conflicted"}} +
    +
      + {{range .ConflictedFiles}} +
    • {{.}}
    • + {{end}} +
    + {{else if .IsPullRequestBroken}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.data_broken"}} +
    + {{else if .IsPullWorkInProgress}} +
    +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}} +
    + {{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}} + + {{end}} +
    + {{template "repo/issue/view_content/update_branch_by_merge" $}} + {{else if .Issue.PullRequest.IsChecking}} +
    + {{svg "octicon-sync"}} + {{ctx.Locale.Tr "repo.pulls.is_checking"}} +
    + {{else if .Issue.PullRequest.IsAncestor}} +
    + {{svg "octicon-alert"}} + {{ctx.Locale.Tr "repo.pulls.is_ancestor"}} +
    + {{else if or .Issue.PullRequest.CanAutoMerge .Issue.PullRequest.IsEmpty}} + {{if .IsBlockedByApprovals}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} +
    + {{else if .IsBlockedByRejection}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}} +
    + {{else if .IsBlockedByOfficialReviewRequests}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}} +
    + {{else if .IsBlockedByOutdatedBranch}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}} +
    + {{else if .IsBlockedByChangedProtectedFiles}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}} +
    +
      + {{range .ChangedProtectedFiles}} +
    • {{.}}
    • + {{end}} +
    + {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}} +
    + {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.required_status_check_missing"}} +
    + {{else if and .AllowMerge .RequireSigned (not .WillSign)}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}} +
    +
    + {{svg "octicon-unlock"}} + {{ctx.Locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}} +
    + {{end}} + + {{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOfficialReviewRequests .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}} + + {{/* admin can merge without checks, writer can merge when checks succeed */}} + {{$canMergeNow := and (or (and $.IsRepoAdmin (not .ProtectedBranch.ApplyToAdmins)) (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}} + {{/* admin and writer both can make an auto merge schedule */}} + + {{if $canMergeNow}} + {{if $notAllOverridableChecksOk}} +
    + {{svg "octicon-dot-fill"}} + {{ctx.Locale.Tr "repo.pulls.required_status_check_administrator"}} +
    + {{else}} +
    + {{svg "octicon-check"}} + {{ctx.Locale.Tr "repo.pulls.can_auto_merge_desc"}} +
    + {{end}} + {{if .WillSign}} +
    + {{svg "octicon-lock" 16 "text green"}} + {{ctx.Locale.Tr "repo.signing.will_sign" .SigningKey}} +
    + {{else if .IsSigned}} +
    + {{svg "octicon-unlock"}} + {{ctx.Locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}} +
    + {{end}} + {{end}} + {{template "repo/issue/view_content/update_branch_by_merge" $}} + {{if .Issue.PullRequest.IsEmpty}} +
    + +
    + {{svg "octicon-alert"}} + {{ctx.Locale.Tr "repo.pulls.is_empty"}} +
    + {{end}} + + {{if .AllowMerge}} {{/* user is allowed to merge */}} + {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} + {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash $prUnit.PullRequestsConfig.AllowFastForwardOnly}} + {{$hasPendingPullRequestMergeTip := ""}} + {{if .HasPendingPullRequestMerge}} + {{$createdPRMergeStr := TimeSinceUnix .PendingPullRequestMerge.CreatedUnix ctx.Locale}} + {{$hasPendingPullRequestMergeTip = ctx.Locale.Tr "repo.pulls.auto_merge_has_pending_schedule" .PendingPullRequestMerge.Doer.Name $createdPRMergeStr}} + {{end}} +
    + + + {{$showGeneralMergeForm = true}} +
    + {{else}} + {{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}} +
    +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.no_merge_desc"}} +
    +
    + {{svg "octicon-info"}} + {{ctx.Locale.Tr "repo.pulls.no_merge_helper"}} +
    + {{end}} {{/* end if the repo was set to use any merge style */}} + {{else}} + {{/* user is not allowed to merge */}} +
    +
    + {{svg "octicon-info"}} + {{ctx.Locale.Tr "repo.pulls.no_merge_access"}} +
    + {{end}} {{/* end if user is allowed to merge or not */}} + {{else}} + {{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}} + {{if .IsBlockedByApprovals}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} +
    + {{else if .IsBlockedByRejection}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}} +
    + {{else if .IsBlockedByOfficialReviewRequests}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}} +
    + {{else if .IsBlockedByOutdatedBranch}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}} +
    + {{else if .IsBlockedByChangedProtectedFiles}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}} +
    +
      + {{range .ChangedProtectedFiles}} +
    • {{.}}
    • + {{end}} +
    + {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}} +
    + {{else if and .RequireSigned (not .WillSign)}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}} +
    + {{else}} +
    + {{svg "octicon-x"}} + {{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_desc"}} +
    +
    + {{svg "octicon-info"}} + {{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_helper"}} +
    + {{end}} + {{end}}{{/* end if: pull request status */}} + + {{/* + Manually Merged is not a well-known feature, it is used to mark a non-mergeable PR (already merged, conflicted) as merged + To test it: + * Enable "Manually Merged" feature in the Repository Settings + * Create a pull request, either: + * - Merge the pull request branch locally and push the merged commit to Gitea + * - Make some conflicts between the base branch and the pull request branch + * Then the Manually Merged form will be shown in the merge form + */}} + {{if and $.StillCanManualMerge (not $showGeneralMergeForm)}} +
    +
    +
    + {{.CsrfTokenHtml}} +
    + +
    + +
    +
    + {{end}} + + {{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}} + {{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions "AutodetectManualMerge" .AutodetectManualMerge}} + {{end}} +
    +
    +
    +{{end}} diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl new file mode 100644 index 0000000..b7aae53 --- /dev/null +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -0,0 +1,57 @@ +
    +
    + {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} +

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}
    + {{$localBranch := .PullRequest.HeadBranch}} + {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} + {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} + {{end}} +
    + {{if eq .PullRequest.Flow 0}} +
    git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
    + {{else}} +
    git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}
    + {{end}} +
    git checkout {{$localBranch}}
    +
    + {{if .ShowMergeInstructions}} +
    +

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}

    + {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} + {{if not .AutodetectManualMerge}} +

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}

    + {{end}} +
    +
    +
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge --no-ff {{$localBranch}}
    +
    +
    +
    git checkout {{$localBranch}}
    +
    git rebase {{.PullRequest.BaseBranch}}
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge --ff-only {{$localBranch}}
    +
    +
    +
    git checkout {{$localBranch}}
    +
    git rebase {{.PullRequest.BaseBranch}}
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge --no-ff {{$localBranch}}
    +
    +
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge --squash {{$localBranch}}
    +
    +
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge --ff-only {{$localBranch}}
    +
    +
    +
    git checkout {{.PullRequest.BaseBranch}}
    +
    git merge {{$localBranch}}
    +
    +
    git push origin {{.PullRequest.BaseBranch}}
    +
    + {{end}} +
    diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl new file mode 100644 index 0000000..da63196 --- /dev/null +++ b/templates/repo/issue/view_content/reactions.tmpl @@ -0,0 +1,17 @@ +
    +{{range $key, $value := .Reactions}} + {{$hasReacted := $value.HasUser $.ctxData.SignedUserID}} + + {{ReactionToEmoji $key}} + {{len $value}} + +{{end}} +{{if AllowedReactions}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $.ctxData "ActionURL" .ActionURL}} +{{end}} +
    diff --git a/templates/repo/issue/view_content/reference_issue_dialog.tmpl b/templates/repo/issue/view_content/reference_issue_dialog.tmpl new file mode 100644 index 0000000..c7a471f --- /dev/null +++ b/templates/repo/issue/view_content/reference_issue_dialog.tmpl @@ -0,0 +1,28 @@ + diff --git a/templates/repo/issue/view_content/show_role.tmpl b/templates/repo/issue/view_content/show_role.tmpl new file mode 100644 index 0000000..0f1b895 --- /dev/null +++ b/templates/repo/issue/view_content/show_role.tmpl @@ -0,0 +1,15 @@ +{{if and .ShowRole.IsPoster (not .IgnorePoster)}} +
    + {{ctx.Locale.Tr "repo.issues.author"}} +
    +{{end}} +{{if .ShowRole.RoleInRepo}} +
    + {{.ShowRole.RoleInRepo.LocaleString ctx.Locale}} +
    +{{end}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl new file mode 100644 index 0000000..623023b --- /dev/null +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -0,0 +1,66 @@ +
    + {{template "repo/issue/view_content/sidebar/branch_selector_field" .}} + {{if .Issue.IsPull}} + {{template "repo/issue/view_content/sidebar/pull_review" .}} + {{template "repo/issue/view_content/sidebar/pull_wip" .}} +
    + {{end}} + + {{template "repo/issue/labels/labels_selector_field" .}} + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} + +
    + + {{template "repo/issue/view_content/sidebar/milestones" .}} +
    + + {{template "repo/issue/view_content/sidebar/projects" .}} +
    + + {{template "repo/issue/view_content/sidebar/assignees" dict "isExistingIssue" true "." .}} +
    + + {{if .Participants}} + {{template "repo/issue/view_content/sidebar/participants" .}} + {{end}} + + {{if and $.IssueWatch (not .Repository.IsArchived)}} +
    + + {{template "repo/issue/view_content/sidebar/watch" .}} + {{end}} + + {{if .Repository.IsTimetrackerEnabled $.Context}} + {{template "repo/issue/view_content/sidebar/timetracking" .}} + {{end}} + +
    + {{template "repo/issue/view_content/sidebar/due_deadline" .}} + + {{if .Repository.IsDependenciesEnabled $.Context}} +
    + + {{template "repo/issue/view_content/sidebar/dependencies" .}} + {{end}} + +
    + {{template "repo/issue/view_content/sidebar/reference" .}} + + {{if and .IsRepoAdmin (not .Repository.IsArchived)}} +
    + + {{template "repo/issue/view_content/sidebar/actions" .}} + {{end}} + + {{if and + .Issue.IsPull + .IsIssuePoster + (not .Issue.IsClosed) + .Issue.PullRequest.HeadRepo + (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) + .CanWriteToHeadRepo + }} +
    + {{template "repo/issue/view_content/sidebar/pull_maintainer_edits" .}} + {{end}} +
    diff --git a/templates/repo/issue/view_content/sidebar/actions.tmpl b/templates/repo/issue/view_content/sidebar/actions.tmpl new file mode 100644 index 0000000..36f2182 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/actions.tmpl @@ -0,0 +1,114 @@ +{{if or .PinEnabled .Issue.IsPinned}} +
    + {{$.CsrfTokenHtml}} + +
    +{{end}} + + + + + diff --git a/templates/repo/issue/view_content/sidebar/assignees.tmpl b/templates/repo/issue/view_content/sidebar/assignees.tmpl new file mode 100644 index 0000000..7a928fa --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/assignees.tmpl @@ -0,0 +1,62 @@ + + +
    + + {{ctx.Locale.Tr "repo.issues.new.no_assignees"}} + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{with index .Assignees 0}} + – + + {{ctx.Locale.Tr "repo.issues.new.assign_to_me"}} + + {{end}} + {{end}} + +
    + {{if .isExistingIssue}} + {{range .Issue.Assignees}} + + {{end}} + {{else}} + {{range .Assignees}} + + {{ctx.AvatarUtils.Avatar . 28 "tw-mr-2"}}{{.GetDisplayName}} + + {{end}} + {{end}} +
    +
    diff --git a/templates/repo/issue/view_content/sidebar/branch_selector_field.tmpl b/templates/repo/issue/view_content/sidebar/branch_selector_field.tmpl new file mode 100644 index 0000000..c23e13b --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/branch_selector_field.tmpl @@ -0,0 +1,59 @@ +{{if and (not .Issue.IsPull) (not .PageIsComparePull)}} + + +
    + {{$.CsrfTokenHtml}} +
    +{{/* TODO: share this branch selector dropdown with the same in repo page */}} + + +
    +{{end}} diff --git a/templates/repo/issue/view_content/sidebar/dependencies.tmpl b/templates/repo/issue/view_content/sidebar/dependencies.tmpl new file mode 100644 index 0000000..6a9b651 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/dependencies.tmpl @@ -0,0 +1,146 @@ +
    + {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} + {{ctx.Locale.Tr "repo.issues.dependency.title"}} +
    +

    + {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.issues.dependency.pr_no_dependencies"}} + {{else}} + {{ctx.Locale.Tr "repo.issues.dependency.issue_no_dependencies"}} + {{end}} +

    + {{end}} + + {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} + + {{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}} + +
    + {{range .BlockingDependencies}} +
    +
    + + #{{.Issue.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}}} + +
    + {{.Repository.OwnerName}}/{{.Repository.Name}} +
    +
    +
    + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + + {{svg "octicon-trash" 16}} + + {{end}} +
    +
    + {{end}} + {{if .BlockingDependenciesNotPermitted}} +
    + {{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}} +
    + {{end}} +
    + {{end}} + + {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} + + {{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}} + +
    + {{range .BlockedByDependencies}} +
    +
    + {{$title := RenderRefIssueTitle $.Context .Issue.Title}} + + #{{.Issue.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}} + +
    + {{.Repository.OwnerName}}/{{.Repository.Name}} +
    +
    +
    + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + + {{svg "octicon-trash" 16}} + + {{end}} +
    +
    + {{end}} + {{if $.CanCreateIssueDependencies}} + {{range .BlockedByDependenciesNotPermitted}} +
    +
    +
    + {{svg "octicon-lock" 16}} + + #{{.Issue.Index}} {{RenderRefIssueTitle $.Context .DependentIssue.Title}} + +
    +
    + {{.Repository.OwnerName}}/{{.Repository.Name}} +
    +
    +
    + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + + {{svg "octicon-trash" 16}} + + {{end}} +
    +
    + {{end}} + {{else if .BlockedByDependenciesNotPermitted}} +
    + {{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}} +
    + {{end}} +
    + {{end}} + + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} +
    +
    + {{$.CsrfTokenHtml}} +
    + + +
    +
    +
    + {{end}} +
    + +{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} + + + +{{end}} diff --git a/templates/repo/issue/view_content/sidebar/due_deadline.tmpl b/templates/repo/issue/view_content/sidebar/due_deadline.tmpl new file mode 100644 index 0000000..2de836b --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/due_deadline.tmpl @@ -0,0 +1,41 @@ +{{ctx.Locale.Tr "repo.issues.due_date"}} +
    +
    + {{svg "octicon-x" 16 "close icon"}} + {{ctx.Locale.Tr "repo.issues.due_date_invalid"}} +
    + {{if ne .Issue.DeadlineUnix 0}} +

    +

    +
    + {{svg "octicon-calendar" 16 "tw-mr-2"}} + {{DateTime "long" .Issue.DeadlineUnix.FormatDate}} +
    +
    + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{svg "octicon-pencil" 16 "tw-mr-1"}} + {{svg "octicon-trash"}} + {{end}} +
    +
    +

    + {{else}} +

    {{ctx.Locale.Tr "repo.issues.due_date_not_set"}}

    + {{end}} + + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} +
    +
    + {{$.CsrfTokenHtml}} + + +
    +
    + {{end}} +
    diff --git a/templates/repo/issue/view_content/sidebar/milestones.tmpl b/templates/repo/issue/view_content/sidebar/milestones.tmpl new file mode 100644 index 0000000..44d9419 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/milestones.tmpl @@ -0,0 +1,24 @@ + diff --git a/templates/repo/issue/view_content/sidebar/participants.tmpl b/templates/repo/issue/view_content/sidebar/participants.tmpl new file mode 100644 index 0000000..93e2579 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/participants.tmpl @@ -0,0 +1,8 @@ +{{ctx.Locale.TrN .NumParticipants "repo.issues.num_participants_one" "repo.issues.num_participants_few" .NumParticipants}} +
    + {{range .Participants}} + + {{ctx.AvatarUtils.Avatar . 28 "tw-my-0.5 tw-mr-1"}} + + {{end}} +
    diff --git a/templates/repo/issue/view_content/sidebar/projects.tmpl b/templates/repo/issue/view_content/sidebar/projects.tmpl new file mode 100644 index 0000000..91d75f3 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/projects.tmpl @@ -0,0 +1,54 @@ + +
    + {{ctx.Locale.Tr "repo.issues.new.no_projects"}} + +
    diff --git a/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl b/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl new file mode 100644 index 0000000..6ec5c05 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/pull_maintainer_edits.tmpl @@ -0,0 +1,10 @@ +
    +
    + + +
    +
    diff --git a/templates/repo/issue/view_content/sidebar/pull_review.tmpl b/templates/repo/issue/view_content/sidebar/pull_review.tmpl new file mode 100644 index 0000000..930c2a6 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/pull_review.tmpl @@ -0,0 +1,45 @@ + + +{{template "repo/issue/view_content/sidebar/pull_reviewers" .}} diff --git a/templates/repo/issue/view_content/sidebar/pull_reviewers.tmpl b/templates/repo/issue/view_content/sidebar/pull_reviewers.tmpl new file mode 100644 index 0000000..102508f --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/pull_reviewers.tmpl @@ -0,0 +1,67 @@ +
    + {{ctx.Locale.Tr "repo.issues.new.no_reviewers"}} +
    + {{range .PullReviewers}} +
    +
    + {{if .User}} + {{ctx.AvatarUtils.Avatar .User 20 "tw-mr-2"}}{{.User.GetDisplayName}} + {{else if .Team}} + {{svg "octicon-people" 20 "tw-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} + {{end}} +
    +
    + {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged))}} + + {{svg "octicon-x" 20}} + + + {{end}} + {{if .Review.Stale}} + + {{svg "octicon-hourglass" 16}} + + {{end}} + {{if and .CanChange (or .Checked (and (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged)))}} + {{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}} + {{end}} + {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} +
    +
    + {{end}} + {{range .OriginalReviews}} +
    + +
    + {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} +
    +
    + {{end}} +
    +
    diff --git a/templates/repo/issue/view_content/sidebar/pull_wip.tmpl b/templates/repo/issue/view_content/sidebar/pull_wip.tmpl new file mode 100644 index 0000000..f1588b3 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/pull_wip.tmpl @@ -0,0 +1,11 @@ +{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed)}} + +{{end}} diff --git a/templates/repo/issue/view_content/sidebar/reference.tmpl b/templates/repo/issue/view_content/sidebar/reference.tmpl new file mode 100644 index 0000000..bbbc099 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/reference.tmpl @@ -0,0 +1,7 @@ +
    + {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} +
    + {{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}} + +
    +
    diff --git a/templates/repo/issue/view_content/sidebar/timetracking.tmpl b/templates/repo/issue/view_content/sidebar/timetracking.tmpl new file mode 100644 index 0000000..610600b --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/timetracking.tmpl @@ -0,0 +1,73 @@ +{{if and .CanUseTimetracker (not .Repository.IsArchived)}} +
    +
    + {{ctx.Locale.Tr "repo.issues.tracker"}} +
    +
    + {{$.CsrfTokenHtml}} +
    +
    + {{$.CsrfTokenHtml}} +
    + {{if $.IsStopwatchRunning}} + + + {{else}} + {{if .HasUserStopwatch}} +
    + {{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}} +
    + {{end}} + + + + {{end}} +
    +
    +{{end}} +{{if .WorkingUsers}} +
    +
    + {{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}} +
    + {{range $user, $trackedtime := .WorkingUsers}} +
    + + {{ctx.AvatarUtils.Avatar $user}} + +
    + {{template "shared/user/authorlink" $user}} +
    + {{$trackedtime|Sec2Time}} +
    +
    +
    + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/issue/view_content/sidebar/watch.tmpl b/templates/repo/issue/view_content/sidebar/watch.tmpl new file mode 100644 index 0000000..ee14168 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/watch.tmpl @@ -0,0 +1,6 @@ +
    + {{ctx.Locale.Tr "notification.notifications"}} +
    + {{template "repo/issue/view_content/sidebar/watching" .}} +
    +
    diff --git a/templates/repo/issue/view_content/sidebar/watching.tmpl b/templates/repo/issue/view_content/sidebar/watching.tmpl new file mode 100644 index 0000000..d3d7594 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/watching.tmpl @@ -0,0 +1,19 @@ +
    + + +
    diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl new file mode 100644 index 0000000..adce052 --- /dev/null +++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl @@ -0,0 +1,37 @@ +{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}} +
    +
    +
    + {{svg "octicon-alert"}} + {{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}} +
    +
    + {{if and $.UpdateAllowed $.UpdateByRebaseAllowed}} +
    +
    + + +
    +
    + {{end}} + {{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}} +
    + {{$.CsrfTokenHtml}} + +
    + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl new file mode 100644 index 0000000..f60d958 --- /dev/null +++ b/templates/repo/issue/view_title.tmpl @@ -0,0 +1,144 @@ +{{if .Flash}} +
    + {{template "base/alert" .}} +
    +{{end}} +
    + {{$canEditIssueTitle := and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} +
    +

    + {{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx)}} #{{.Issue.Index}} +

    +
    + {{if $canEditIssueTitle}} + + {{end}} + {{if not .Issue.IsPull}} + {{ctx.Locale.Tr "repo.issues.new"}} + {{end}} +
    +
    + {{if $canEditIssueTitle}} +
    +
    + +
    +
    + + +
    +
    + {{end}} +
    + {{if .HasMerged}} +
    {{svg "octicon-git-merge" 16 "tw-mr-1"}} {{if eq .Issue.PullRequest.Status 3}}{{ctx.Locale.Tr "repo.pulls.manually_merged"}}{{else}}{{ctx.Locale.Tr "repo.pulls.merged"}}{{end}}
    + {{else if .Issue.IsClosed}} +
    {{if .Issue.IsPull}}{{svg "octicon-git-pull-request-closed"}}{{else}}{{svg "octicon-issue-closed"}}{{end}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
    + {{else if .Issue.IsPull}} + {{if .IsPullWorkInProgress}} +
    {{svg "octicon-git-pull-request-draft"}} {{ctx.Locale.Tr "repo.issues.draft_title"}}
    + {{else}} +
    {{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.issues.open_title"}}
    + {{end}} + {{else}} +
    {{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.open_title"}}
    + {{end}} +
    + {{if .Issue.IsPull}} + {{$headHref := .HeadTarget}} + {{if .HeadBranchLink}} + {{$headHref = HTMLFormat `%s` .HeadBranchLink $headHref}} + {{end}} + {{if not .MadeUsingAGit}} + {{$headHref = HTMLFormat `%s ` $headHref (ctx.Locale.Tr "copy_branch") .HeadTarget (svg "octicon-copy" 14)}} + {{end}} + {{$baseHref := .BaseTarget}} + {{if .BaseBranchLink}} + {{$baseHref = HTMLFormat `%s` .BaseBranchLink $baseHref}} + {{end}} + {{if .Issue.PullRequest.HasMerged}} + {{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix ctx.Locale}} + {{if .Issue.OriginalAuthor}} + {{.Issue.OriginalAuthor}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.merged_title_desc_one" "repo.pulls.merged_title_desc_few" .NumCommits $headHref $baseHref $mergedStr}} + {{else}} + {{.Issue.PullRequest.Merger.GetDisplayName}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.merged_title_desc_one" "repo.pulls.merged_title_desc_few" .NumCommits $headHref $baseHref $mergedStr}} + {{end}} + {{if .MadeUsingAGit}} + {{/* TODO: Move documentation link to the instructions at the bottom of the PR, show instructions when clicking label */}} + {{/* Note: #agit-label is necessary for testing whether the label appears when it should in tests/integration/git_test.go */}} + + + {{ctx.Locale.Tr "repo.pulls.made_using_agit"}} + + + {{end}} + {{else}} + {{if .Issue.OriginalAuthor}} + {{.Issue.OriginalAuthor}} {{ctx.Locale.TrN .NumCommits "repo.pulls.title_desc_one" "repo.pulls.title_desc_few" .NumCommits $headHref $baseHref}} + {{else}} + + {{.Issue.Poster.GetDisplayName}} + {{ctx.Locale.TrN .NumCommits "repo.pulls.title_desc_one" "repo.pulls.title_desc_few" .NumCommits $headHref $baseHref}} + + {{end}} + {{if .MadeUsingAGit}} + {{/* TODO: Move documentation link to the instructions at the bottom of the PR, show instructions when clicking label */}} + {{/* Note: #agit-label is necessary for testing whether the label appears when it should in tests/integration/git_test.go */}} + + + {{ctx.Locale.Tr "repo.pulls.made_using_agit"}} + + + {{end}} + + + {{svg "octicon-arrow-right"}} + + + {{end}} + {{else}} + {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} + + {{if .Issue.OriginalAuthor}} + {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor}} + {{else if gt .Issue.Poster.ID 0}} + {{ctx.Locale.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.GetDisplayName}} + {{else}} + {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.GetDisplayName}} + {{end}} + · + {{ctx.Locale.TrN .Issue.NumComments "repo.issues.num_comments_1" "repo.issues.num_comments" .Issue.NumComments}} + + {{end}} +
    +
    +
    diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl new file mode 100644 index 0000000..222d582 --- /dev/null +++ b/templates/repo/latest_commit.tmpl @@ -0,0 +1,31 @@ +{{if not .LatestCommit}} +
    …
    +{{else}} + {{if .LatestCommitUser}} + {{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-2"}} + {{if and .LatestCommitUser.FullName DefaultShowFullName}} + {{.LatestCommitUser.FullName}} + {{else}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{end}} + {{else}} + {{if .LatestCommit.Author}} + {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24 "tw-mr-2"}} + {{.LatestCommit.Author.Name}} + {{end}} + {{end}} + + {{ShortSha .LatestCommit.ID.String}} + {{if .LatestCommit.Signature}} + {{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}} + {{end}} + + {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}} + {{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}} + {{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{if IsMultilineCommitMessage .LatestCommit.Message}} + +
    {{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}
    + {{end}} +
    +{{end}} diff --git a/templates/repo/migrate/codebase.tmpl b/templates/repo/migrate/codebase.tmpl new file mode 100644 index 0000000..cf46c8d --- /dev/null +++ b/templates/repo/migrate/codebase.tmpl @@ -0,0 +1,126 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + +
    +
    + + +
    + + {{template "repo/migrate/options" .}} + +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/forgejo.tmpl b/templates/repo/migrate/forgejo.tmpl new file mode 100644 index 0000000..3caadbe --- /dev/null +++ b/templates/repo/migrate/forgejo.tmpl @@ -0,0 +1 @@ +{{template "repo/migrate/gitea" .}} diff --git a/templates/repo/migrate/git.tmpl b/templates/repo/migrate/git.tmpl new file mode 100644 index 0000000..5ebf4cf --- /dev/null +++ b/templates/repo/migrate/git.tmpl @@ -0,0 +1,94 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    +
    + + +
    +
    + + +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/gitbucket.tmpl b/templates/repo/migrate/gitbucket.tmpl new file mode 100644 index 0000000..e8d6b60 --- /dev/null +++ b/templates/repo/migrate/gitbucket.tmpl @@ -0,0 +1,142 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + +
    +
    + + +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    +
    + +
    + {{ctx.Locale.Tr "repo.migrate.migrate_items_options"}} +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/gitea.tmpl b/templates/repo/migrate/gitea.tmpl new file mode 100644 index 0000000..2f40d58 --- /dev/null +++ b/templates/repo/migrate/gitea.tmpl @@ -0,0 +1,138 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + + {{svg "octicon-question"}} +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    +
    + +
    + {{ctx.Locale.Tr "repo.migrate.migrate_items_options"}} +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/github.tmpl b/templates/repo/migrate/github.tmpl new file mode 100644 index 0000000..91c1a27 --- /dev/null +++ b/templates/repo/migrate/github.tmpl @@ -0,0 +1,140 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}} + +
    + +
    + + + {{svg "octicon-question"}} + + {{ctx.Locale.Tr "repo.migrate.github_token_desc"}} + +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    +
    +
    + {{ctx.Locale.Tr "repo.migrate.migrate_items_options"}} +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/gitlab.tmpl b/templates/repo/migrate/gitlab.tmpl new file mode 100644 index 0000000..d93a001 --- /dev/null +++ b/templates/repo/migrate/gitlab.tmpl @@ -0,0 +1,137 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + + {{svg "octicon-question"}} +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    +
    +
    + {{ctx.Locale.Tr "repo.migrate.migrate_items_options"}} +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/gogs.tmpl b/templates/repo/migrate/gogs.tmpl new file mode 100644 index 0000000..6c647be --- /dev/null +++ b/templates/repo/migrate/gogs.tmpl @@ -0,0 +1,137 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + + +
    + + {{template "repo/migrate/options" .}} + +
    + +
    + + +
    +
    + +
    + {{ctx.Locale.Tr "repo.migrate.migrate_items_options"}} +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/helper.tmpl b/templates/repo/migrate/helper.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl new file mode 100644 index 0000000..c5c697e --- /dev/null +++ b/templates/repo/migrate/migrate.tmpl @@ -0,0 +1,32 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl new file mode 100644 index 0000000..0b53636 --- /dev/null +++ b/templates/repo/migrate/migrating.tmpl @@ -0,0 +1,101 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    +
    + {{template "base/alert" .}} +
    +
    +
    +
    + +
    +
    +
    +
    + {{svg "octicon-git-pull-request-closed" 256 "ui red icon"}} +
    +
    +
    +
    +
    +
    +

    {{ctx.Locale.Tr "repo.migrate.migrating" .CloneAddr}}

    +

    +
    +
    + {{if .CloneAddr}} +

    {{ctx.Locale.Tr "repo.migrate.migrating_failed" .CloneAddr}}

    + {{else}} +

    {{ctx.Locale.Tr "repo.migrate.migrating_failed_no_addr"}}

    + {{end}} +

    +
    + {{if .Permission.IsAdmin}} +
    +
    + {{if .Failed}} + + {{else}} + + {{end}} + +
    + {{end}} +
    +
    +
    +
    +
    +
    +
    + + + + + +{{template "base/footer" .}} diff --git a/templates/repo/migrate/onedev.tmpl b/templates/repo/migrate/onedev.tmpl new file mode 100644 index 0000000..ec15555 --- /dev/null +++ b/templates/repo/migrate/onedev.tmpl @@ -0,0 +1,126 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "repo.migrate.migrate" .service.Title}} + +

    +
    + {{template "base/alert" .}} +
    + + + + {{ctx.Locale.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate.clone_local_path"}}{{end}} + +
    + +
    + + +
    +
    + + +
    + + {{template "repo/migrate/options" .}} + +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    + +
    + + +
    +
    + +
    + + +
    + {{if .IsForcedPrivate}} + {{ctx.Locale.Tr "repo.visibility_helper_forced"}} + {{end}} + {{ctx.Locale.Tr "repo.visibility_description"}} +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/migrate/options.tmpl b/templates/repo/migrate/options.tmpl new file mode 100644 index 0000000..8a46e57 --- /dev/null +++ b/templates/repo/migrate/options.tmpl @@ -0,0 +1,26 @@ +{{if not .DisableNewPullMirrors}} +
    + +
    + + +
    +
    +{{end}} +{{if .LFSActive}} +
    + +
    + + +
    + ({{ctx.Locale.Tr "repo.settings.advanced_settings"}}) +
    +
    + {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}} +
    + + +
    +
    +{{end}} diff --git a/templates/repo/navbar.tmpl b/templates/repo/navbar.tmpl new file mode 100644 index 0000000..b2471dc --- /dev/null +++ b/templates/repo/navbar.tmpl @@ -0,0 +1,14 @@ + diff --git a/templates/repo/packages.tmpl b/templates/repo/packages.tmpl new file mode 100644 index 0000000..14e32c1 --- /dev/null +++ b/templates/repo/packages.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "package/shared/list" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl new file mode 100644 index 0000000..9eae401 --- /dev/null +++ b/templates/repo/projects/list.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "projects/list" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/projects/new.tmpl b/templates/repo/projects/new.tmpl new file mode 100644 index 0000000..e70f3bc --- /dev/null +++ b/templates/repo/projects/new.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "projects/new" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/projects/view.tmpl b/templates/repo/projects/view.tmpl new file mode 100644 index 0000000..05ad726 --- /dev/null +++ b/templates/repo/projects/view.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{template "repo/issue/navbar" .}} + {{ctx.Locale.Tr "repo.issues.new"}} +
    +
    +
    + {{template "projects/view" .}} +
    +
    + +{{template "base/footer" .}} diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl new file mode 100644 index 0000000..bf6e812 --- /dev/null +++ b/templates/repo/pulls/commits.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} + {{template "repo/commits_table" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl new file mode 100644 index 0000000..402bec8 --- /dev/null +++ b/templates/repo/pulls/files.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .}} + + + + +
    + {{template "repo/header" .}} +
    + {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} + {{template "repo/diff/box" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl new file mode 100644 index 0000000..2cf0a85 --- /dev/null +++ b/templates/repo/pulls/fork.tmpl @@ -0,0 +1,90 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "new_fork"}} +

    +
    + {{template "base/alert" .}} +
    + + +
    + +
    + + {{.ForkRepo.FullName}} +
    +
    + + +
    +
    + +
    + + +
    + {{ctx.Locale.Tr "repo.fork_visibility_helper"}} +
    +
    + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl new file mode 100644 index 0000000..e8636ba --- /dev/null +++ b/templates/repo/pulls/status.tmpl @@ -0,0 +1,59 @@ +{{/* +Template Attributes: +* CommitStatus: summary of all commit status state +* CommitStatuses: all commit status elements +* MissingRequiredChecks: commit check contexts that are required by branch protection but not present +* ShowHideChecks: whether use a button to show/hide the checks +* is_context_required: Used in pull request commit status check table +*/}} + +{{if .CommitStatus}} +
    +
    + {{if or (eq .CommitStatus.State "pending") (.MissingRequiredChecks)}} + {{ctx.Locale.Tr "repo.pulls.status_checking"}} + {{else if eq .CommitStatus.State "success"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_success"}} + {{else if eq .CommitStatus.State "warning"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_warning"}} + {{else if eq .CommitStatus.State "failure"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_failure"}} + {{else if eq .CommitStatus.State "error"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_error"}} + {{else}} + {{ctx.Locale.Tr "repo.pulls.status_checking"}} + {{end}} + + {{if .ShowHideChecks}} +
    + +
    + {{end}} +
    + +
    + {{range .CommitStatuses}} +
    + {{template "repo/commit_status" .}} +
    {{.Context}} {{.Description}}
    +
    + {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}
    {{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
    {{end}} + {{end}} + {{if .TargetURL}}{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}{{end}} +
    +
    + {{end}} + {{range .MissingRequiredChecks}} +
    + {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} +
    {{.}}
    +
    {{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
    +
    + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl new file mode 100644 index 0000000..d5a8d6e --- /dev/null +++ b/templates/repo/pulls/tab_menu.tmpl @@ -0,0 +1,28 @@ + diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl new file mode 100644 index 0000000..3554cf6 --- /dev/null +++ b/templates/repo/pulse.tmpl @@ -0,0 +1,239 @@ +

    + {{DateTime "long" .DateFrom}} - {{DateTime "long" .DateUntil}} + + +

    + +{{if (or (.Permission.CanRead $.UnitTypeIssues) (.Permission.CanRead $.UnitTypePullRequests))}} +

    {{ctx.Locale.Tr "repo.activity.overview"}}

    +
    + {{if .Permission.CanRead $.UnitTypePullRequests}} +
    + {{if gt .Activity.ActivePRCount 0}} +
    + {{if gt .Activity.MergedPRPerc 0}} + + {{end}} + +
    + {{else}} +
    + +
    + {{end}} + {{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}} +
    + {{end}} + {{if .Permission.CanRead $.UnitTypeIssues}} +
    + {{if gt .Activity.ActiveIssueCount 0}} +
    + {{if gt .Activity.ClosedIssuePerc 0}} + + {{end}} + +
    + {{else}} +
    + +
    + {{end}} + {{ctx.Locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount}} +
    + {{end}} +
    + +{{end}} + +{{if .Permission.CanRead $.UnitTypeCode}} + {{if eq .Activity.Code.CommitCountInAllBranches 0}} +
    +

    {{ctx.Locale.Tr "repo.activity.no_git_activity"}}

    +
    + {{end}} + {{if gt .Activity.Code.CommitCountInAllBranches 0}} +
    +
    + {{ctx.Locale.Tr "repo.activity.git_stats_exclude_merges"}} + {{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}} + {{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}} + {{ctx.Locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}} + {{ctx.Locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}} + {{ctx.Locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}} + {{ctx.Locale.Tr "repo.activity.git_stats_push_to_all_branches"}} + {{ctx.Locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}} + {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}} + {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} + {{ctx.Locale.Tr "repo.activity.git_stats_additions"}} + {{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} + {{ctx.Locale.Tr "repo.activity.git_stats_and_deletions"}} + {{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}. +
    +
    +
    +
    +
    + {{end}} +{{end}} + +{{if gt .Activity.PublishedReleaseCount 0}} +

    + {{svg "octicon-tag" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.releases_published_by" + (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) + (ctx.Locale.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount) + }} +

    +
    + {{range .Activity.PublishedReleases}} +

    + {{if .IsTag}} + {{ctx.Locale.Tr "repo.activity.published_tag_label"}} + {{else if .IsPrerelease}} + {{ctx.Locale.Tr "repo.activity.published_prerelease_label"}} + {{else}} + {{ctx.Locale.Tr "repo.activity.published_release_label"}} + {{end}} + {{if .IsTag}} + {{.TagName}} + {{else}} + {{.TagName}} + {{.Title | RenderEmoji $.Context | RenderCodeBlock}} + {{end}} + {{TimeSinceUnix .CreatedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} + +{{if gt .Activity.MergedPRCount 0}} +

    + {{svg "octicon-git-pull-request" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" + (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) + (ctx.Locale.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount) + }} +

    +
    + {{range .Activity.MergedPRs}} +

    + {{ctx.Locale.Tr "repo.activity.merged_prs_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}} + {{TimeSinceUnix .MergedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} + +{{if gt .Activity.OpenedPRCount 0}} +

    + {{svg "octicon-git-branch" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" + (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) + (ctx.Locale.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount) + }} +

    +
    + {{range .Activity.OpenedPRs}} +

    + {{ctx.Locale.Tr "repo.activity.opened_prs_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}} + {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} + +{{if gt .Activity.ClosedIssueCount 0}} +

    + {{svg "octicon-issue-closed" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" + (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) + (ctx.Locale.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount) + }} +

    +
    + {{range .Activity.ClosedIssues}} +

    + {{ctx.Locale.Tr "repo.activity.closed_issue_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Title}} + {{TimeSinceUnix .ClosedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} + +{{if gt .Activity.OpenedIssueCount 0}} +

    + {{svg "octicon-issue-opened" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.issues_created_by" + (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) + (ctx.Locale.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount) + }} +

    +
    + {{range .Activity.OpenedIssues}} +

    + {{ctx.Locale.Tr "repo.activity.new_issue_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Title}} + {{TimeSinceUnix .CreatedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} + +{{if gt .Activity.UnresolvedIssueCount 0}} +

    + {{svg "octicon-comment-discussion" 16 "tw-mr-2"}} + {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}} +

    +
    + {{range .Activity.UnresolvedIssues}} +

    + {{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}} + #{{.Index}} + {{if .IsPull}} + {{RenderRefIssueTitle $.Context .Title}} + {{else}} + {{RenderRefIssueTitle $.Context .Title}} + {{end}} + {{TimeSinceUnix .UpdatedUnix ctx.Locale}} +

    + {{end}} +
    +{{end}} diff --git a/templates/repo/recent_commits.tmpl b/templates/repo/recent_commits.tmpl new file mode 100644 index 0000000..5c241d6 --- /dev/null +++ b/templates/repo/recent_commits.tmpl @@ -0,0 +1,9 @@ +{{if .Permission.CanRead $.UnitTypeCode}} +
    +
    +{{end}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl new file mode 100644 index 0000000..4c7f13d --- /dev/null +++ b/templates/repo/release/list.tmpl @@ -0,0 +1,142 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + {{template "repo/release_tag_header" .}} +
      + {{range $idx, $info := .Releases}} + {{$release := $info.Release}} +
    • +
      + {{svg "octicon-tag" 16 "tw-mr-1"}}{{$release.TagName}} + {{if and $release.Sha1 ($.Permission.CanRead $.UnitTypeCode)}} + {{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha $release.Sha1}} + {{template "repo/branch_dropdown" dict "root" $ "release" $release}} + {{end}} +
      +
      +
      +

      + {{$release.Title}} + {{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}} + {{if $release.IsDraft}} + {{ctx.Locale.Tr "repo.release.draft"}} + {{else if $release.IsPrerelease}} + {{ctx.Locale.Tr "repo.release.prerelease"}} + {{else if (not $release.IsTag)}} + {{ctx.Locale.Tr "repo.release.stable"}} + {{end}} +

      +
      + {{if $.CanCreateRelease}} + + {{svg "octicon-pencil"}} + + {{end}} +
      +
      +

      + + {{if $release.OriginalAuthor}} + {{svg (MigrationIcon $release.Repo.GetOriginalURLHostname) 20 "tw-mr-1"}}{{$release.OriginalAuthor}} + {{else if $release.Publisher}} + {{ctx.AvatarUtils.Avatar $release.Publisher 20 "tw-mr-1"}} + {{$release.Publisher.GetDisplayName}} + {{else}} + Ghost + {{end}} + + + {{ctx.Locale.Tr "repo.released_this"}} + + {{if $release.CreatedUnix}} + {{TimeSinceUnix $release.CreatedUnix ctx.Locale}} + {{end}} + {{if and (not $release.IsDraft) ($.Permission.CanRead $.UnitTypeCode)}} + | {{ctx.Locale.Tr "repo.release.ahead.commits" $release.NumCommitsBehind}} {{ctx.Locale.Tr "repo.release.ahead.target" $release.TargetBehind}} + {{end}} +

      + {{template "repo/tag/verification_line" (dict "ctxData" $ "release" $release)}} +
      + {{$release.RenderedNote}} +
      + {{$hasReleaseAttachment := gt (len $release.Attachments) 0}} + {{$hasArchiveLinks := and (not $.DisableDownloadSourceArchives) (not $release.IsDraft) (not $release.HideArchiveLinks) ($.Permission.CanRead $.UnitTypeCode)}} + {{if or $hasArchiveLinks $hasReleaseAttachment}} +
      +
      + + {{ctx.Locale.Tr "repo.release.downloads"}} + + +
      + {{end}} +
      +
      +
    • + {{end}} +
    + + {{template "base/paginate" .}} +
    +
    + +{{if (and ($.Permission.CanWrite $.UnitTypeCode) .PageIsTagList)}} + +{{end}} + +{{template "base/footer" .}} diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl new file mode 100644 index 0000000..9bbd11f --- /dev/null +++ b/templates/repo/release/new.tmpl @@ -0,0 +1,183 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    + {{if .PageIsEditRelease}} + {{ctx.Locale.Tr "repo.release.edit_release"}} +
    {{ctx.Locale.Tr "repo.release.edit_subheader"}}
    + {{else}} + {{ctx.Locale.Tr "repo.release.new_release"}} +
    {{ctx.Locale.Tr "repo.release.new_subheader"}}
    + {{end}} +

    + {{template "base/alert" .}} +
    + {{.CsrfTokenHtml}} +
    +
    + {{if .PageIsEditRelease}} + {{.tag_name}}@{{.tag_target}} + {{else}} + + +
    + @ + +
    +
    + {{ctx.Locale.Tr "repo.release.tag_helper"}} +
    + {{end}} +
    +
    +
    +
    + +
    +
    + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaContent" .content + "TextareaPlaceholder" (ctx.Locale.Tr "repo.release.message") + "TextareaAriaLabel" (ctx.Locale.Tr "repo.release.message") + "DropzoneParentContainer" "form" + "EasyMDE" true + )}} +
    + {{range .attachments}} +
    +
    +
    + {{if .ExternalURL}} + {{svg "octicon-link-external" 16 "tw-mr-2"}} + {{else}} + {{svg "octicon-package" 16 "tw-mr-2"}} + {{end}} +
    + + + {{if .ExternalURL}} + + {{else}} + {{ctx.Locale.TrN + .DownloadCount "repo.release.download_count_one" + "repo.release.download_count_few" (ctx.Locale.PrettyNumber + .DownloadCount)}} · {{.Size | ctx.Locale.TrSize}} + {{end}} +
    + + {{ctx.Locale.Tr "remove"}} + +
    + {{end}} +
    +
    +
    + {{svg "octicon-link-external" 16 "tw-mr-2"}} +
    + + +
    + + {{ctx.Locale.Tr "remove"}} + +
    + + {{if .IsAttachmentEnabled}} +
    + {{template "repo/upload" .}} +
    + {{end}} +
    +
    +
    +
    +
    + {{if not .PageIsEditRelease}} + + {{else}} + + {{end}} + + {{if not .DisableDownloadSourceArchives}} + + {{end}} +
    +
    +
    + {{if .PageIsEditRelease}} + + {{ctx.Locale.Tr "repo.release.cancel"}} + + + {{ctx.Locale.Tr "repo.release.delete_release"}} + + {{if .IsDraft}} + + + {{else}} + + {{end}} + {{else}} + {{if not .tag_name}} + + {{end}} + + + {{end}} +
    +
    +
    +
    +
    +
    + +{{if .PageIsEditRelease}} + +{{end}} +{{template "base/footer" .}} diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl new file mode 100644 index 0000000..dafe9f2 --- /dev/null +++ b/templates/repo/release_tag_header.tmpl @@ -0,0 +1,31 @@ +{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}} +{{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} + +{{if $canReadReleases}} + +
    +{{else if $canReadCode}} + {{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}} + {{template "repo/sub_menu" .}} +{{end}} diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl new file mode 100644 index 0000000..6d114c8 --- /dev/null +++ b/templates/repo/search.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{if $.CodeIndexerDisabled}} + {{$branchURLPrefix := printf "%s/search/branch/" $.RepoLink}} + {{$tagURLPrefix := printf "%s/search/tag/" $.RepoLink}} + {{$suffix := printf "?q=%s&fuzzy=%t" (.Keyword|QueryEscape) .IsFuzzy}} + {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mb-3" "branchURLPrefix" $branchURLPrefix "branchURLSuffix" $suffix "tagURLPrefix" $tagURLPrefix "tagURLSuffix" $suffix}} + {{end}} + {{template "shared/search/code/search" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/search_name.tmpl b/templates/repo/search_name.tmpl new file mode 100644 index 0000000..951f168 --- /dev/null +++ b/templates/repo/search_name.tmpl @@ -0,0 +1 @@ +{{.Name}}{{if DefaultShowFullName}} {{.FullName}}{{end}} diff --git a/templates/repo/settings/actions.tmpl b/templates/repo/settings/actions.tmpl new file mode 100644 index 0000000..f38ab5b --- /dev/null +++ b/templates/repo/settings/actions.tmpl @@ -0,0 +1,11 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings actions")}} +
    + {{if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl new file mode 100644 index 0000000..52c0c2c --- /dev/null +++ b/templates/repo/settings/branches.tmpl @@ -0,0 +1,78 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}} +
    + {{if .Repository.IsArchived}} +
    + {{ctx.Locale.Tr "repo.settings.archive.branchsettings_unavailable"}} +
    + {{else}} +

    + {{ctx.Locale.Tr "repo.default_branch"}} +

    +
    +

    + {{ctx.Locale.Tr "repo.settings.default_branch_desc"}} +

    +
    + {{.CsrfTokenHtml}} + + {{if not .Repository.IsEmpty}} + + + {{end}} +
    +
    + +

    + {{ctx.Locale.Tr "repo.settings.protected_branch"}} + +

    + +
    +
    + {{range .ProtectedBranches}} +
    +
    +
    +
    {{.RuleName}}
    +
    +
    +
    + {{ctx.Locale.Tr "repo.settings.edit_protected_branch"}} + +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "repo.settings.no_protected_branch"}} +
    + {{end}} +
    +
    + {{end}} +
    + + + +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl new file mode 100644 index 0000000..8028642 --- /dev/null +++ b/templates/repo/settings/collaboration.tmpl @@ -0,0 +1,117 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings collaboration")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.collaboration"}} +

    + {{if .Collaborators}} +
    +
    + {{range .Collaborators}} +
    + +
    +
    + {{template "shared/user/name" .}} +
    +
    +
    +
    + {{svg "octicon-shield-lock"}} + +
    + +
    +
    + {{end}} +
    +
    + {{end}} +
    +
    + {{.CsrfTokenHtml}} + + +
    +
    + + {{if .RepoOwnerIsOrganization}} +

    + {{ctx.Locale.Tr "repo.settings.teams"}} +

    + {{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}} + {{if .Teams}} +
    +
    + {{range $t, $team := .Teams}} +
    +
    + + {{.Name}} + +
    + {{svg "octicon-shield-lock"}} + {{if eq .AccessMode 1}}{{ctx.Locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{ctx.Locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{ctx.Locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{ctx.Locale.Tr "repo.settings.collaboration.undefined"}}{{end}} +
    + {{if or (eq .AccessMode 1) (eq .AccessMode 2)}} + {{$first := true}} +
    + Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ctx.Locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} +
    + {{end}} +
    + {{if $allowedToChangeTeams}} +
    + +
    + {{end}} +
    + {{end}} +
    +
    + {{end}} +
    + {{if $allowedToChangeTeams}} +
    + {{.CsrfTokenHtml}} + + +
    + {{else}} +
    + {{ctx.Locale.Tr "repo.settings.change_team_access_not_allowed"}} +
    + {{end}} +
    + {{end}} +
    + + + +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl new file mode 100644 index 0000000..4bc3abf --- /dev/null +++ b/templates/repo/settings/deploy_keys.tmpl @@ -0,0 +1,86 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.deploy_keys"}} +
    + {{if not .DisableSSH}} + + {{else}} + + {{end}} +
    +

    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + {{ctx.Locale.Tr "repo.settings.deploy_key_desc"}} +
    +
    + + +
    +
    + + +
    +
    +
    + + + {{ctx.Locale.Tr "repo.settings.is_writable_info"}} +
    +
    + + +
    +
    + {{if .Deploykeys}} +
    + {{range .Deploykeys}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Name}}
    +
    + {{.Fingerprint}} +
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}} - {{ctx.Locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{ctx.Locale.Tr "settings.can_write_info"}} {{end}}

    +
    +
    +
    + +
    +
    + {{end}} +
    + {{else}} + {{ctx.Locale.Tr "repo.settings.no_deploy_keys"}} + {{end}} +
    +
    + + + +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl new file mode 100644 index 0000000..e20f51b --- /dev/null +++ b/templates/repo/settings/githook_edit.tmpl @@ -0,0 +1,27 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit githook")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.githooks"}} +

    +
    +

    {{ctx.Locale.Tr "repo.settings.githook_edit_desc"}}

    +
    + {{.CsrfTokenHtml}} + {{with .Hook}} +
    + + {{.Name}} +
    +
    + + +
    +
    +
    + +
    + {{end}} +
    +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl new file mode 100644 index 0000000..1a603f9 --- /dev/null +++ b/templates/repo/settings/githooks.tmpl @@ -0,0 +1,23 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings githooks")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.githooks"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "repo.settings.githooks_desc"}} +
    + {{range .Hooks}} +
    + {{svg "octicon-dot-fill" 22}} + {{.Name}} + + {{svg "octicon-pencil"}} + +
    + {{end}} +
    +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/layout_footer.tmpl b/templates/repo/settings/layout_footer.tmpl new file mode 100644 index 0000000..60cad3f --- /dev/null +++ b/templates/repo/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    + {{/* block: repo-setting-content */}} +{{end}} + +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/settings/layout_head.tmpl b/templates/repo/settings/layout_head.tmpl new file mode 100644 index 0000000..efec9bf --- /dev/null +++ b/templates/repo/settings/layout_head.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .ctxData}} +
    + {{template "repo/header" .ctxData}} +
    + {{template "repo/settings/navbar" .ctxData}} +
    + {{template "base/alert" .ctxData}} + {{/* block: repo-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    +{{end}} diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl new file mode 100644 index 0000000..6d7aac2 --- /dev/null +++ b/templates/repo/settings/lfs.tmpl @@ -0,0 +1,53 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.lfs_filelist"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

    + + + {{range .LFSFiles}} + + + + + + + {{else}} + + + + {{end}} + +
    + + {{ShortSha .Oid}} + + {{ctx.Locale.TrSize .Size}}{{TimeSince .CreatedUnix.AsTime ctx.Locale}} + {{ctx.Locale.Tr "repo.settings.lfs_findcommits"}} + +
    {{ctx.Locale.Tr "repo.settings.lfs_no_lfs_files"}}
    + {{template "base/paginate" .}} + {{range .LFSFiles}} + + {{end}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl new file mode 100644 index 0000000..5bcd2af --- /dev/null +++ b/templates/repo/settings/lfs_file.tmpl @@ -0,0 +1,57 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}} +
    +
    +

    + {{ctx.Locale.Tr "repo.settings.lfs"}} / {{.LFSFile.Oid}} + +

    +
    + {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} +
    + {{if .IsMarkup}} + {{if .FileContent}}{{.FileContent | SafeHTML}}{{end}} + {{else if .IsPlainText}} +
    {{if .FileContent}}{{.FileContent | SafeHTML}}{{end}}
    + {{else if not .IsTextFile}} +
    + {{if .IsImageFile}} + + {{else if .IsVideoFile}} + + {{else if .IsAudioFile}} + + {{else if .IsPDFFile}} +
    + {{else}} + {{ctx.Locale.Tr "repo.file_view_raw"}} + {{end}} +
    + {{else if .FileSize}} + + + + {{if .IsFileTooLarge}} + + {{else}} + + + {{end}} + + +
    {{ctx.Locale.Tr "repo.file_too_large"}}{{.LineNums}}
      {{.FileContent}}
    + {{end}} +
    +
    +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl new file mode 100644 index 0000000..809a028 --- /dev/null +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -0,0 +1,46 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}} +
    +
    +

    + {{ctx.Locale.Tr "repo.settings.lfs"}} / {{.Oid}} +

    + + + {{range .Results}} + + + + + + + + {{else}} + + + + {{end}} + +
    + {{svg "octicon-file"}} + {{.Name}} + + + + {{.Summary | RenderEmoji $.Context}} + + + + {{svg "octicon-git-branch"}}{{.BranchName}} + + {{if .ParentHashes}} + {{ctx.Locale.Tr "repo.diff.parent"}} + {{range .ParentHashes}} + {{ShortSha .String}} + {{end}} + {{end}} + {{ctx.Locale.Tr "repo.diff.commit"}} + {{ShortSha .SHA}} + {{TimeSince .When ctx.Locale}}
    {{ctx.Locale.Tr "repo.settings.lfs_lfs_file_no_commits"}}
    +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl new file mode 100644 index 0000000..9a18f52 --- /dev/null +++ b/templates/repo/settings/lfs_locks.tmpl @@ -0,0 +1,56 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}} +
    +
    +

    + {{ctx.Locale.Tr "repo.settings.lfs"}} / {{ctx.Locale.Tr "repo.settings.lfs_locks"}} ({{ctx.Locale.Tr "admin.total" .Total}}) +

    +
    +
    + {{$.CsrfTokenHtml}} +
    + + +
    +
    +
    + + + {{range $index, $lock := .LFSLocks}} + + + + + + + {{else}} + + + + {{end}} + +
    + {{if index $.Linkable $index}} + {{svg "octicon-file"}} + {{$lock.Path}} + {{else}} + {{svg "octicon-diff"}} + {{$lock.Path}} + {{end}} + {{if not (index $.Lockables $index)}} + {{svg "octicon-alert"}} + {{end}} + + + {{ctx.AvatarUtils.Avatar $lock.Owner}} + {{$lock.Owner.DisplayName}} + + {{TimeSince .Created ctx.Locale}} +
    + {{$.CsrfTokenHtml}} + +
    +
    {{ctx.Locale.Tr "repo.settings.lfs_locks_no_locks"}}
    + {{template "base/paginate" .}} +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl new file mode 100644 index 0000000..a0bb8c4 --- /dev/null +++ b/templates/repo/settings/lfs_pointers.tmpl @@ -0,0 +1,56 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}} + {{if gt .NumAssociatable 0}} +
    +
    + {{.CsrfTokenHtml}} + {{range .Pointers}} + {{if .Associatable}} + + {{end}} + {{end}} + +
    +
    + {{end}} +

    +
    + + + + + + + + + + + + + {{range .Pointers}} + + + + + + + + + {{end}} + +
    {{ctx.Locale.Tr "repo.settings.lfs_pointers.sha"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.oid"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.inRepo"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.exists"}}{{ctx.Locale.Tr "repo.settings.lfs_pointers.accessible"}}
    + + {{ShortSha .SHA}} + + + + {{ShortSha .Oid}} + + {{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if .Accessible}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} + {{ctx.Locale.Tr "repo.settings.lfs_findcommits"}} +
    +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl new file mode 100644 index 0000000..0f6cb74 --- /dev/null +++ b/templates/repo/settings/navbar.tmpl @@ -0,0 +1,72 @@ +
    + +
    diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl new file mode 100644 index 0000000..09f80ca --- /dev/null +++ b/templates/repo/settings/options.tmpl @@ -0,0 +1,794 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings options")}} +
    +

    + {{ctx.Locale.Tr "repo.settings.basic_settings"}} +

    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
    + + +
    +
    + + {{ctx.Locale.TrSize .Repository.Size}} +
    +
    + +
    + + +
    +
    + {{if not .Repository.IsFork}} +
    + +
    + {{if .IsAdmin}} + + {{else}} + + {{if and .Repository.IsPrivate $.ForcePrivate}}{{end}} + {{end}} + +
    +
    + {{end}} +
    + + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    + + {{if FederationEnabled}} +

    + {{ctx.Locale.Tr "repo.settings.federation_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    +

    {{ctx.Locale.Tr "repo.settings.federation_apapiurl"}}

    +

    {{.RepositoryAPActorID}}

    +
    + + +
    +
    + +
    +
    +
    + {{end}} + + {{/* These variables exist to make the logic in the Settings window easier to comprehend and are not used later on. */}} + {{$newMirrorsPartiallyEnabled := or (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}} + {{/* .Repository.IsMirror is not always reliable if the repository is not actively acting as a mirror because of errors. */}} + {{$showMirrorSettings := and (.Repository.UnitEnabled $.Context $.UnitTypeCode) (or $newMirrorsPartiallyEnabled .Repository.IsMirror .PullMirror .PushMirrors)}} + {{$newMirrorsEntirelyEnabled := and (not .DisableNewPullMirrors) (not .DisableNewPushMirrors)}} + {{$onlyNewPushMirrorsEnabled := and (not .DisableNewPushMirrors) .DisableNewPullMirrors}} + {{$onlyNewPullMirrorsEnabled := and .DisableNewPushMirrors (not .DisableNewPullMirrors)}} + {{$existingPushMirror := or .Repository.IsMirror .PushMirrors}} + {{$modifyBrokenPullMirror := and .Repository.IsMirror (not .PullMirror)}} + {{$isWorkingPullMirror := .PullMirror}} + + {{if $showMirrorSettings}} +

    + {{ctx.Locale.Tr "repo.settings.mirror_settings"}} +

    +
    + {{if .Repository.IsArchived}} +
    + {{ctx.Locale.Tr "repo.settings.archive.mirrors_unavailable"}} +
    + {{else}} + {{if $newMirrorsEntirelyEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

    + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.pull_mirror_instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_pull_section"}}
    + {{else if $onlyNewPushMirrorsEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_pull_mirror.instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}
    + {{else if $onlyNewPullMirrorsEnabled}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.instructions"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.pull_mirror_warning"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.more_information_if_disabled"}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.doc_link_title"}}

    + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.disabled_push_mirror.info"}} + {{if $existingPushMirror}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}} + {{end}} + {{else}} + {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.no_new_mirrors"}} {{ctx.Locale.Tr "repo.settings.mirror_settings.docs.can_still_use"}}
    + {{end}} + + {{if .Repository.IsMirror}} + + + + + + + + + + + {{if $modifyBrokenPullMirror}} + {{/* even if a repo is a pull mirror (IsMirror=true), the PullMirror might still be nil if the mirror migration is broken */}} + + + + + + {{else if $isWorkingPullMirror}} + + + + + + + + + + + + {{end}}{{/* end if: $modifyBrokenPullMirror / $isWorkingPullMirror */}} +
    {{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}{{ctx.Locale.Tr "repo.mirror_public_key"}}
    +
    {{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}
    +
    {{.PullMirror.RemoteAddress}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}{{DateTime "full" .PullMirror.UpdatedUnix}} +
    + {{.CsrfTokenHtml}} + + +
    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
    + +
    + + +
    +
    +
    + + +
    + {{$address := MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName}} +
    + + +

    {{ctx.Locale.Tr "repo.mirror_address_desc"}}

    +
    +
    + + {{ctx.Locale.Tr "repo.need_auth"}} + +
    +
    + + +
    +
    + + +
    +

    {{ctx.Locale.Tr "repo.mirror_password_help"}}

    +
    +
    + + {{if .LFSStartServer}} +
    + +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}

    +
    + {{end}} +
    + +
    +
    +
    + {{end}}{{/* end if .Repository.IsMirror */}} + + + + + + + + + + + + + {{range .PushMirrors}} + + + + + + + + {{else}} + + + + {{end}} + {{if (not .DisableNewPushMirrors)}} + + + + {{end}} + +
    {{ctx.Locale.Tr "repo.settings.mirror_settings.pushed_repository"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction"}}{{ctx.Locale.Tr "repo.settings.mirror_settings.last_update"}}{{ctx.Locale.Tr "repo.mirror_public_key"}}
    {{.RemoteAddress}}{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}
    {{ctx.Locale.Tr "error"}}
    {{end}}
    {{if not (eq (len .GetPublicKey) 0)}}{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.copy_public_key"}}{{else}}{{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none_ssh"}}{{end}} + +
    + {{$.CsrfTokenHtml}} + + + +
    +
    + {{$.CsrfTokenHtml}} + + + +
    +
    {{ctx.Locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
    + + +

    {{ctx.Locale.Tr "repo.mirror_address_desc"}}

    +
    +
    + + {{ctx.Locale.Tr "repo.need_auth"}} + +
    +
    + + +
    +
    + + +
    + {{if .CanUseSSHMirroring}} +
    +
    + + + {{ctx.Locale.Tr "repo.mirror_use_ssh.helper"}} +
    +
    + {{end}} +
    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + +
    +
    +
    + {{end}} +
    + {{end}} + +

    + {{ctx.Locale.Tr "repo.settings.signing_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.trust_model.default.desc"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.trust_model.collaborator.desc"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.trust_model.committer.desc"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}

    +
    +
    +
    + +
    +
    + +
    +
    +
    + + {{if .IsAdmin}} +

    + {{ctx.Locale.Tr "repo.settings.admin_settings"}} +

    +
    +
    + {{.CsrfTokenHtml}} + +
    +
    + + +
    +
    + +
    + +
    +
    + +
    +
    + {{.CsrfTokenHtml}} + + {{if .CodeIndexerEnabled}} +

    {{ctx.Locale.Tr "repo.settings.admin_code_indexer"}}

    +
    + + + {{if .CodeIndexerStatus}} + + {{ShortSha .CodeIndexerStatus.CommitSha}} + + {{else}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{end}} + +
    + +
    +
    + {{end}} +

    {{ctx.Locale.Tr "repo.settings.admin_stats_indexer"}}

    +
    + {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} + + {{end}} + + {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} + + {{ShortSha .StatsIndexerStatus.CommitSha}} + + {{else}} + {{ctx.Locale.Tr "repo.settings.admin_indexer_unindexed"}} + {{end}} + +
    + +
    +
    +
    +
    + {{end}} + + {{if .Permission.IsOwner}} +

    + {{ctx.Locale.Tr "repo.settings.danger_zone"}} +

    +
    +
    + {{if .Repository.IsMirror}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.convert"}}
    +
    {{ctx.Locale.Tr "repo.settings.convert_desc"}}
    +
    +
    + +
    +
    + {{end}} + {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.convert_fork"}}
    +
    {{ctx.Locale.Tr "repo.settings.convert_fork_desc"}}
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.transfer.title"}}
    +
    + {{if .RepoTransfer}} + {{ctx.Locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}} + {{else}} + {{ctx.Locale.Tr "repo.settings.transfer_desc"}} + {{end}} +
    +
    +
    + {{if .RepoTransfer}} +
    + {{.CsrfTokenHtml}} + + +
    + {{else}} + + {{end}} +
    +
    + {{if .Permission.CanRead $.UnitTypeWiki}} + {{if ne $.Repository.GetWikiBranchName .DefaultWikiBranchName}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.wiki_rename_branch_main"}}
    +
    {{ctx.Locale.Tr "repo.settings.wiki_rename_branch_main_desc" .DefaultWikiBranchName}}
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.wiki_delete"}}
    +
    {{ctx.Locale.Tr "repo.settings.wiki_delete_desc"}}
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    {{ctx.Locale.Tr "repo.settings.delete"}}
    +
    {{ctx.Locale.Tr "repo.settings.delete_desc"}}
    +
    +
    + +
    +
    + {{if not .Repository.IsMirror}} +
    +
    + {{if .Repository.IsArchived}} +
    {{ctx.Locale.Tr "repo.settings.unarchive.header"}}
    +
    {{ctx.Locale.Tr "repo.settings.unarchive.text"}}
    + {{else}} +
    {{ctx.Locale.Tr "repo.settings.archive.header"}}
    +
    {{ctx.Locale.Tr "repo.settings.archive.text"}}
    + {{end}} +
    +
    + +
    +
    + {{end}} +
    +
    + {{end}} +
    +{{template "repo/settings/layout_footer" .}} + +{{if .Permission.IsOwner}} + {{if .Repository.IsMirror}} + + {{end}} + {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} + + {{end}} + + + + + {{if .Repository.UnitEnabled $.Context $.UnitTypeWiki}} + + {{if ne $.Repository.GetWikiBranchName .DefaultWikiBranchName}} + + {{end}} + {{end}} + + {{if not .Repository.IsMirror}} + + {{end}} +{{end}} + +{{template "repo/settings/push_mirror_sync_modal" .}} diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl new file mode 100644 index 0000000..ce7016e --- /dev/null +++ b/templates/repo/settings/protected_branch.tmpl @@ -0,0 +1,262 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings branches")}} +
    +

    + {{if .Rule.RuleName}} + {{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}} + {{else}} + {{ctx.Locale.Tr "repo.settings.protect_new_rule"}} + {{end}} +

    +
    + {{.CsrfTokenHtml}} + +
    + {{ctx.Locale.Tr "repo.settings.protect_patterns"}} + + + +
    + +
    + {{ctx.Locale.Tr "repo.settings.event_push"}} + + + +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    + + +
    + {{end}} +
    +
    + + +
    +
    +
    + +
    +
    + {{ctx.Locale.Tr "repo.settings.event_pull_request_approvals"}} + +
    + +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    + + +
    + {{end}} +
    +
    + +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.ignore_stale_approvals_desc"}}

    +
    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.protect_check_status_contexts_desc"}}

    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.protect_status_check_patterns_desc"}}

    + + + + + + + + {{range $.recent_status_checks}} + + + + {{else}} + + {{end}} + +
    {{ctx.Locale.Tr "repo.settings.protect_check_status_contexts_list"}}
    + {{.}} + {{ctx.Locale.Tr "repo.settings.protect_status_check_matched"}} +
    -
    +
    +
    +
    +
    + {{ctx.Locale.Tr "repo.settings.event_pull_request_merge"}} +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.protect_enable_merge_desc"}}

    +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.protect_merge_whitelist_committers_desc"}}

    +
    +
    +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    + + +
    + {{end}} +
    +
    + + + +
    +
    + {{ctx.Locale.Tr "repo.settings.event_pull_request_enforcement"}} + +
    + +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/push_mirror_sync_modal.tmpl b/templates/repo/settings/push_mirror_sync_modal.tmpl new file mode 100644 index 0000000..e8dad61 --- /dev/null +++ b/templates/repo/settings/push_mirror_sync_modal.tmpl @@ -0,0 +1,32 @@ + diff --git a/templates/repo/settings/runner_edit.tmpl b/templates/repo/settings/runner_edit.tmpl new file mode 100644 index 0000000..8b76aea --- /dev/null +++ b/templates/repo/settings/runner_edit.tmpl @@ -0,0 +1,5 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings runners")}} +
    + {{template "shared/actions/runner_edit" .}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/secrets.tmpl b/templates/repo/settings/secrets.tmpl new file mode 100644 index 0000000..0b89639 --- /dev/null +++ b/templates/repo/settings/secrets.tmpl @@ -0,0 +1,5 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}} +
    + {{template "shared/secrets/add_list" .}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/tags.tmpl b/templates/repo/settings/tags.tmpl new file mode 100644 index 0000000..e7a7aaa --- /dev/null +++ b/templates/repo/settings/tags.tmpl @@ -0,0 +1,126 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}} +
    + {{if .Repository.IsArchived}} +
    + {{ctx.Locale.Tr "repo.settings.archive.tagsettings_unavailable"}} +
    + {{else}} +

    + {{ctx.Locale.Tr "repo.settings.tags.protection"}} +

    + +
    +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + {{if .Owner.IsOrganization}} +
    + + +
    + {{end}} +
    + {{if .PageIsEditProtectedTag}} + + + {{ctx.Locale.Tr "cancel"}} + + {{else}} + + {{end}} +
    +
    +
    +
    + +
    + + + + + + + + {{range .ProtectedTags}} + + + + + + {{else}} + + {{end}} + +
    {{ctx.Locale.Tr "repo.settings.tags.protection.pattern"}}{{ctx.Locale.Tr "repo.settings.tags.protection.allowed"}}
    {{.NamePattern}}
    + {{if or .AllowlistUserIDs (and $.Owner.IsOrganization .AllowlistTeamIDs)}} + {{$userIDs := .AllowlistUserIDs}} + {{range $.Users}} + {{if SliceUtils.Contains $userIDs .ID}} + {{ctx.AvatarUtils.Avatar . 26}} {{.GetDisplayName}} + {{end}} + {{end}} + {{if $.Owner.IsOrganization}} + {{$teamIDs := .AllowlistTeamIDs}} + {{range $.Teams}} + {{if SliceUtils.Contains $teamIDs .ID}} + {{.Name}} + {{end}} + {{end}} + {{end}} + {{else}} + {{ctx.Locale.Tr "repo.settings.tags.protection.allowed.noone"}} + {{end}} + + {{ctx.Locale.Tr "edit"}} +
    + {{$.CsrfTokenHtml}} + + +
    +
    {{ctx.Locale.Tr "repo.settings.tags.protection.none"}}
    +
    +
    +
    + {{end}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/units.tmpl b/templates/repo/settings/units.tmpl new file mode 100644 index 0000000..66ed035 --- /dev/null +++ b/templates/repo/settings/units.tmpl @@ -0,0 +1,13 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings options")}} +
    +
    + {{.CsrfTokenHtml}} + {{template "repo/settings/units/overview" .}} + {{template "repo/settings/units/issues" .}} + {{if not .IsMirror}} + {{template "repo/settings/units/pulls" .}} + {{end}} + {{template "repo/settings/units/wiki" .}} +
    +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/units/issues.tmpl b/templates/repo/settings/units/issues.tmpl new file mode 100644 index 0000000..b4217dd --- /dev/null +++ b/templates/repo/settings/units/issues.tmpl @@ -0,0 +1,102 @@ +

    + {{ctx.Locale.Tr "repo.issues"}} +

    +
    + {{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}} + {{$isIssuesGlobalDisabled := .UnitTypeIssues.UnitGlobalDisabled}} + {{$isExternalTrackerGlobalDisabled := .UnitTypeExternalTracker.UnitGlobalDisabled}} + {{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}} +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + {{if .Repository.CanEnableTimetracker}} +
    +
    + + +
    +
    +
    +
    + + +
    +
    + {{end}} +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.external_tracker_url_desc"}}

    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.tracker_url_format_desc"}}

    +
    +
    + +
    +
    + {{$externalTracker := (.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker)}} + {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}} + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc"}}

    +
    +
    +
    + +
    + +
    + +
    +
    diff --git a/templates/repo/settings/units/overview.tmpl b/templates/repo/settings/units/overview.tmpl new file mode 100644 index 0000000..a851c66 --- /dev/null +++ b/templates/repo/settings/units/overview.tmpl @@ -0,0 +1,62 @@ +

    + {{ctx.Locale.Tr "repo.settings.units.overview"}} +

    +
    + {{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}} + {{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}} +
    + +
    + + +
    +
    + + {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} + {{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}} +
    + +
    + + +
    +
    + + {{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}} + {{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}} +
    + +
    + + +
    +
    + + {{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} + {{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}} +
    + +
    + + +
    +
    + + {{if .EnableActions}} + {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} + {{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}} +
    + +
    + + +
    +
    + {{end}} + +
    + +
    + +
    +
    diff --git a/templates/repo/settings/units/pulls.tmpl b/templates/repo/settings/units/pulls.tmpl new file mode 100644 index 0000000..4e9c53e --- /dev/null +++ b/templates/repo/settings/units/pulls.tmpl @@ -0,0 +1,132 @@ +

    + {{ctx.Locale.Tr "repo.pulls"}} +

    +
    + {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} + {{$pullRequestGlobalDisabled := .UnitTypePullRequests.UnitGlobalDisabled}} + {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} +
    + +
    + + +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "repo.settings.merge_style_desc"}} +

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +

    + {{ctx.Locale.Tr "repo.settings.default_merge_style_desc"}} +

    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    diff --git a/templates/repo/settings/units/wiki.tmpl b/templates/repo/settings/units/wiki.tmpl new file mode 100644 index 0000000..23df294 --- /dev/null +++ b/templates/repo/settings/units/wiki.tmpl @@ -0,0 +1,51 @@ +

    + {{ctx.Locale.Tr "repo.wiki"}} +

    +
    + {{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}} + {{$isWikiGlobalDisabled := .UnitTypeWiki.UnitGlobalDisabled}} + {{$isExternalWikiGlobalDisabled := .UnitTypeExternalWiki.UnitGlobalDisabled}} + {{$isBothWikiGlobalDisabled := and $isWikiGlobalDisabled $isExternalWikiGlobalDisabled}} +
    + +
    + + +
    +
    +
    +
    +
    + + +
    +
    + {{if (not .Repository.IsPrivate)}} +
    +
    +
    + + +
    +
    +
    + {{end}} +
    +
    + + +
    +
    +
    + + +

    {{ctx.Locale.Tr "repo.settings.external_wiki_url_desc"}}

    +
    +
    + +
    + +
    + +
    +
    diff --git a/templates/repo/settings/webhook/base.tmpl b/templates/repo/settings/webhook/base.tmpl new file mode 100644 index 0000000..d524722 --- /dev/null +++ b/templates/repo/settings/webhook/base.tmpl @@ -0,0 +1,5 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings webhooks")}} +
    + {{template "repo/settings/webhook/list" .}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl new file mode 100644 index 0000000..36e75a7 --- /dev/null +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -0,0 +1,26 @@ +

    + {{.Title}} +
    + +
    +

    +
    +
    +
    + {{.Description}} +
    + {{range .Webhooks}} +
    + {{svg "octicon-dot-fill" 22}} +
    + {{.URL}} +
    + {{svg "octicon-pencil"}} + {{svg "octicon-trash"}} +
    + {{end}} +
    +
    diff --git a/templates/repo/settings/webhook/delete_modal.tmpl b/templates/repo/settings/webhook/delete_modal.tmpl new file mode 100644 index 0000000..9955ed3 --- /dev/null +++ b/templates/repo/settings/webhook/delete_modal.tmpl @@ -0,0 +1,10 @@ + diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl new file mode 100644 index 0000000..8ee1446 --- /dev/null +++ b/templates/repo/settings/webhook/history.tmpl @@ -0,0 +1,90 @@ +{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}} +{{if .PageIsSettingsHooksEdit}} +

    + {{ctx.Locale.Tr "repo.settings.recent_deliveries"}} + {{if .Permission.IsAdmin}} +
    + + + + +
    + {{end}} +

    +
    +
    + {{range .History}} +
    +
    +
    + {{if .IsSucceed}} + {{svg "octicon-check"}} + {{else if not .IsDelivered}} + {{svg "octicon-stopwatch"}} + {{else}} + {{svg "octicon-alert"}} + {{end}} + {{.UUID}} +
    + + {{TimeSince .Delivered.AsTime ctx.Locale}} + +
    +
    + +
    + {{if .RequestInfo}} +
    {{ctx.Locale.Tr "repo.settings.webhook.headers"}}
    +
    Request URL: {{.RequestInfo.URL}}
    +Request method: {{if .RequestInfo.HTTPMethod}}{{.RequestInfo.HTTPMethod}}{{else}}POST{{end}}
    +{{range $key, $val := .RequestInfo.Headers}}{{$key}}: {{$val}}
    +{{end}}
    +
    {{ctx.Locale.Tr "repo.settings.webhook.payload"}}
    +
    {{or .RequestInfo.Body .PayloadContent}}
    + {{else}} + - + {{end}} +
    +
    + {{if .ResponseInfo}} +
    {{ctx.Locale.Tr "repo.settings.webhook.headers"}}
    +
    {{range $key, $val := .ResponseInfo.Headers}}{{$key}}: {{$val}}
    +{{end}}
    +
    {{ctx.Locale.Tr "repo.settings.webhook.body"}}
    +
    {{.ResponseInfo.Body}}
    + {{else}} + - + {{end}} +
    +
    +
    + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/settings/webhook/link_menu.tmpl b/templates/repo/settings/webhook/link_menu.tmpl new file mode 100644 index 0000000..2edc5af --- /dev/null +++ b/templates/repo/settings/webhook/link_menu.tmpl @@ -0,0 +1,12 @@ +{{$size := 20}} +{{if .Size}} + {{$size = .Size}} +{{end}} + diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl new file mode 100644 index 0000000..b24159f --- /dev/null +++ b/templates/repo/settings/webhook/list.tmpl @@ -0,0 +1,4 @@ + +{{template "repo/settings/webhook/base_list" .}} + +{{template "repo/settings/webhook/delete_modal" .}} diff --git a/templates/repo/settings/webhook/new.tmpl b/templates/repo/settings/webhook/new.tmpl new file mode 100644 index 0000000..b04a442 --- /dev/null +++ b/templates/repo/settings/webhook/new.tmpl @@ -0,0 +1,7 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings new webhook")}} +
    + {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
    +{{template "repo/settings/layout_footer" .}} diff --git a/templates/repo/shabox_badge.tmpl b/templates/repo/shabox_badge.tmpl new file mode 100644 index 0000000..939292b --- /dev/null +++ b/templates/repo/shabox_badge.tmpl @@ -0,0 +1,15 @@ +
    + {{if .verification.Verified}} +
    + {{if ne .verification.SigningUser.ID 0}} + {{svg "gitea-lock"}} + {{ctx.AvatarUtils.Avatar .verification.SigningUser 28 "signature"}} + {{else}} + {{svg "gitea-lock-cog"}} + {{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 28 "signature"}} + {{end}} +
    + {{else}} + {{svg "gitea-unlock"}} + {{end}} +
    diff --git a/templates/repo/star_unstar.tmpl b/templates/repo/star_unstar.tmpl new file mode 100644 index 0000000..a407aa6 --- /dev/null +++ b/templates/repo/star_unstar.tmpl @@ -0,0 +1,14 @@ +
    +
    + + + {{CountFmt .Repository.NumStars}} + +
    +
    diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl new file mode 100644 index 0000000..ddf01b3 --- /dev/null +++ b/templates/repo/sub_menu.tmpl @@ -0,0 +1,45 @@ +{{if and (not .HideRepoInfo) (not .IsBlame)}} +
    + + {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} + + + {{range .LanguageStats}} +
    + {{end}} +
    + {{end}} +
    +{{end}} diff --git a/templates/repo/tag/list.tmpl b/templates/repo/tag/list.tmpl new file mode 100644 index 0000000..82f3dc0 --- /dev/null +++ b/templates/repo/tag/list.tmpl @@ -0,0 +1,79 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} + {{template "repo/release_tag_header" .}} +

    +
    + {{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.tags"}} +
    +

    + {{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}} +
    + + + {{range $idx, $release := .Releases}} + + + + {{end}} + +
    +

    + {{if $canReadReleases}} + {{.TagName}} + {{else}} + {{.TagName}} + {{end}} + {{template "repo/tag/verification_box" (dict "ctxData" $ "release" $release)}} +

    +
    + {{if $.Permission.CanRead $.UnitTypeCode}} + {{if .CreatedUnix}} + {{svg "octicon-clock" 16 "tw-mr-1"}}{{TimeSinceUnix .CreatedUnix ctx.Locale}} + {{end}} + + {{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha .Sha1}} + + {{if not $.DisableDownloadSourceArchives}} + {{svg "octicon-file-zip" 16 "tw-mr-1"}}ZIP + {{svg "octicon-file-zip" 16 "tw-mr-1"}}TAR.GZ + {{end}} + + {{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}} + {{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.new_release"}} + {{end}} + + {{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}} + + {{svg "octicon-trash" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.delete_tag"}} + + {{end}} + + {{if and $canReadReleases (not $release.IsTag)}} + {{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.detail"}} + {{end}} + {{end}} +
    +
    +
    + + {{template "base/paginate" .}} +
    +
    + +{{if $.Permission.CanWrite $.UnitTypeCode}} + +{{end}} + +{{template "base/footer" .}} diff --git a/templates/repo/tag/verification_box.tmpl b/templates/repo/tag/verification_box.tmpl new file mode 100644 index 0000000..3cf88ac --- /dev/null +++ b/templates/repo/tag/verification_box.tmpl @@ -0,0 +1,27 @@ +{{$v := call .ctxData.VerifyTag .release}} +{{if call .ctxData.HasSignature $v}} + {{$class := "isSigned"}} + {{$href := ""}} + {{if $v.Verified}} + {{$href = $v.SigningUser.HomeLink}} + {{$class = (print $class " isVerified")}} + {{else}} + {{$class = (print $class " isWarning")}} + {{end}} + + + {{if $v.Verified}} +
    + {{if ne $v.SigningUser.ID 0}} + {{svg "gitea-lock"}} + {{ctx.AvatarUtils.Avatar $v.SigningUser 28 "signature"}} + {{else}} + {{svg "gitea-lock-cog"}} + {{ctx.AvatarUtils.AvatarByEmail $v.Verification.SigningEmail "" 28 "signature"}} + {{end}} +
    + {{else}} + {{svg "gitea-unlock"}} + {{end}} +
    +{{end}} diff --git a/templates/repo/tag/verification_line.tmpl b/templates/repo/tag/verification_line.tmpl new file mode 100644 index 0000000..5f8335a --- /dev/null +++ b/templates/repo/tag/verification_line.tmpl @@ -0,0 +1,80 @@ +{{$v := call .ctxData.VerifyTag .release}} +{{if call .ctxData.HasSignature $v}} + {{$class := "isSigned"}} + {{$href := ""}} + {{if $v.Verified}} + {{$href = $v.SigningUser.HomeLink}} + {{$class = (print $class " isVerified")}} + {{else}} + {{$class = (print $class " isWarning")}} + {{end}} + +
    +
    + {{if $v.Verified}} + {{if ne $v.SigningUser.ID 0}} + {{svg "gitea-lock" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}} + {{ctx.AvatarUtils.Avatar $v.SigningUser 28 "tw-mr-2"}} + {{$v.SigningUser.GetDisplayName}} + {{else}} + {{svg "gitea-lock-cog" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.signed_by"}}: + {{ctx.AvatarUtils.AvatarByEmail $v.SigningEmail "" 28 "tw-mr-2"}} + {{$v.SigningUser.GetDisplayName}} + {{end}} + {{else}} + {{svg "gitea-unlock" 16 "tw-mr-2"}} + {{ctx.Locale.Tr $v.Reason}} + {{end}} +
    + +
    + {{if $v.Verified}} + {{if ne $v.SigningUser.ID 0}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{if $v.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{$v.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{$v.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{svg "octicon-unverified" 16 "tw-mr-2"}} + {{if $v.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{$v.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{$v.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{else if $v.Warning}} + {{svg "octicon-unverified" 16 "tw-mr-2"}} + {{if $v.SigningSSHKey}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{$v.SigningSSHKey.Fingerprint}} + {{else}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{$v.SigningKey.PaddedKeyID}} + {{end}} + {{else}} + {{if $v.SigningKey}} + {{if ne $v.SigningKey.KeyID ""}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.gpg_key_id"}}: + {{$v.SigningKey.PaddedKeyID}} + {{end}} + {{end}} + {{if $v.SigningSSHKey}} + {{if ne $v.SigningSSHKey.Fingerprint ""}} + {{svg "octicon-verified" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}: + {{$v.SigningSSHKey.Fingerprint}} + {{end}} + {{end}} + {{end}} +
    +
    +{{end}} diff --git a/templates/repo/unicode_escape_prompt.tmpl b/templates/repo/unicode_escape_prompt.tmpl new file mode 100644 index 0000000..8bceafa --- /dev/null +++ b/templates/repo/unicode_escape_prompt.tmpl @@ -0,0 +1,22 @@ +{{if .EscapeStatus}} + {{if .EscapeStatus.HasInvisible}} +
    + +
    + {{ctx.Locale.Tr "repo.invisible_runes_header"}} +
    +

    {{ctx.Locale.Tr "repo.invisible_runes_description"}}

    + {{if .EscapeStatus.HasAmbiguous}} +

    {{ctx.Locale.Tr "repo.ambiguous_runes_description"}}

    + {{end}} +
    + {{else if .EscapeStatus.HasAmbiguous}} +
    + +
    + {{ctx.Locale.Tr "repo.ambiguous_runes_header"}} +
    +

    {{ctx.Locale.Tr "repo.ambiguous_runes_description"}}

    +
    + {{end}} +{{end}} diff --git a/templates/repo/upload.tmpl b/templates/repo/upload.tmpl new file mode 100644 index 0000000..eef5199 --- /dev/null +++ b/templates/repo/upload.tmpl @@ -0,0 +1,15 @@ +
    +
    +
    diff --git a/templates/repo/user_cards.tmpl b/templates/repo/user_cards.tmpl new file mode 100644 index 0000000..88178db --- /dev/null +++ b/templates/repo/user_cards.tmpl @@ -0,0 +1,32 @@ +
    + {{if .CardsTitle}} +

    + {{.CardsTitle}} +

    + {{end}} +
      + {{range .Cards}} +
    • + + {{ctx.AvatarUtils.Avatar .}} + +
      +

      + {{.DisplayName}} +

      +
      + {{if .Website}} + {{svg "octicon-link"}} {{.Website}} + {{else if .Location}} + {{svg "octicon-location"}} {{.Location}} + {{else}} + {{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix)}} + {{end}} +
      +
      +
    • + {{end}} +
    + + {{template "base/paginate" .}} +
    diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl new file mode 100644 index 0000000..d127c2e --- /dev/null +++ b/templates/repo/view_file.tmpl @@ -0,0 +1,158 @@ +
    + {{- if .FileError}} +
    +
    {{.FileError}}
    +
    + {{end}} + {{- if .FileWarning}} +
    +
    {{.FileWarning}}
    +
    + {{end}} + + {{if not .ReadmeInList}} +
    +
    + {{template "repo/latest_commit" .}} +
    + {{if .LatestCommit}} + {{if .LatestCommit.Committer}} +
    + {{TimeSince .LatestCommit.Committer.When ctx.Locale}} +
    + {{end}} + {{end}} +
    + {{end}} + +

    +
    + {{if .ReadmeInList}} + {{svg "octicon-book" 16 "tw-mr-2"}} + {{.FileName}} + {{else}} + {{template "repo/file_info" .}} + {{end}} +
    +
    + {{if .HasSourceRenderedToggle}} + + {{end}} + {{if not .ReadmeInList}} +
    + {{if .SymlinkURL}} + {{ctx.Locale.Tr "repo.file_follow"}} + {{end}} + {{ctx.Locale.Tr "repo.file_raw"}} + {{if not .IsViewCommit}} + {{ctx.Locale.Tr "repo.file_permalink"}} + {{end}} + {{if .IsRepresentableAsText}} + {{ctx.Locale.Tr "repo.blame"}} + {{end}} + {{ctx.Locale.Tr "repo.file_history"}} + {{if .EscapeStatus.Escaped}} + + + {{end}} +
    + {{svg "octicon-download"}} + {{svg "octicon-copy" 14}} + {{if .EnableFeed}} + {{if .IsViewBranch}} + + {{svg "octicon-rss" 14}} + + {{else}} + + {{svg "octicon-rss" 14}} + + {{end}} + {{end}} + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + {{svg "octicon-pencil"}} + {{else}} + {{svg "octicon-pencil"}} + {{end}} + {{if .CanDeleteFile}} + {{svg "octicon-trash"}} + {{else}} + {{svg "octicon-trash"}} + {{end}} + {{end}} + {{else if .EscapeStatus.Escaped}} + + + {{end}} + {{if and .ReadmeInList .CanEditReadmeFile}} + {{svg "octicon-pencil"}} + {{end}} +
    +

    +
    + {{if not (or .IsMarkup .IsRenderedHTML)}} + {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} + {{end}} +
    + {{if .IsMarkup}} + {{if .FileContent}}{{.FileContent}}{{end}} + {{else if .IsPlainText}} +
    {{if .FileContent}}{{.FileContent}}{{end}}
    + {{else if not .IsTextSource}} +
    + {{if .IsImageFile}} + + {{else if .IsVideoFile}} + + {{else if .IsAudioFile}} + + {{else if .IsPDFFile}} +
    + {{else}} + {{ctx.Locale.Tr "repo.file_view_raw"}} + {{end}} +
    + {{else if .FileSize}} + {{if .IsFileTooLarge}} + + + + + + +
    {{ctx.Locale.Tr "repo.file_too_large"}}
    + {{else}} + + + {{range $idx, $code := .FileContent}} + {{$line := Eval $idx "+" 1}} + + + {{if $.EscapeStatus.Escaped}} + + {{end}} + + + {{end}} + +
    {{if (index $.LineEscapeStatus $idx).Escaped}}{{end}}{{$code}}
    + + {{end}} + {{end}} +
    +
    +
    diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl new file mode 100644 index 0000000..b750e91 --- /dev/null +++ b/templates/repo/view_list.tmpl @@ -0,0 +1,72 @@ + + + + + + + + + {{if .HasParentPath}} + + + + {{end}} + {{range $item := .Files}} + {{$entry := $item.Entry}} + {{$commit := $item.Commit}} + {{$subModuleFile := $item.SubModuleFile}} + + + + + + {{end}} + +
    +
    +
    + {{template "repo/latest_commit" .}} +
    +
    +
    {{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When ctx.Locale}}{{end}}{{end}}
    {{svg "octicon-reply" 16 "tw-mr-2"}}..
    + + {{if $entry.IsSubModule}} + {{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}} {{/* FIXME: the usage of AppUrl seems incorrect, it would be fixed in the future, use AppSubUrl instead */}} + {{$icon := (svg "octicon-file-submodule" 16 "tw-mr-2")}} + {{if $refURL}} + {{$icon}}{{$entry.Name}}@{{ShortSha $subModuleFile.RefID}} + {{else}} + {{$icon}}{{$entry.Name}}@{{ShortSha $subModuleFile.RefID}} + {{end}} + {{else}} + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + + {{$subJumpablePathFields := StringUtils.Split $subJumpablePathName "/"}} + {{$subJumpablePathFieldLast := (Eval (len $subJumpablePathFields) "-" 1)}} + {{svg "octicon-file-directory-fill" 16 "tw-mr-2" -}} + {{if eq $subJumpablePathFieldLast 0 -}} + {{$subJumpablePathName}} + {{else -}} + {{$subJumpablePathPrefixes := slice $subJumpablePathFields 0 $subJumpablePathFieldLast -}} + {{StringUtils.Join $subJumpablePathPrefixes "/"}}/{{index $subJumpablePathFields $subJumpablePathFieldLast}} + {{end}} + + {{else}} + {{svg (printf "octicon-%s" (EntryIcon $entry)) 16 "tw-mr-2"}}{{$entry.Name}} + {{end}} + {{end}} + + + + {{if $commit}} + {{$commitLink := printf "%s/commit/%s" $.RepoLink (PathEscape $commit.ID.String)}} + {{RenderCommitMessageLinkSubject $.Context $commit.Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{else}} +
    + {{end}} +
    +
    {{if $commit}}{{TimeSince $commit.Committer.When ctx.Locale}}{{end}}
    +{{if and .ReadmeExist (or .IsMarkup .IsPlainText)}} + {{template "repo/view_file" .}} +{{end}} diff --git a/templates/repo/watch_unwatch.tmpl b/templates/repo/watch_unwatch.tmpl new file mode 100644 index 0000000..3fea509 --- /dev/null +++ b/templates/repo/watch_unwatch.tmpl @@ -0,0 +1,14 @@ +
    +
    + + + {{CountFmt .Repository.NumWatches}} + +
    +
    diff --git a/templates/repo/watchers.tmpl b/templates/repo/watchers.tmpl new file mode 100644 index 0000000..1828544 --- /dev/null +++ b/templates/repo/watchers.tmpl @@ -0,0 +1,8 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "repo/user_cards" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl new file mode 100644 index 0000000..81433db --- /dev/null +++ b/templates/repo/wiki/new.tmpl @@ -0,0 +1,48 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    + {{template "base/alert" .}} +
    + {{ctx.Locale.Tr "repo.wiki.new_page"}} + {{if .PageIsWikiEdit}} + {{ctx.Locale.Tr "repo.wiki.new_page_button"}} + {{end}} +
    +
    + {{.CsrfTokenHtml}} +
    + +
    +
    + {{ctx.Locale.Tr "repo.wiki.page_name_desc"}} +
    + + {{$content := .content}} + {{if not .PageIsWikiEdit}} + {{$content = ctx.Locale.Tr "repo.wiki.welcome"}} + {{end}} + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaPlaceholder" (ctx.Locale.Tr "repo.wiki.page_content") + "TextareaAriaLabel" (ctx.Locale.Tr "repo.wiki.page_content") + "TextareaContent" $content + "EasyMDE" true + )}} + +
    + +
    +
    +
    + + {{ctx.Locale.Tr "repo.wiki.cancel"}} +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/wiki/pages.tmpl b/templates/repo/wiki/pages.tmpl new file mode 100644 index 0000000..42c36a9 --- /dev/null +++ b/templates/repo/wiki/pages.tmpl @@ -0,0 +1,30 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +

    + {{ctx.Locale.Tr "repo.wiki.pages"}} + + {{if and .CanWriteWiki (not .Repository.IsMirror)}} + {{ctx.Locale.Tr "repo.wiki.new_page_button"}} + {{end}} + +

    + + + {{range .Pages}} + + + {{$timeSince := TimeSinceUnix .UpdatedUnix ctx.Locale}} + + + {{end}} + +
    + {{svg "octicon-file"}} + {{.Name}} + {{svg "octicon-chevron-right"}} + {{ctx.Locale.Tr "repo.wiki.last_updated" $timeSince}}
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl new file mode 100644 index 0000000..7fca703 --- /dev/null +++ b/templates/repo/wiki/revision.tmpl @@ -0,0 +1,40 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{$title := .title}} +
    +
    +
    +
    + {{.revision}} {{svg "octicon-home"}} + {{$title}} +
    + {{$timeSince := TimeSince .Author.When ctx.Locale}} + {{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}} +
    +
    +
    +
    +
    + {{template "repo/clone_buttons" .}} + {{template "repo/clone_script" .}} +
    +
    +
    +

    {{ctx.Locale.Tr "repo.wiki.wiki_page_revisions"}}

    +
    +

    +
    +
    + {{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}} +
    +
    +

    + {{if and .Commits (gt .CommitCount 0)}} + {{template "repo/commits_list" .}} + {{end}} + {{template "base/paginate" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/wiki/search.tmpl b/templates/repo/wiki/search.tmpl new file mode 100644 index 0000000..7f4cb9c --- /dev/null +++ b/templates/repo/wiki/search.tmpl @@ -0,0 +1,12 @@ +{{if .Results}} + {{range .Results}} + + {{.Title}} + {{range .LineCodes}} +

    {{.}}

    + {{end}} +
    + {{end}} +{{else}} +
    {{ctx.Locale.Tr "repo.wiki.no_search_results"}}
    +{{end}} diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl new file mode 100644 index 0000000..1b3c3d5 --- /dev/null +++ b/templates/repo/wiki/start.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} +
    +
    + {{svg "octicon-book" 48}} +

    {{ctx.Locale.Tr "repo.wiki.welcome"}}

    +

    {{ctx.Locale.Tr "repo.wiki.welcome_desc"}}

    + {{if and .CanWriteWiki (not .Repository.IsMirror)}} + {{ctx.Locale.Tr "repo.wiki.create_first_page"}} + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl new file mode 100644 index 0000000..40af307 --- /dev/null +++ b/templates/repo/wiki/view.tmpl @@ -0,0 +1,124 @@ +{{template "base/head" .}} +
    + {{template "repo/header" .}} + {{$title := .title}} +
    +
    +
    + +
    +
    + {{template "repo/clone_buttons" .}} + {{template "repo/clone_script" .}} +
    + +
    +
    +
    +
    + {{.CommitCount}} {{svg "octicon-history"}} + {{$title}} +
    + {{$timeSince := TimeSince .Author.When ctx.Locale}} + {{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}} +
    +
    + +
    +
    + {{if .FormatWarning}} +
    +

    {{.FormatWarning}}

    +
    + {{end}} + +
    + {{if .sidebarTocContent}} + + {{end}} + +
    + {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} + {{.content | SafeHTML}} +
    + + {{if .sidebarPresent}} + + {{end}} + +
    + + {{if .footerPresent}} + + {{end}} +
    +
    +
    + + + +{{template "base/footer" .}} diff --git a/templates/shared/actions/runner_edit.tmpl b/templates/shared/actions/runner_edit.tmpl new file mode 100644 index 0000000..d60f10b --- /dev/null +++ b/templates/shared/actions/runner_edit.tmpl @@ -0,0 +1,96 @@ +
    +

    + {{ctx.Locale.Tr "actions.runners.runner_title"}} {{.Runner.ID}} {{.Runner.Name}} +

    +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    +
    + + {{.Runner.StatusLocaleName ctx.Locale}} +
    +
    + + {{if .Runner.LastOnline}}{{TimeSinceUnix .Runner.LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} +
    +
    + + + {{range .Runner.AgentLabels}} + {{.}} + {{end}} + +
    +
    + + {{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}} +
    +
    + +
    + +
    + + +
    + +
    + +
    + + +
    +
    +
    + +

    + {{ctx.Locale.Tr "actions.runners.task_list"}} +

    +
    + + + + + + + + + + + + {{range .Tasks}} + + + + + + + + {{end}} + {{if not .Tasks}} + + + + {{end}} + +
    {{ctx.Locale.Tr "actions.runners.task_list.run"}}{{ctx.Locale.Tr "actions.runners.task_list.status"}}{{ctx.Locale.Tr "actions.runners.task_list.repository"}}{{ctx.Locale.Tr "actions.runners.task_list.commit"}}{{ctx.Locale.Tr "actions.runners.task_list.done_at"}}
    {{.ID}}{{.Status.LocaleString ctx.Locale}}{{.GetRepoName}} + {{ShortSha .CommitSHA}} + {{if .IsStopped}} + {{TimeSinceUnix .Stopped ctx.Locale}} + {{else}}-{{end}}
    {{ctx.Locale.Tr "actions.runners.task_list.no_tasks"}}
    + {{template "base/paginate" .}} +
    + +
    diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl new file mode 100644 index 0000000..abbf220 --- /dev/null +++ b/templates/shared/actions/runner_list.tmpl @@ -0,0 +1,95 @@ +
    + +

    + {{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) +
    + + +
    +

    +
    +
    + {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.runner_kind")}} +
    +
    +
    + + + + + + + + + + + + + + + {{if .Runners}} + {{range .Runners}} + + + + + + + + + + + {{end}} + {{else}} + + + + {{end}} + +
    + {{ctx.Locale.Tr "actions.runners.status"}} + {{SortArrow "online" "offline" .SortType false}} + + {{ctx.Locale.Tr "actions.runners.id"}} + {{SortArrow "oldest" "newest" .SortType false}} + + {{ctx.Locale.Tr "actions.runners.name"}} + {{SortArrow "alphabetically" "reversealphabetically" .SortType false}} + {{ctx.Locale.Tr "actions.runners.version"}}{{ctx.Locale.Tr "actions.runners.owner_type"}}{{ctx.Locale.Tr "actions.runners.labels"}}{{ctx.Locale.Tr "actions.runners.last_online"}}{{ctx.Locale.Tr "edit"}}
    + {{.StatusLocaleName ctx.Locale}} + {{.ID}}

    {{.Name}}

    {{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}{{.BelongsToOwnerType.LocaleString ctx.Locale}} + {{range .AgentLabels}}{{.}}{{end}} + {{if .LastOnline}}{{TimeSinceUnix .LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} + {{if .Editable $.RunnerOwnerID $.RunnerRepoID}} + {{svg "octicon-pencil"}} + {{end}} +
    {{ctx.Locale.Tr "actions.runners.none"}}
    +
    + + {{template "base/paginate" .}} + +
    diff --git a/templates/shared/blocked_users_list.tmpl b/templates/shared/blocked_users_list.tmpl new file mode 100644 index 0000000..409b7f4 --- /dev/null +++ b/templates/shared/blocked_users_list.tmpl @@ -0,0 +1,28 @@ +
    + {{range .BlockedUsers}} +
    +
    + {{ctx.AvatarUtils.Avatar . 48}} +
    +
    +
    + {{template "shared/user/name" .}} +
    +
    + {{ctx.Locale.Tr "settings.blocked_since" (DateTime "short" .CreatedUnix)}} +
    +
    +
    +
    + {{$.CsrfTokenHtml}} + + +
    +
    +
    + {{else}} +
    + {{ctx.Locale.Tr "settings.blocked_users_none"}} +
    + {{end}} +
    diff --git a/templates/shared/combomarkdowneditor.tmpl b/templates/shared/combomarkdowneditor.tmpl new file mode 100644 index 0000000..48f72b6 --- /dev/null +++ b/templates/shared/combomarkdowneditor.tmpl @@ -0,0 +1,64 @@ +{{/* +Template Attributes: +* ContainerId: id attribute for the container element +* ContainerClasses: additional classes for the container element +* MarkdownPreviewUrl: preview url for the preview tab +* MarkdownPreviewContext: preview context for the preview tab +* TextareaName: name attribute for the textarea +* TextareaContent: content for the textarea +* TextareaPlaceholder: placeholder attribute for the textarea +* TextareaAriaLabel: aria-label attribute for the textarea +* DropzoneParentContainer: container for file upload (leave it empty if no upload) +* DisableAutosize: whether to disable automatic height resizing +* EasyMDE: whether to display button for switching to legacy editor +*/}} +
    + {{if .MarkdownPreviewUrl}} + + {{end}} +
    + +
    + {{svg "octicon-heading"}} + {{svg "octicon-bold"}} + {{svg "octicon-italic"}} +
    +
    + {{svg "octicon-quote"}} + {{svg "octicon-code"}} + {{svg "octicon-link"}} +
    +
    + {{svg "octicon-list-unordered"}} + {{svg "octicon-list-ordered"}} + {{svg "octicon-tasklist"}} + + +
    +
    + {{svg "octicon-mention"}} + {{svg "octicon-cross-reference"}} +
    +
    + + {{if .EasyMDE}} + + {{end}} +
    +
    + + + + +
    +
    + {{ctx.Locale.Tr "loading"}} +
    +
    diff --git a/templates/shared/issueicon.tmpl b/templates/shared/issueicon.tmpl new file mode 100644 index 0000000..d7c4414 --- /dev/null +++ b/templates/shared/issueicon.tmpl @@ -0,0 +1,25 @@ +{{if .IsPull}} + {{if not .PullRequest}} + No PullRequest + {{else}} + {{if .IsClosed}} + {{if .PullRequest.HasMerged}} + {{svg "octicon-git-merge" 16 "text purple"}} + {{else}} + {{svg "octicon-git-pull-request-closed" 16 "text red"}} + {{end}} + {{else}} + {{if .PullRequest.IsWorkInProgress ctx}} + {{svg "octicon-git-pull-request-draft" 16 "text grey"}} + {{else}} + {{svg "octicon-git-pull-request" 16 "text green"}} + {{end}} + {{end}} + {{end}} +{{else}} + {{if .IsClosed}} + {{svg "octicon-issue-closed" 16 "text red"}} + {{else}} + {{svg "octicon-issue-opened" 16 "text green"}} + {{end}} +{{end}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl new file mode 100644 index 0000000..f96c182 --- /dev/null +++ b/templates/shared/issuelist.tmpl @@ -0,0 +1,163 @@ +
    + {{$approvalCounts := .ApprovalCounts}} + {{range .Issues}} +
    + +
    + {{if $.CanWriteIssuesOrPulls}} + + {{end}} + {{template "shared/issueicon" .}} +
    + +
    +
    +
    + {{RenderEmoji $.Context .Title | RenderCodeBlock}} + {{if .IsPull}} + {{if (index $.CommitStatuses .PullRequest.ID)}} + {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} + {{end}} + {{end}} + + {{range .Labels}} + {{RenderLabel $.Context ctx.Locale .}} + {{end}} + +
    + {{if or .TotalTrackedTime .Assignees .NumComments}} +
    + {{if .TotalTrackedTime}} +
    + {{svg "octicon-clock" 16}} + {{.TotalTrackedTime | Sec2Time}} +
    + {{end}} + {{if .Assignees}} +
    + {{range .Assignees}} + + {{ctx.AvatarUtils.Avatar . 20}} + + {{end}} +
    + {{end}} + {{if .NumComments}} + + {{end}} +
    + {{end}} +
    +
    + + {{if eq $.listType "dashboard"}} + {{.Repo.FullName}}#{{.Index}} + {{else}} + #{{.Index}} + {{end}} + + {{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}} + {{if .OriginalAuthor}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{else if gt .Poster.ID 0}} + {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{else}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{end}} + {{if .IsPull}} + + {{end}} + {{if and .Milestone (ne $.listType "milestone")}} + + {{svg "octicon-milestone" 14}} + {{.Milestone.Name}} + + {{end}} + {{if .Project}} + + {{svg .Project.IconName 14}} + {{.Project.Title}} + + {{end}} + {{if .Ref}} + + {{svg "octicon-git-branch" 14}} + {{index $.IssueRefEndNames .ID}} + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{svg "octicon-checklist" 14}}{{$tasksDone}} / {{$tasks}} + + + {{end}} + {{if ne .DeadlineUnix 0}} + + + {{svg "octicon-calendar" 14}} + {{DateTime "short" (.DeadlineUnix.FormatDate)}} + + + {{end}} + {{if .IsPull}} + {{$approveOfficial := call $approvalCounts .ID "approve"}} + {{$rejectOfficial := call $approvalCounts .ID "reject"}} + {{$waitingOfficial := call $approvalCounts .ID "waiting"}} + {{if gt $approveOfficial 0}} + + {{svg "octicon-check" 14}} + {{ctx.Locale.TrN $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n" $approveOfficial}} + + {{end}} + {{if gt $rejectOfficial 0}} + + {{svg "octicon-diff" 14}} + {{ctx.Locale.TrN $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n" $rejectOfficial}} + + {{end}} + {{if gt $waitingOfficial 0}} + + {{svg "octicon-eye" 14}} + {{ctx.Locale.TrN $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n" $waitingOfficial}} + + {{end}} + {{if and (not .PullRequest.HasMerged) .PullRequest.ConflictedFiles}} + + {{svg "octicon-x" 14}} + {{ctx.Locale.TrN (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n" (len .PullRequest.ConflictedFiles)}} + + {{end}} + {{end}} +
    +
    +
    + {{end}} + {{if .IssueIndexerUnavailable}} +
    +

    {{ctx.Locale.Tr "search.keyword_search_unavailable"}}

    +
    + {{end}} +
    +{{template "base/paginate" .}} diff --git a/templates/shared/label_filter.tmpl b/templates/shared/label_filter.tmpl new file mode 100644 index 0000000..2269271 --- /dev/null +++ b/templates/shared/label_filter.tmpl @@ -0,0 +1,50 @@ + + diff --git a/templates/shared/repo_search.tmpl b/templates/shared/repo_search.tmpl new file mode 100644 index 0000000..d08d601 --- /dev/null +++ b/templates/shared/repo_search.tmpl @@ -0,0 +1,69 @@ + +{{if and .PageIsExploreRepositories .OnlyShowRelevant}} +
    + {{ctx.Locale.Tr "explore.relevant_repositories" (printf "?only_show_relevant=0&sort=%s&q=%s&language=%s" $.SortType (QueryEscape $.Keyword) (QueryEscape $.Language))}} +
    +{{end}} +
    diff --git a/templates/shared/search/button.tmpl b/templates/shared/search/button.tmpl new file mode 100644 index 0000000..7bb1662 --- /dev/null +++ b/templates/shared/search/button.tmpl @@ -0,0 +1,3 @@ +{{/* Disable (optional) - if search button has to be disabled */}} +{{/* Tooltip (optional) - a tooltip to be displayed on hover */}} + diff --git a/templates/shared/search/code/results.tmpl b/templates/shared/search/code/results.tmpl new file mode 100644 index 0000000..fe37557 --- /dev/null +++ b/templates/shared/search/code/results.tmpl @@ -0,0 +1,44 @@ +
    + {{range $term := .SearchResultLanguages}} + + + {{$term.Language}} +
    {{$term.Count}}
    +
    + {{end}} +
    + +{{template "base/paginate" .}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl new file mode 100644 index 0000000..6a52bb9 --- /dev/null +++ b/templates/shared/search/code/search.tmpl @@ -0,0 +1,28 @@ +
    + {{template "shared/search/combo_fuzzy" + dict + "Value" .Keyword + "Disabled" .CodeIndexerUnavailable + "IsFuzzy" .IsFuzzy + "Placeholder" (ctx.Locale.Tr "search.code_kind") + "CodeIndexerDisabled" $.CodeIndexerDisabled}} +
    +
    +
    + {{if .CodeIndexerUnavailable}} +
    +

    {{ctx.Locale.Tr "search.code_search_unavailable"}}

    +
    + {{else}} + {{if .CodeIndexerDisabled}} +
    +

    {{ctx.Locale.Tr "search.code_search_by_git_grep"}}

    +
    + {{end}} + {{if .SearchResults}} + {{template "shared/search/code/results" .}} + {{else if .Keyword}} +
    {{ctx.Locale.Tr "search.no_results"}}
    + {{end}} + {{end}} +
    diff --git a/templates/shared/search/combo.tmpl b/templates/shared/search/combo.tmpl new file mode 100644 index 0000000..788db95 --- /dev/null +++ b/templates/shared/search/combo.tmpl @@ -0,0 +1,8 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field/button has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} +{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}} +
    + {{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}} + {{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}} +
    diff --git a/templates/shared/search/combo_fuzzy.tmpl b/templates/shared/search/combo_fuzzy.tmpl new file mode 100644 index 0000000..38189b0 --- /dev/null +++ b/templates/shared/search/combo_fuzzy.tmpl @@ -0,0 +1,15 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field/button has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} +{{/* IsFuzzy - state of the fuzzy/union search toggle */}} +{{/* CodeIndexerDisabled (optional) - if the performed search is done using git-grep */}} +{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}} +
    + {{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}} + {{template "shared/search/fuzzy" + dict + "Disabled" .Disabled + "IsFuzzy" .IsFuzzy + "CodeIndexerDisabled" .CodeIndexerDisabled}} + {{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}} +
    diff --git a/templates/shared/search/fuzzy.tmpl b/templates/shared/search/fuzzy.tmpl new file mode 100644 index 0000000..25cfc57 --- /dev/null +++ b/templates/shared/search/fuzzy.tmpl @@ -0,0 +1,21 @@ +{{/* Disabled (optional) - if dropdown has to be disabled */}} +{{/* IsFuzzy - state of the fuzzy search toggle */}} + diff --git a/templates/shared/search/input.tmpl b/templates/shared/search/input.tmpl new file mode 100644 index 0000000..195cefc --- /dev/null +++ b/templates/shared/search/input.tmpl @@ -0,0 +1,4 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} + diff --git a/templates/shared/searchbottom.tmpl b/templates/shared/searchbottom.tmpl new file mode 100644 index 0000000..bee0397 --- /dev/null +++ b/templates/shared/searchbottom.tmpl @@ -0,0 +1,14 @@ +{{if or .result.Language (not .result.UpdatedUnix.IsZero)}} +
    +
    + {{if .result.Language}} + {{.result.Language}} + {{end}} +
    +
    + {{if not .result.UpdatedUnix.IsZero}} + {{ctx.Locale.Tr "explore.code_last_indexed_at" (TimeSinceUnix .result.UpdatedUnix ctx.Locale)}} + {{end}} +
    +
    +{{end}} diff --git a/templates/shared/searchfile.tmpl b/templates/shared/searchfile.tmpl new file mode 100644 index 0000000..a051742 --- /dev/null +++ b/templates/shared/searchfile.tmpl @@ -0,0 +1,25 @@ +
    +
    +
      + {{/* if the expected line number does not match + the actual line number end the ordered list + and begin a new one */}} + {{$expNum := 0}} + {{range .SearchResult.Lines}} + {{if and (gt $expNum 0) (ne .Num $expNum)}} +
    +
      + {{end}} +
    1. + +
      {{.FormattedContent}}
      +
    2. + {{$expNum = Eval .Num "+" 1}} + {{end}} +
    +
    +
    diff --git a/templates/shared/secrets/add_list.tmpl b/templates/shared/secrets/add_list.tmpl new file mode 100644 index 0000000..ea59459 --- /dev/null +++ b/templates/shared/secrets/add_list.tmpl @@ -0,0 +1,81 @@ +

    + {{ctx.Locale.Tr "secrets.management"}} +
    + +
    +

    +
    + {{if .Secrets}} +
    + {{range .Secrets}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    + {{.Name}} +
    +
    + ****** +
    +
    +
    + + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} + + +
    +
    + {{end}} +
    + {{else}} + {{ctx.Locale.Tr "secrets.none"}} + {{end}} +
    + +{{/* Add secret dialog */}} + diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl new file mode 100644 index 0000000..d57a635 --- /dev/null +++ b/templates/shared/user/authorlink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}}{{if .IsBot}}bot{{end}} diff --git a/templates/shared/user/avatarlink.tmpl b/templates/shared/user/avatarlink.tmpl new file mode 100644 index 0000000..5e3ed7a --- /dev/null +++ b/templates/shared/user/avatarlink.tmpl @@ -0,0 +1 @@ +{{ctx.AvatarUtils.Avatar .user}} diff --git a/templates/shared/user/blocked_users.tmpl b/templates/shared/user/blocked_users.tmpl new file mode 100644 index 0000000..e83a039 --- /dev/null +++ b/templates/shared/user/blocked_users.tmpl @@ -0,0 +1,83 @@ +

    + {{ctx.Locale.Tr "user.block.title"}} +

    +
    +

    {{ctx.Locale.Tr "user.block.info_1"}}

    +
      +
    • {{ctx.Locale.Tr "user.block.info_2"}}
    • +
    • {{ctx.Locale.Tr "user.block.info_3"}}
    • +
    • {{ctx.Locale.Tr "user.block.info_4"}}
    • +
    • {{ctx.Locale.Tr "user.block.info_5"}}
    • +
    • {{ctx.Locale.Tr "user.block.info_6"}}
    • +
    • {{ctx.Locale.Tr "user.block.info_7"}}
    • +
    +
    +
    +
    + {{.CsrfTokenHtml}} + + +
    + + +

    {{ctx.Locale.Tr "user.block.note.info"}}

    +
    +
    +
    +

    + {{ctx.Locale.Tr "user.block.list"}} +

    +
    +
    + {{range .UserBlocks}} +
    +
    + {{ctx.AvatarUtils.Avatar .Blockee}} +
    +
    + + {{if .Note}} +
    + {{ctx.Locale.Tr "user.block.note"}}: {{.Note}} +
    + {{end}} +
    +
    + +
    + {{$.CsrfTokenHtml}} + + + +
    +
    +
    + {{else}} +
    {{ctx.Locale.Tr "user.block.list.none"}}
    + {{end}} +
    +
    + diff --git a/templates/shared/user/name.tmpl b/templates/shared/user/name.tmpl new file mode 100644 index 0000000..896349f --- /dev/null +++ b/templates/shared/user/name.tmpl @@ -0,0 +1 @@ +{{.Name}}{{if .FullName}} ({{.FullName}}){{end}} diff --git a/templates/shared/user/namelink.tmpl b/templates/shared/user/namelink.tmpl new file mode 100644 index 0000000..a122f4f --- /dev/null +++ b/templates/shared/user/namelink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}} diff --git a/templates/shared/user/org_profile_avatar.tmpl b/templates/shared/user/org_profile_avatar.tmpl new file mode 100644 index 0000000..c0abcab --- /dev/null +++ b/templates/shared/user/org_profile_avatar.tmpl @@ -0,0 +1,16 @@ +{{with .ContextUser}} +
    +
    +
    +
    + {{ctx.AvatarUtils.Avatar . 100}} + {{.DisplayName}} + + {{if .Visibility.IsLimited}}
    {{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}
    {{end}} + {{if .Visibility.IsPrivate}}
    {{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}
    {{end}} +
    +
    +
    +
    +
    +{{end}} diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl new file mode 100644 index 0000000..d3033b4 --- /dev/null +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -0,0 +1,129 @@ +{{if .IsHTMX}} + {{template "base/alert" .}} +{{end}} +
    + +
    + {{if .ContextUser.FullName}}{{.ContextUser.FullName}}{{end}} + {{.ContextUser.Name}}{{if .ContextUser.Pronouns}} · {{.ContextUser.Pronouns}}{{end}} {{if .IsAdmin}} + + {{svg "octicon-gear" 18}} + + {{end}} + +
    +
    +
      + {{if .ContextUser.Location}} +
    • + {{svg "octicon-location"}} + {{.ContextUser.Location}} + {{if .ContextUserLocationMapURL}} + + {{svg "octicon-link-external"}} + + {{end}} +
    • + {{end}} + {{if .ShowUserEmail}} +
    • + {{svg "octicon-mail"}} + {{.ContextUser.Email}} + {{if (eq .SignedUserID .ContextUser.ID)}} + + + {{svg "octicon-unlock"}} + + + {{end}} +
    • + {{end}} + {{if .ContextUser.Website}} +
    • + {{svg "octicon-link"}} + {{.ContextUser.Website}} +
    • + {{end}} + {{if $.RenderedDescription}} +
    • +
      {{$.RenderedDescription}}
      +
    • + {{end}} + {{range .OpenIDs}} + {{if .Show}} +
    • + {{svg "fontawesome-openid"}} + {{.URI}} +
    • + {{end}} + {{end}} +
    • {{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix)}}
    • + {{if and .Orgs .HasOrgsVisible}} +
    • +
        + {{range .Orgs}} + {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID ctx $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}} +
      • + + {{ctx.AvatarUtils.Avatar .}} + +
      • + {{end}} + {{end}} +
      +
    • + {{end}} + {{if .Badges}} +
    • +
        + {{range .Badges}} +
      • + {{.Description}} +
      • + {{end}} +
      +
    • + {{end}} + {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} + +
    • + {{if $.IsBlocked}} + + {{else}} + + {{end}} +
    • + {{end}} +
    +
    +
    diff --git a/templates/shared/variables/variable_list.tmpl b/templates/shared/variables/variable_list.tmpl new file mode 100644 index 0000000..06c71c0 --- /dev/null +++ b/templates/shared/variables/variable_list.tmpl @@ -0,0 +1,92 @@ +

    + {{ctx.Locale.Tr "actions.variables.management"}} +
    + +
    +

    +
    + {{if .Variables}} +
    + {{range .Variables}} +
    +
    + {{svg "octicon-pencil" 32}} +
    +
    +
    + {{.Name}} +
    +
    + {{.Data}} +
    +
    +
    + + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} + + + +
    +
    + {{end}} +
    + {{else}} + {{ctx.Locale.Tr "actions.variables.none"}} + {{end}} +
    + +{{/** Edit variable dialog */}} + + diff --git a/templates/shared/webhook/icon.tmpl b/templates/shared/webhook/icon.tmpl new file mode 100644 index 0000000..3c84f11 --- /dev/null +++ b/templates/shared/webhook/icon.tmpl @@ -0,0 +1,29 @@ +{{$size := 26}} +{{if .Size}} + {{$size = .Size}} +{{end}} +{{if eq .HookType "forgejo"}} + +{{else if eq .HookType "gitea"}} + {{svg "gitea-gitea" $size "img"}} +{{else if eq .HookType "gogs"}} + +{{else if eq .HookType "slack"}} + +{{else if eq .HookType "discord"}} + +{{else if eq .HookType "dingtalk"}} + +{{else if eq .HookType "telegram"}} + +{{else if eq .HookType "msteams"}} + +{{else if eq .HookType "feishu"}} + +{{else if eq .HookType "matrix"}} + {{svg "gitea-matrix" $size "img"}} +{{else if eq .HookType "wechatwork"}} + +{{else if eq .HookType "packagist"}} + +{{end}} diff --git a/templates/status/404.tmpl b/templates/status/404.tmpl new file mode 100644 index 0000000..f9a6e18 --- /dev/null +++ b/templates/status/404.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .}} +
    + {{if .IsRepo}}{{template "repo/header" .}}{{end}} +
    +

    404

    +

    {{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{ctx.Locale.Tr "error404"}}{{end}}

    + {{if .NotFoundGoBackURL}}{{ctx.Locale.Tr "go_back"}}{{end}} + +
    +
    + {{if .ShowFooterVersion}}

    {{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}

    {{end}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/status/413.tmpl b/templates/status/413.tmpl new file mode 100644 index 0000000..75cb3d0 --- /dev/null +++ b/templates/status/413.tmpl @@ -0,0 +1,11 @@ +{{template "base/head" .}} +
    + {{if .IsRepo}}{{template "repo/header" .}}{{end}} +
    +

    413

    +

    {{ctx.Locale.Tr "error413"}}

    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl new file mode 100644 index 0000000..59f7c25 --- /dev/null +++ b/templates/status/500.tmpl @@ -0,0 +1,71 @@ +{{/* This page should only depend the minimal template functions/variables, to avoid triggering new panics. +* base template functions: AppName, AssetUrlPrefix, AssetVersion, AppSubUrl, ThemeName +* ctx.Locale +* .Flash +* .ErrorMsg +* .SignedUser (optional) +*/}} + + + + + {{ctx.Locale.Tr "error.server_internal"}} - {{AppDisplayName}} + + + {{template "base/head_style" .}} + + +
    + +
    +
    +
    + + {{template "base/alert" .}} +
    +
    +

    500

    +

    {{ctx.Locale.Tr "error.server_internal"}}

    +
    +
    +
    + {{if .ErrorMsg}} +

    {{ctx.Locale.Tr "error.occurred"}}:

    +
    {{.ErrorMsg}}
    + {{end}} +
    + {{if or .SignedUser.IsAdmin .ShowFooterVersion}}

    {{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}

    {{end}} + {{if .SignedUser.IsAdmin}}

    {{ctx.Locale.Tr "error.report_message" "https://codeberg.org/forgejo/forgejo/issues"}}

    {{end}} +
    +
    +
    +
    + + {{/* When a sub-template triggers an 500 error, its parent template has been partially rendered, then the 500 page + will be rendered after that partially rendered page, the HTML/JS are totally broken. Use this inline script to try to move it to main viewport. + And this page shouldn't include any other JS file, avoid duplicate JS execution (still due to the partial rendering).*/}} + + + diff --git a/templates/swagger/forgejo-ui.tmpl b/templates/swagger/forgejo-ui.tmpl new file mode 100644 index 0000000..737e245 --- /dev/null +++ b/templates/swagger/forgejo-ui.tmpl @@ -0,0 +1,13 @@ + + + + + Forgejo API + + + + {{svg "octicon-reply"}}{{.locale.Tr "return_to_forgejo"}} +
    + + + diff --git a/templates/swagger/ui.tmpl b/templates/swagger/ui.tmpl new file mode 100644 index 0000000..87b0cfb --- /dev/null +++ b/templates/swagger/ui.tmpl @@ -0,0 +1,12 @@ + + + + Forgejo API + + + + {{svg "octicon-reply"}}{{ctx.Locale.Tr "return_to_forgejo"}} +
    + + + diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl new file mode 100644 index 0000000..c7c4441 --- /dev/null +++ b/templates/swagger/v1_json.tmpl @@ -0,0 +1,28776 @@ +{ + "consumes": [ + "application/json", + "text/plain" + ], + "produces": [ + "application/json", + "text/html" + ], + "schemes": [ + "https", + "http" + ], + "swagger": "2.0", + "info": { + "description": "This documentation describes the Forgejo API.", + "title": "Forgejo API", + "license": { + "name": "This file is distributed under the MIT license for the purpose of interoperability", + "url": "http://opensource.org/licenses/MIT" + }, + "version": "{{AppVer | JSEscape}}" + }, + "basePath": "{{AppSubUrl | JSEscape}}/api/v1", + "paths": { + "/activitypub/actor": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Returns the instance's Actor", + "operationId": "activitypubInstanceActor", + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/actor/inbox": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Send to the inbox", + "operationId": "activitypubInstanceActorInbox", + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/activitypub/repository-id/{repository-id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Returns the Repository actor for a repo", + "operationId": "activitypubRepository", + "parameters": [ + { + "type": "integer", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/repository-id/{repository-id}/inbox": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Send to the inbox", + "operationId": "activitypubRepositoryInbox", + "parameters": [ + { + "type": "integer", + "description": "repository ID of the repo", + "name": "repository-id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/ForgeLike" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/activitypub/user-id/{user-id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Returns the Person actor for a user", + "operationId": "activitypubPerson", + "parameters": [ + { + "type": "integer", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityPub" + } + } + } + }, + "/activitypub/user-id/{user-id}/inbox": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "activitypub" + ], + "summary": "Send to the inbox", + "operationId": "activitypubPersonInbox", + "parameters": [ + { + "type": "integer", + "description": "user ID of the user", + "name": "user-id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/admin/cron": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List cron tasks", + "operationId": "adminCronList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CronList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/cron/{task}": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Run cron task", + "operationId": "adminCronRun", + "parameters": [ + { + "type": "string", + "description": "task to run", + "name": "task", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/emails": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all emails", + "operationId": "adminGetAllEmails", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/emails/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Search all emails", + "operationId": "adminSearchEmails", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List system's webhooks", + "operationId": "adminListHooks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a hook", + "operationId": "adminCreateHook", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/admin/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get a hook", + "operationId": "adminGetHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a hook", + "operationId": "adminDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Update a hook", + "operationId": "adminEditHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/admin/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all organizations", + "operationId": "adminGetAllOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/quota/groups": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List the available quota groups", + "operationId": "adminListQuotaGroups", + "responses": { + "200": { + "$ref": "#/responses/QuotaGroupList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a new quota group", + "operationId": "adminCreateQuotaGroup", + "parameters": [ + { + "description": "Definition of the quota group", + "name": "group", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateQuotaGroupOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/QuotaGroup" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/quota/groups/{quotagroup}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get information about the quota group", + "operationId": "adminGetQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to query", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaGroup" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a quota group", + "operationId": "adminDeleteQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to delete", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/rules/{quotarule}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Adds a rule to a quota group", + "operationId": "adminAddRuleToQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to add a rule to", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the quota rule to add to the group", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Removes a rule from a quota group", + "operationId": "adminRemoveRuleFromQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to remove a rule from", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the quota rule to remove from the group", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/users": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List users in a quota group", + "operationId": "adminListUsersInQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to list members of", + "name": "quotagroup", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/groups/{quotagroup}/users/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Add a user to a quota group", + "operationId": "adminAddUserToQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to add the user to", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add to the quota group", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Remove a user from a quota group", + "operationId": "adminRemoveUserFromQuotaGroup", + "parameters": [ + { + "type": "string", + "description": "quota group to remove a user from", + "name": "quotagroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove from the quota group", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/quota/rules": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List the available quota rules", + "operationId": "adminListQuotaRules", + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfoList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a new quota rule", + "operationId": "adminCreateQuotaRule", + "parameters": [ + { + "description": "Definition of the quota rule", + "name": "rule", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateQuotaRuleOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/quota/rules/{quotarule}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get information about a quota rule", + "operationId": "adminGetQuotaRule", + "parameters": [ + { + "type": "string", + "description": "quota rule to query", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Deletes a quota rule", + "operationId": "adminDEleteQuotaRule", + "parameters": [ + { + "type": "string", + "description": "quota rule to delete", + "name": "quotarule", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Change an existing quota rule", + "operationId": "adminEditQuotaRule", + "parameters": [ + { + "type": "string", + "description": "Quota rule to change", + "name": "quotarule", + "in": "path", + "required": true + }, + { + "name": "rule", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EditQuotaRuleOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaRuleInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get an global actions runner registration token", + "operationId": "adminGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/admin/unadopted": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List unadopted repositories", + "operationId": "adminUnadoptedList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "pattern of repositories to search for", + "name": "pattern", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/StringSlice" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/unadopted/{owner}/{repo}": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Adopt unadopted files as a repository", + "operationId": "adminAdoptRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete unadopted files", + "operationId": "adminDeleteUnadoptedRepository", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/users": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Search users according filter conditions", + "operationId": "adminSearchUsers", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "ID of the user's login source to search for", + "name": "source_id", + "in": "query" + }, + { + "type": "string", + "description": "user's login name to search for", + "name": "login_name", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a user", + "operationId": "adminCreateUser", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateUserOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/User" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a user", + "operationId": "adminDeleteUser", + "parameters": [ + { + "type": "string", + "description": "username of user to delete", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "purge the user from the system completely", + "name": "purge", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Edit an existing user", + "operationId": "adminEditUser", + "parameters": [ + { + "type": "string", + "description": "username of user to edit", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditUserOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Add a public key on behalf of a user", + "operationId": "adminCreatePublicKey", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "key", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/keys/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Delete a user's public key", + "operationId": "adminDeleteUserPublicKey", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/admin/users/{username}/orgs": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create an organization", + "operationId": "adminCreateOrg", + "parameters": [ + { + "type": "string", + "description": "username of the user that will own the created organization", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/quota": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get the user's quota info", + "operationId": "adminGetUserQuota", + "parameters": [ + { + "type": "string", + "description": "username of user to query", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/quota/groups": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Set the user's quota groups to a given list.", + "operationId": "adminSetUserQuotaGroups", + "parameters": [ + { + "type": "string", + "description": "username of the user to modify the quota groups from", + "name": "username", + "in": "path", + "required": true + }, + { + "description": "list of groups that the user should be a member of", + "name": "groups", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SetUserQuotaGroupsOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/rename": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Rename a user", + "operationId": "adminRenameUser", + "parameters": [ + { + "type": "string", + "description": "existing username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RenameUserOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/admin/users/{username}/repos": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Create a repository on behalf of a user", + "operationId": "adminCreateRepo", + "parameters": [ + { + "type": "string", + "description": "username of the user. This user will own the created repository", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "repository", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/gitignore/templates": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns a list of all gitignore templates", + "operationId": "listGitignoresTemplates", + "responses": { + "200": { + "$ref": "#/responses/GitignoreTemplateList" + } + } + } + }, + "/gitignore/templates/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns information about a gitignore template", + "operationId": "getGitignoreTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the template", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitignoreTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/label/templates": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns a list of all label templates", + "operationId": "listLabelTemplates", + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateList" + } + } + } + }, + "/label/templates/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns all labels in a template", + "operationId": "getLabelTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the template", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/licenses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns a list of all license templates", + "operationId": "listLicenseTemplates", + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateList" + } + } + } + }, + "/licenses/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns information about a license template", + "operationId": "getLicenseTemplateInfo", + "parameters": [ + { + "type": "string", + "description": "name of the license", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LicenseTemplateInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/markdown": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render a markdown document as HTML", + "operationId": "renderMarkdown", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkdownOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markdown/raw": { + "post": { + "consumes": [ + "text/plain" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render raw markdown as HTML", + "operationId": "renderMarkdownRaw", + "parameters": [ + { + "description": "Request body to render", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkdownRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/markup": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "text/html" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Render a markup document as HTML", + "operationId": "renderMarkup", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MarkupOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/MarkupRender" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/nodeinfo": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns the nodeinfo of the Gitea application", + "operationId": "getNodeInfo", + "responses": { + "200": { + "$ref": "#/responses/NodeInfo" + } + } + } + }, + "/notifications": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "List users's notification threads", + "operationId": "notifyGetList", + "parameters": [ + { + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.", + "name": "status-types", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "Mark notification threads as read, pinned or unread", + "operationId": "notifyReadList", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "name": "last_read_at", + "in": "query" + }, + { + "type": "string", + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "name": "status-types", + "in": "query" + }, + { + "type": "string", + "description": "Status to mark notifications as, Defaults to read.", + "name": "to-status", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + } + }, + "/notifications/new": { + "get": { + "tags": [ + "notification" + ], + "summary": "Check if unread notifications exist", + "operationId": "notifyNewAvailable", + "responses": { + "200": { + "$ref": "#/responses/NotificationCount" + } + } + } + }, + "/notifications/threads/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "Get notification thread by ID", + "operationId": "notifyGetThread", + "parameters": [ + { + "type": "string", + "description": "id of notification thread", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThread" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "Mark notification thread as read by ID", + "operationId": "notifyReadThread", + "parameters": [ + { + "type": "string", + "description": "id of notification thread", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "read", + "description": "Status to mark notifications as", + "name": "to-status", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThread" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/org/{org}/repos": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a repository in an organization", + "operationId": "createOrgRepoDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get list of organizations", + "operationId": "orgGetAll", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an organization", + "operationId": "orgCreate", + "parameters": [ + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an organization", + "operationId": "orgGet", + "parameters": [ + { + "type": "string", + "description": "name of the organization to get", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete an organization", + "operationId": "orgDelete", + "parameters": [ + { + "type": "string", + "description": "organization that is to be deleted", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit an organization", + "operationId": "orgEdit", + "parameters": [ + { + "type": "string", + "description": "name of the organization to edit", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EditOrgOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Organization" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an organization's actions runner registration token", + "operationId": "orgGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/orgs/{org}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's actions secrets", + "operationId": "orgListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create or Update a secret value in an organization", + "operationId": "updateOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete a secret in an organization", + "operationId": "deleteOrgSecret", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an org-level variables list", + "operationId": "getOrgVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an org-level variable", + "operationId": "getOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update an org-level variable", + "operationId": "updateOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating an org-level variable" + }, + "204": { + "description": "response when updating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an org-level variable", + "operationId": "createOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating an org-level variable" + }, + "204": { + "description": "response when creating an org-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete an org-level variable", + "operationId": "deleteOrgVariable", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's activity feeds", + "operationId": "orgListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update Avatar", + "operationId": "orgUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete Avatar", + "operationId": "orgDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/block/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Blocks a user from the organization", + "operationId": "orgBlockUser", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's webhooks", + "operationId": "orgListHooks", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a hook", + "operationId": "orgCreateHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a hook", + "operationId": "orgGetHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete a hook", + "operationId": "orgDeleteHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update a hook", + "operationId": "orgEditHook", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's labels", + "operationId": "orgListLabels", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a label for an organization", + "operationId": "orgCreateLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/labels/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a single label", + "operationId": "orgGetLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete a label", + "operationId": "orgDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update a label", + "operationId": "orgEditLabel", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/list_blocked": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the organization's blocked users", + "operationId": "orgListBlockedUsers", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BlockedUserList" + } + } + } + }, + "/orgs/{org}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's members", + "operationId": "orgListMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/members/{username}": { + "get": { + "tags": [ + "organization" + ], + "summary": "Check if a user is a member of an organization", + "operationId": "orgIsMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a member" + }, + "303": { + "description": "redirection to /orgs/{org}/public_members/{username}" + }, + "404": { + "description": "user is not a member" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a member from an organization", + "operationId": "orgDeleteMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "member removed" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/public_members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's public members", + "operationId": "orgListPublicMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/public_members/{username}": { + "get": { + "tags": [ + "organization" + ], + "summary": "Check if a user is a public member of an organization", + "operationId": "orgIsPublicMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "user is a public member" + }, + "404": { + "description": "user is not a public member" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Publicize a user's membership", + "operationId": "orgPublicizeMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "membership publicized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Conceal a user's membership", + "operationId": "orgConcealMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get quota information for an organization", + "operationId": "orgGetQuota", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/artifacts": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the artifacts affecting the organization's quota", + "operationId": "orgListQuotaArtifacts", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedArtifactList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/attachments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the attachments affecting the organization's quota", + "operationId": "orgListQuotaAttachments", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedAttachmentList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/quota/check": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Check if the organization is over quota for a given subject", + "operationId": "orgCheckQuota", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/boolean" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/quota/packages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the packages affecting the organization's quota", + "operationId": "orgListQuotaPackages", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedPackageList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's repos", + "operationId": "orgListRepos", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a repository in an organization", + "operationId": "createOrgRepo", + "parameters": [ + { + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's teams", + "operationId": "orgListTeams", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a team", + "operationId": "orgCreateTeam", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTeamOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/teams/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Search for teams within an organization", + "operationId": "teamSearch", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "include search within team description (defaults to true)", + "name": "include_desc", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + }, + "ok": { + "type": "boolean" + } + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/unblock/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Unblock a user from the organization", + "operationId": "orgUnblockUser", + "parameters": [ + { + "type": "string", + "description": "name of the org", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/packages/{owner}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "package" + ], + "summary": "Gets all packages of an owner", + "operationId": "listPackages", + "parameters": [ + { + "type": "string", + "description": "owner of the packages", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "enum": [ + "alpine", + "cargo", + "chef", + "composer", + "conan", + "conda", + "container", + "cran", + "debian", + "generic", + "go", + "helm", + "maven", + "npm", + "nuget", + "pub", + "pypi", + "rpm", + "rubygems", + "swift", + "vagrant" + ], + "type": "string", + "description": "package type filter", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "name filter", + "name": "q", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PackageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/{version}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "package" + ], + "summary": "Gets a package", + "operationId": "getPackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Package" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "package" + ], + "summary": "Delete a package", + "operationId": "deletePackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/packages/{owner}/{type}/{name}/{version}/files": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "package" + ], + "summary": "Gets all files of a package", + "operationId": "listPackageFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "version of the package", + "name": "version", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PackageFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/issues/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Search for issues across the repositories that the user has access to", + "operationId": "issueSearchIssues", + "parameters": [ + { + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "name": "labels", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of milestone names. Fetch only issues that have any of this milestones. Non existent are discarded", + "name": "milestones", + "in": "query" + }, + { + "type": "string", + "description": "search string", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "repository to prioritize in the results", + "name": "priority_repo_id", + "in": "query" + }, + { + "type": "string", + "description": "filter by type (issues / pulls) if set", + "name": "type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (issues / pulls) assigned to you, default is false", + "name": "assigned", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (issues / pulls) created by you, default is false", + "name": "created", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (issues / pulls) mentioning you, default is false", + "name": "mentioned", + "in": "query" + }, + { + "type": "boolean", + "description": "filter pulls requesting your review, default is false", + "name": "review_requested", + "in": "query" + }, + { + "type": "boolean", + "description": "filter pulls reviewed by you, default is false", + "name": "reviewed", + "in": "query" + }, + { + "type": "string", + "description": "filter by owner", + "name": "owner", + "in": "query" + }, + { + "type": "string", + "description": "filter by team (requires organization owner parameter to be provided)", + "name": "team", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + } + } + } + }, + "/repos/migrate": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Migrate a remote git repository", + "operationId": "repoMigrate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MigrateRepoOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Search for repositories", + "operationId": "repoSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "Limit search to repositories with keyword as topic", + "name": "topic", + "in": "query" + }, + { + "type": "boolean", + "description": "include search of keyword within repository description", + "name": "includeDesc", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id owns or contributes to", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "repo owner to prioritize in the results", + "name": "priority_owner_id", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that belong to the given team id", + "name": "team_id", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id has starred", + "name": "starredBy", + "in": "query" + }, + { + "type": "boolean", + "description": "include private repositories this user has access to (defaults to true)", + "name": "private", + "in": "query" + }, + { + "type": "boolean", + "description": "show only pubic, private or all repositories (defaults to all)", + "name": "is_private", + "in": "query" + }, + { + "type": "boolean", + "description": "include template repositories this user has access to (defaults to true)", + "name": "template", + "in": "query" + }, + { + "type": "boolean", + "description": "show only archived, non-archived or all repositories (defaults to all)", + "name": "archived", + "in": "query" + }, + { + "type": "string", + "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", + "name": "mode", + "in": "query" + }, + { + "type": "boolean", + "description": "if `uid` is given, search only for repos that the user owns", + "name": "exclusive", + "in": "query" + }, + { + "type": "string", + "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\"", + "name": "sort", + "in": "query" + }, + { + "type": "string", + "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.", + "name": "order", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SearchResults" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to delete", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to edit", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to edit", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List an repo's actions secrets", + "operationId": "repoListActionsSecrets", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SecretList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create or Update a secret value in a repository", + "operationId": "updateRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/tasks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's action tasks", + "operationId": "ListActionTasks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TasksList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo-level variables list", + "operationId": "getRepoVariablesList", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repo-level variable", + "operationId": "getRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a repo-level variable", + "operationId": "updateRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a repo-level variable" + }, + "204": { + "description": "response when updating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repo-level variable", + "operationId": "createRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a repo-level variable" + }, + "204": { + "description": "response when creating a repo-level variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repo-level variable", + "operationId": "deleteRepoVariable", + "parameters": [ + { + "type": "string", + "description": "name of the owner", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/workflows/{workflowname}/dispatches": { + "post": { + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Dispatches a workflow", + "operationId": "DispatchWorkflow", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the workflow", + "name": "workflowname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DispatchWorkflowOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's activity feeds", + "operationId": "repoListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/archive/{archive}": { + "get": { + "produces": [ + "application/octet-stream", + "application/zip", + "application/gzip" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the git reference for download with attached archive format (e.g. master.zip)", + "name": "archive", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/assignees": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that have write access and can be assigned to issues", + "operationId": "repoGetAssignees", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update avatar", + "operationId": "repoUpdateAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateRepoAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete avatar", + "operationId": "repoDeleteAvatar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/branch_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List branch protections for a repository", + "operationId": "repoListBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtectionList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch protections for a repository", + "operationId": "repoCreateBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/BranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branch_protections/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific branch protection for the repository", + "operationId": "repoGetBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch protection for the repository", + "operationId": "repoDeleteBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a branch protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditBranchProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of protected branch", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditBranchProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branches": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a branch", + "operationId": "repoCreateBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateBranchRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Branch" + }, + "403": { + "description": "The branch is archived or a mirror." + }, + "404": { + "description": "The old branch does not exist." + }, + "409": { + "description": "The branch with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Retrieve a specific branch from a repository, including its effective branch protection", + "operationId": "repoGetBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific branch from a repository", + "operationId": "repoDeleteBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to delete", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a user is a collaborator of a repository", + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to add", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddCollaboratorOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}/permission": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repository permissions for a user", + "operationId": "repoGetRepoPermissions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoCollaboratorPermission" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", + "in": "query" + }, + { + "type": "string", + "description": "filepath of a file/dir", + "name": "path", + "in": "query" + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results (ignored if used with 'path')", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "commits that match the given specifier will not be listed.", + "name": "not", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/status": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CombinedStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses, by branch/tag/commit reference", + "operationId": "repoListStatusesByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{sha}/pull": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the pull request of the commit", + "operationId": "repoGetCommitPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/compare/{basehead}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commit comparison information", + "operationId": "repoCompareDiff", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "compare two branches or commits", + "name": "basehead", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Compare" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/contents": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the metadata of all the entries of the root dir", + "operationId": "repoGetContentsList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Modify multiple files in a repository", + "operationId": "repoChangeFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeFilesOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FilesResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/contents/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir", + "operationId": "repoGetContents", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a file in a repository", + "operationId": "repoUpdateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to update", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/diffpatch": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Apply diff patch to repository", + "operationId": "repoApplyDiffPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "success" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/flags": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's flags", + "operationId": "repoListFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/StringSlice" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace all flags of a repository", + "operationId": "repoReplaceAllFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/ReplaceFlagsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Remove all flags from a repository", + "operationId": "repoDeleteAllFlags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/flags/{flag}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a repository has a given flag", + "operationId": "repoCheckFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a flag to a repository", + "operationId": "repoAddFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Remove a flag from a repository", + "operationId": "repoDeleteFlag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the flag", + "name": "flag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "include diff stats for every commit (disable for speedup, default 'true')", + "name": "stat", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}.{diffType}": { + "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's diff or patch", + "operationId": "repoDownloadCommitDiffOrPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "SHA of the commit to get", + "name": "sha", + "in": "path", + "required": true + }, + { + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/notes/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs/{ref}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/tags/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetAnnotatedTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/trees/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { + "type": "integer", + "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "number of items per page", + "name": "per_page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitTreeResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook", + "operationId": "repoCreateHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHookList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditGitHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a hook", + "operationId": "repoGetHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the hook", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}/tests": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Test a push webhook", + "operationId": "repoTestHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the hook to test", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", + "name": "ref", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the issue config for a repo", + "operationId": "repoGetIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfig" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_config/validate": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns the validation information for a issue config", + "operationId": "repoValidateIssueConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoIssueConfigValidation" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issue_templates": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get available issue templates for a repository", + "operationId": "repoGetIssueTemplates", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueTemplates" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "whether issue is open or closed", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "name": "labels", + "in": "query" + }, + { + "type": "string", + "description": "search string", + "name": "q", + "in": "query" + }, + { + "enum": [ + "issues", + "pulls" + ], + "type": "string", + "description": "filter by type (issues / pulls) if set", + "name": "type", + "in": "query" + }, + { + "type": "string", + "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded", + "name": "milestones", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show items updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show items updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "string", + "description": "Only show items which were created by the given user", + "name": "created_by", + "in": "query" + }, + { + "type": "string", + "description": "Only show items for which the given user is assigned", + "name": "assigned_by", + "in": "query" + }, + { + "type": "string", + "description": "Only show items in which the given user was mentioned", + "name": "mentioned_by", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueCreateIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment", + "operationId": "issueGetComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List comment's attachments", + "operationId": "issueListIssueCommentAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a comment attachment", + "operationId": "issueCreateIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", + "name": "updated_at", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a comment attachment", + "operationId": "issueGetIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete a comment attachment", + "operationId": "issueDeleteIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment attachment", + "operationId": "issueEditIssueCommentAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{id}/reactions": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list of reactions from a comment of an issue", + "operationId": "issueGetCommentReactions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to a comment of an issue", + "operationId": "issuePostCommentReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from a comment of an issue", + "operationId": "issueDeleteCommentReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned issues", + "operationId": "repoListPinnedIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue", + "operationId": "issueGetIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete an issue", + "operationId": "issueDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to delete", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "412": { + "$ref": "#/responses/error" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issue's attachments", + "operationId": "issueListIssueAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue attachment", + "operationId": "issueCreateIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "time of the attachment's creation. This is a timestamp in RFC 3339 format", + "name": "updated_at", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload", + "name": "attachment", + "in": "formData", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue attachment", + "operationId": "issueGetIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue attachment", + "operationId": "issueDeleteIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/error" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit an issue attachment", + "operationId": "issueEditIssueAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/blocks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List issues that are blocked by this issue", + "operationId": "issueListBlocks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Block the issue given in the body by the issue in path", + "operationId": "issueCreateIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unblock the issue given in the body by the issue in path", + "operationId": "issueRemoveIssueBlocking", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueCommentOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Comment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditCommentDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "this parameter is ignored", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditIssueCommentOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/deadline": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "issueEditIssueDeadline", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create or update a deadline on", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditDeadlineOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/IssueDeadline" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/dependencies": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's dependencies, i.e all issues that block this issue.", + "operationId": "issueListIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Make the issue in the url depend on the issue in the form.", + "operationId": "issueCreateIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" + }, + "404": { + "description": "the issue does not exist" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove an issue dependency", + "operationId": "issueRemoveIssueDependencies", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueMeta" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteLabelsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to remove", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteLabelsOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/pin": { + "post": { + "tags": [ + "issue" + ], + "summary": "Pin an Issue", + "operationId": "pinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to pin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Unpin an Issue", + "operationId": "unpinIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue to unpin", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/pin/{position}": { + "patch": { + "tags": [ + "issue" + ], + "summary": "Moves the Pin to the given Position", + "operationId": "moveIssuePin", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "the new position", + "name": "position", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/reactions": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a list reactions of an issue", + "operationId": "issueGetIssueReactions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReactionList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a reaction to an issue", + "operationId": "issuePostIssueReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Reaction" + }, + "201": { + "$ref": "#/responses/Reaction" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a reaction from an issue", + "operationId": "issueDeleteIssueReaction", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "content", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReactionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": { + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete an issue's existing stopwatch.", + "operationId": "issueDeleteStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot cancel a non existent stopwatch" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to create the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot start a stopwatch again if it already exists" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopStopWatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to stop the stopwatch on", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "Cannot stop a non existent stopwatch" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get users who subscribed on an issue.", + "operationId": "issueSubscriptions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Check if user is subscribed to an issue", + "operationId": "issueCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Subscribe user to issue", + "operationId": "issueAddSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user to subscribe", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Already subscribed" + }, + "201": { + "description": "Successfully Subscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Unsubscribe user from issue", + "operationId": "issueDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "user witch unsubscribe", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Already unsubscribed" + }, + "201": { + "description": "Successfully Unsubscribed" + }, + "304": { + "description": "User can only subscribe itself if he is no admin" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/timeline": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments and events on an issue", + "operationId": "issueGetCommentsAndTimeline", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "since", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "if provided, only comments updated before the provided time are returned.", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TimelineList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTime" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Reset a tracked time of an issue", + "operationId": "issueResetTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue to add tracked time to", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/times/{id}": { + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Delete specific tracked time", + "operationId": "issueDeleteTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of time to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's keys", + "operationId": "repoListKeys", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "the key_id to search for", + "name": "key_id", + "in": "query" + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateLabelOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/labels/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a label", + "operationId": "issueDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditLabelOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/languages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get languages and number of bytes of code written", + "operationId": "repoGetLanguages", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/media/{filepath}": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file or it's LFS object from a repository", + "operationId": "repoGetRawFileOrLFS", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's opened milestones", + "operationId": "issueGetMilestonesList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Milestone state, Recognized values are open, closed and all. Defaults to \"open\"", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "filter by milestone name", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateMilestoneOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/milestones/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the milestone to get, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the milestone to delete, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the milestone to edit, identified by ID and if not available by name", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/mirror-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/new_pin_allowed": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Returns if new Issue Pins are allowed", + "operationId": "repoNewPinAllowed", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepoNewIssuePinsAllowed" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/notifications": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "List users's notification threads on a specific repo", + "operationId": "notifyGetRepoList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "If true, show notifications marked as read. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned", + "name": "status-types", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "issue", + "pull", + "commit", + "repository" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "filter notifications by subject type", + "name": "subject-type", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/NotificationThreadList" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "notification" + ], + "summary": "Mark notification threads as read, pinned or unread on a specific repo", + "operationId": "notifyReadRepoList", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "If true, mark all notifications on this repo. Default value is false", + "name": "all", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.", + "name": "status-types", + "in": "query" + }, + { + "type": "string", + "description": "Status to mark notifications as. Defaults to read.", + "name": "to-status", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.", + "name": "last_read_at", + "in": "query" + } + ], + "responses": { + "205": { + "$ref": "#/responses/NotificationThreadList" + } + } + } + }, + "/repos/{owner}/{repo}/pulls": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "enum": [ + "closed", + "open", + "all" + ], + "type": "string", + "description": "State of pull request: open or closed (optional)", + "name": "state", + "in": "query" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "mostcomment", + "leastcomment", + "priority" + ], + "type": "string", + "description": "Type of sort", + "name": "sort", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the milestone", + "name": "milestone", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "collectionFormat": "multi", + "description": "Label IDs", + "name": "labels", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/pinned": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pinned pull requests", + "operationId": "repoListPinnedPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{base}/{head}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request by base and head", + "operationId": "repoGetPullRequestByBaseHead", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "base of the pull request to get", + "name": "base", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "head of the pull request to get", + "name": "head", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.", + "operationId": "repoEditPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditPullRequestOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "412": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}.{diffType}": { + "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request diff or patch", + "operationId": "repoDownloadPullDiffOrPatch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "enum": [ + "diff", + "patch" + ], + "type": "string", + "description": "whether the output is diff or patch", + "name": "diffType", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "whether to include binary file changes. if true, the diff is applicable with `git apply`", + "name": "binary", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/commits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get commits for a pull request", + "operationId": "repoGetPullRequestCommits", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "boolean", + "description": "include verification for every commit (disable for speedup, default 'true')", + "name": "verification", + "in": "query" + }, + { + "type": "boolean", + "description": "include a list of affected files for every commit (disable for speedup, default 'true')", + "name": "files", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/files": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get changed files for a pull request", + "operationId": "repoGetPullRequestFiles", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "skip to given file", + "name": "skip-to", + "in": "query" + }, + { + "enum": [ + "ignore-all", + "ignore-change", + "ignore-eol", + "show-all" + ], + "type": "string", + "description": "whitespace behavior", + "name": "whitespace", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ChangedFileList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/merge": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "pull request has been merged" + }, + "404": { + "description": "pull request has not been merged" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel the scheduled auto merge for the given pull request", + "operationId": "repoCancelScheduledAutoMerge", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "create review requests for a pull request", + "operationId": "repoCreatePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "cancel review requests for a pull request", + "operationId": "repoDeletePullReviewRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PullReviewRequestOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List all reviews for a pull request", + "operationId": "repoListPullReviews", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a review to an pull request", + "operationId": "repoCreatePullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Submit a pending review to an pull request", + "operationId": "repoSubmitPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubmitPullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific review from a pull request", + "operationId": "repoDeletePullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific review for a pull request", + "operationId": "repoGetPullReviewComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewCommentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a new comment to a pull request review", + "operationId": "repoCreatePullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewCommentOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewComment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull review comment", + "operationId": "repoGetPullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "comment", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReviewComment" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a pull review comment", + "operationId": "repoDeletePullReviewComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the comment", + "name": "comment", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Dismiss a review for a pull request", + "operationId": "repoDismissPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DismissPullReviewOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Cancel to dismiss a review for a pull request", + "operationId": "repoUnDismissPullReview", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullReview" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/update": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge PR's baseBranch into headBranch", + "operationId": "repoUpdatePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + }, + { + "enum": [ + "merge", + "rebase" + ], + "type": "string", + "description": "how to update pull request", + "name": "style", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all push mirrors of the repository", + "operationId": "repoListPushMirrors", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirrorList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "add a push mirror to the repository", + "operationId": "repoAddPushMirror", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreatePushMirrorOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors-sync": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Sync all push mirrored repository", + "operationId": "repoPushMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/push_mirrors/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get push mirror of the repository by remoteName", + "operationId": "repoGetPushMirrorByRemoteName", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "remote name of push mirror", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PushMirror" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "deletes a push mirror from a repository by remoteName", + "operationId": "repoDeletePushMirror", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "remote name of the pushMirror", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/raw/{filepath}": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Returns raw file content.", + "schema": { + "type": "file" + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's releases", + "operationId": "repoListReleases", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "name": "draft", + "in": "query" + }, + { + "type": "boolean", + "description": "filter (exclude / include) pre-releases", + "name": "pre-release", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReleaseList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/releases/latest": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", + "operationId": "repoGetLatestRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases/tags/{tag}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release by tag name", + "operationId": "repoGetReleaseByTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "tag name of the release to get", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release by tag name", + "operationId": "repoDeleteReleaseByTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "tag name of the release to delete", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release", + "operationId": "repoGetRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a release", + "operationId": "repoEditRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditReleaseOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List release's attachments", + "operationId": "repoListReleaseAttachments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AttachmentList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a release attachment", + "operationId": "repoCreateReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the attachment", + "name": "name", + "in": "query" + }, + { + "type": "file", + "description": "attachment to upload (this parameter is incompatible with `external_url`)", + "name": "attachment", + "in": "formData" + }, + { + "type": "string", + "description": "url to external asset (this parameter is incompatible with `attachment`)", + "name": "external_url", + "in": "formData" + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a release attachment", + "operationId": "repoGetReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to get", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a release attachment", + "operationId": "repoDeleteReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to delete", + "name": "attachment_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a release attachment", + "operationId": "repoEditReleaseAttachment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the release", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the attachment to edit", + "name": "attachment_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAttachmentOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Attachment" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/reviewers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Return all users that can be requested to review in this repo", + "operationId": "repoGetReviewers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/signing-key.gpg": { + "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "repository" + ], + "summary": "Get signing-key.gpg for given repository", + "operationId": "repoSigningKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } + } + }, + "/repos/{owner}/{repo}/stargazers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/statuses/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommitStatusList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/CommitStatus" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/subscribers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/subscription": { + "get": { + "tags": [ + "repository" + ], + "summary": "Check if the current user is watching a repo", + "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "description": "User is not watching this repo or repo do not exist" + } + } + }, + "put": { + "tags": [ + "repository" + ], + "summary": "Watch a repo", + "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WatchInfo" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Unwatch a repo", + "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List tag protections for a repository", + "operationId": "repoListTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtectionList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a tag protections for a repository", + "operationId": "repoCreateTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/TagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tag_protections/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a specific tag protection for the repository", + "operationId": "repoGetTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the tag protect to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a specific tag protection for the repository", + "operationId": "repoDeleteTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a tag protections for a repository. Only fields that are set will be changed", + "operationId": "repoEditTagProtection", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of protected tag", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTagProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tags": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, default maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a new git tag in a repository", + "operationId": "repoCreateTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTagOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/tags/{tag}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the tag of a repository by tag name", + "operationId": "repoGetTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of tag", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Tag" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository's tag by name", + "operationId": "repoDeleteTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of tag to delete", + "name": "tag", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/empty" + }, + "409": { + "$ref": "#/responses/conflict" + }, + "422": { + "$ref": "#/responses/validationError" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's teams", + "operationId": "repoListTeams", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/teams/{team}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a team is assigned to a repository", + "operationId": "repoCheckTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a team to a repository", + "operationId": "repoAddTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a team from a repository", + "operationId": "repoDeleteTeam", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "team name", + "name": "team", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "405": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's tracked times", + "operationId": "repoTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "optional filter by user (available for issue managers)", + "name": "user", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/times/{user}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of user", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/topics": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + } + }, + "/repos/{owner}/{repo}/topics/{topic}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository", + "operationId": "repoAddTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to delete", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/invalidTopicsError" + } + } + } + }, + "/repos/{owner}/{repo}/transfer": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Transfer a repo ownership", + "operationId": "repoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Transfer Options", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TransferRepoOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/transfer/accept": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Accept a repo transfer", + "operationId": "acceptRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + } + } + } + }, + "/repos/{owner}/{repo}/transfer/reject": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reject a repo transfer", + "operationId": "rejectRepoTransfer", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to transfer", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to transfer", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/new": { + "post": { + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a wiki page", + "operationId": "repoCreateWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/page/{pageName}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a wiki page", + "operationId": "repoGetWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a wiki page", + "operationId": "repoDeleteWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a wiki page", + "operationId": "repoEditWikiPage", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateWikiPageOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPage" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "423": { + "$ref": "#/responses/repoArchivedError" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/pages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get all wiki pages", + "operationId": "repoGetWikiPages", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiPageList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/wiki/revisions/{pageName}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get revisions of a wiki page", + "operationId": "repoGetWikiPageRevisions", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the page", + "name": "pageName", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WikiCommitList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{template_owner}/{template_repo}/generate": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a repository using a template", + "operationId": "generateRepo", + "parameters": [ + { + "type": "string", + "description": "name of the template repository owner", + "name": "template_owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the template repository", + "name": "template_repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/GenerateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repositories/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository by id", + "operationId": "repoGetByID", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the repo to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/settings/api": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Get instance's global settings for api", + "operationId": "getGeneralAPISettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralAPISettings" + } + } + } + }, + "/settings/attachment": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Get instance's global settings for Attachment", + "operationId": "getGeneralAttachmentSettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralAttachmentSettings" + } + } + } + }, + "/settings/repository": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Get instance's global settings for repositories", + "operationId": "getGeneralRepositorySettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralRepoSettings" + } + } + } + }, + "/settings/ui": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "settings" + ], + "summary": "Get instance's global settings for ui", + "operationId": "getGeneralUISettings", + "responses": { + "200": { + "$ref": "#/responses/GeneralUISettings" + } + } + } + }, + "/signing-key.gpg": { + "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Get default signing-key.gpg", + "operationId": "getSigningKey", + "responses": { + "200": { + "description": "GPG armored public key", + "schema": { + "type": "string" + } + } + } + } + }, + "/teams/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a team", + "operationId": "orgGetTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete a team", + "operationId": "orgDeleteTeam", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "team deleted" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit a team", + "operationId": "orgEditTeam", + "parameters": [ + { + "type": "integer", + "description": "id of the team to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTeamOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's activity feeds", + "operationId": "orgListTeamActivityFeeds", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's members", + "operationId": "orgListTeamMembers", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/members/{username}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a particular member of team", + "operationId": "orgListTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the member to list", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a team member", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a team member", + "operationId": "orgRemoveTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's repos", + "operationId": "orgListTeamRepos", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/teams/{id}/repos/{org}/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a particular repo of team", + "operationId": "orgListTeamRepo", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to list", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to list", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a repository to a team", + "operationId": "orgAddTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to add", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to add", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "description": "This does not delete the repository, it only removes the repository from the team.", + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a repository from a team", + "operationId": "orgRemoveTeamRepository", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to remove", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to remove", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/topics/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "search topics via keyword", + "operationId": "topicSearch", + "parameters": [ + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicListResponse" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get the authenticated user", + "operationId": "userGetCurrent", + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get an user's actions runner registration token", + "operationId": "userGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/actions/secrets/{secretname}": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create or Update a secret value in a user scope", + "operationId": "updateUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrUpdateSecretOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a secret" + }, + "204": { + "description": "response when updating a secret" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a secret in a user scope", + "operationId": "deleteUserSecret", + "parameters": [ + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the user" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get the user-level list of variables which is created by current doer", + "operationId": "getUserVariablesList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/VariableList" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/actions/variables/{variablename}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user-level variable which is created by current doer", + "operationId": "getUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActionVariable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update a user-level variable which is created by current doer", + "operationId": "updateUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when updating a variable" + }, + "204": { + "description": "response when updating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a user-level variable", + "operationId": "createUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateVariableOption" + } + } + ], + "responses": { + "201": { + "description": "response when creating a variable" + }, + "204": { + "description": "response when creating a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a user-level variable which is created by current doer", + "operationId": "deleteUserVariable", + "parameters": [ + { + "type": "string", + "description": "name of the variable", + "name": "variablename", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "description": "response when deleting a variable" + }, + "204": { + "description": "response when deleting a variable" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/applications/oauth2": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's oauth2 applications", + "operationId": "userGetOAuth2Applications", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2ApplicationList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "creates a new OAuth2 application", + "operationId": "userCreateOAuth2Application", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOAuth2ApplicationOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/OAuth2Application" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/applications/oauth2/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "get an OAuth2 Application", + "operationId": "userGetOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "Application ID to be found", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2Application" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "delete an OAuth2 Application", + "operationId": "userDeleteOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "token to be deleted", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "update an OAuth2 Application, this includes regenerating the client secret", + "operationId": "userUpdateOAuth2Application", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "application to be updated", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOAuth2ApplicationOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OAuth2Application" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/avatar": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update Avatar", + "operationId": "userUpdateAvatar", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UpdateUserAvatarOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete Avatar", + "operationId": "userDeleteAvatar", + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/block/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Blocks a user from the doer.", + "operationId": "userBlockUser", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/emails": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's email addresses", + "operationId": "userListEmails", + "responses": { + "200": { + "$ref": "#/responses/EmailList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Add email addresses", + "operationId": "userAddEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateEmailOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/EmailList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete email addresses", + "operationId": "userDeleteEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteEmailOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/followers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's followers", + "operationId": "userCurrentListFollowers", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/following": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the users that the authenticated user is following", + "operationId": "userCurrentListFollowing", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/following/{username}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check whether a user is followed by the authenticated user", + "operationId": "userCurrentCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of followed user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Follow a user", + "operationId": "userCurrentPutFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to follow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Unfollow a user", + "operationId": "userCurrentDeleteFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to unfollow", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/gpg_key_token": { + "get": { + "produces": [ + "text/plain" + ], + "tags": [ + "user" + ], + "summary": "Get a Token to verify", + "operationId": "getVerificationToken", + "responses": { + "200": { + "$ref": "#/responses/string" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/gpg_key_verify": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Verify a GPG key", + "operationId": "userVerifyGPGKey", + "responses": { + "201": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/gpg_keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's GPG keys", + "operationId": "userCurrentListGPGKeys", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a GPG key", + "operationId": "userCurrentPostGPGKey", + "parameters": [ + { + "name": "Form", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateGPGKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/gpg_keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a GPG key", + "operationId": "userCurrentGetGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Remove a GPG key", + "operationId": "userCurrentDeleteGPGKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's webhooks", + "operationId": "userListHooks", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a hook", + "operationId": "userCreateHook", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateHookOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a hook", + "operationId": "userGetHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a hook", + "operationId": "userDeleteHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update a hook", + "operationId": "userEditHook", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the hook to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditHookOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's public keys", + "operationId": "userCurrentListKeys", + "parameters": [ + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create a public key", + "operationId": "userCurrentPostKey", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateKeyOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PublicKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a public key", + "operationId": "userCurrentGetKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKey" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete a public key", + "operationId": "userCurrentDeleteKey", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/list_blocked": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's blocked users", + "operationId": "userListBlockedUsers", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/BlockedUserList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the current user's organizations", + "operationId": "orgListCurrentUserOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/quota": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get quota information for the authenticated user", + "operationId": "userGetQuota", + "responses": { + "200": { + "$ref": "#/responses/QuotaInfo" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/artifacts": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the artifacts affecting the authenticated user's quota", + "operationId": "userListQuotaArtifacts", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedArtifactList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/attachments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the attachments affecting the authenticated user's quota", + "operationId": "userListQuotaAttachments", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedAttachmentList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/quota/check": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Check if the authenticated user is over quota for a given subject", + "operationId": "userCheckQuota", + "responses": { + "200": { + "$ref": "#/responses/boolean" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/quota/packages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the packages affecting the authenticated user's quota", + "operationId": "userListQuotaPackages", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/QuotaUsedPackageList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repos that the authenticated user owns", + "operationId": "userCurrentListRepos", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "order the repositories by name (default), id, or size", + "name": "order_by", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository", + "user" + ], + "summary": "Create a repository", + "operationId": "createCurrentUserRepo", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateRepoOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + }, + "400": { + "$ref": "#/responses/error" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "413": { + "$ref": "#/responses/quotaExceeded" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/user/settings": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get user settings", + "operationId": "getUserSettings", + "responses": { + "200": { + "$ref": "#/responses/UserSettings" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update user settings", + "operationId": "updateUserSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/UserSettingsOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserSettings" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/starred": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The repos that the authenticated user has starred", + "operationId": "userCurrentListStarred", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/starred/{owner}/{repo}": { + "get": { + "tags": [ + "user" + ], + "summary": "Whether the authenticated is starring the repo", + "operationId": "userCurrentCheckStarring", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Star the given repo", + "operationId": "userCurrentPutStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to star", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to star", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Unstar the given repo", + "operationId": "userCurrentDeleteStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to unstar", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to unstar", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/user/stopwatches": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get list of all existing stopwatches", + "operationId": "userGetStopWatches", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/StopWatchList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/subscriptions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List repositories watched by the authenticated user", + "operationId": "userCurrentListSubscriptions", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List all the teams a user belongs to", + "operationId": "userListTeams", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the current user's tracked times", + "operationId": "userCurrentTrackedTimes", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/user/unblock/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Unblocks a user from the doer.", + "operationId": "userUnblockUser", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "401": { + "$ref": "#/responses/unauthorized" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/users/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Search for users", + "operationId": "userSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "ID of the user to search for", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + }, + "ok": { + "type": "boolean" + } + } + } + } + } + } + }, + "/users/{username}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user", + "operationId": "userGet", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/activities/feeds": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List a user's activity feeds", + "operationId": "userListActivityFeeds", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "if true, only show actions performed by the requested user", + "name": "only-performed-by", + "in": "query" + }, + { + "type": "string", + "format": "date", + "description": "the date of the activities to be found", + "name": "date", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ActivityFeedsList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/followers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's followers", + "operationId": "userListFollowers", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/following": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the users that the given user is following", + "operationId": "userListFollowing", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/following/{target}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check if one user is following another user", + "operationId": "userCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of following user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of followed user", + "name": "target", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/gpg_keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's GPG keys", + "operationId": "userListGPGKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GPGKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/heatmap": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get a user's heatmap", + "operationId": "userGetHeatmapData", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserHeatmapData" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/keys": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the given user's public keys", + "operationId": "userListKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "fingerprint of the key", + "name": "fingerprint", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/PublicKeyList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a user's organizations", + "operationId": "orgListUserOrgs", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/orgs/{org}/permissions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get user permissions in organization", + "operationId": "orgGetUserPermissions", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationPermissions" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repos owned by the given user", + "operationId": "userListRepos", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/starred": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "The repos that the given user has starred", + "operationId": "userListStarred", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/subscriptions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the repositories watched by a user", + "operationId": "userListSubscriptions", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/tokens": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's access tokens", + "operationId": "userGetTokens", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessTokenList" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create an access token", + "operationId": "userCreateToken", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateAccessTokenOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/AccessToken" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/users/{username}/tokens/{token}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "delete an access token", + "operationId": "userDeleteAccessToken", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "token to be deleted, identified by ID and if not available by name", + "name": "token", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/error" + } + } + } + }, + "/version": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "miscellaneous" + ], + "summary": "Returns the version of the Gitea application", + "operationId": "getVersion", + "responses": { + "200": { + "$ref": "#/responses/ServerVersion" + } + } + } + } + }, + "definitions": { + "APIError": { + "description": "APIError is an api error with a message", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "APIForbiddenError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "APIInvalidTopicsError": { + "type": "object", + "properties": { + "invalidTopics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "InvalidTopics" + }, + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "APINotFound": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Errors" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "APIRepoArchivedError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "APIUnauthorizedError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "APIValidationError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/services/context" + }, + "AccessToken": { + "type": "object", + "title": "AccessToken represents an API access token.", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Scopes" + }, + "sha1": { + "type": "string", + "x-go-name": "Token" + }, + "token_last_eight": { + "type": "string", + "x-go-name": "TokenLastEight" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActionTask": { + "description": "ActionTask represents a ActionTask", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "display_title": { + "type": "string", + "x-go-name": "DisplayTitle" + }, + "event": { + "type": "string", + "x-go-name": "Event" + }, + "head_branch": { + "type": "string", + "x-go-name": "HeadBranch" + }, + "head_sha": { + "type": "string", + "x-go-name": "HeadSHA" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "run_number": { + "type": "integer", + "format": "int64", + "x-go-name": "RunNumber" + }, + "run_started_at": { + "type": "string", + "format": "date-time", + "x-go-name": "RunStartedAt" + }, + "status": { + "type": "string", + "x-go-name": "Status" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "UpdatedAt" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "workflow_id": { + "type": "string", + "x-go-name": "WorkflowID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActionTaskResponse": { + "description": "ActionTaskResponse returns a ActionTask", + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "workflow_runs": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionTask" + }, + "x-go-name": "Entries" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActionVariable": { + "description": "ActionVariable return value of the query API", + "type": "object", + "properties": { + "data": { + "description": "the value of the variable", + "type": "string", + "x-go-name": "Data" + }, + "name": { + "description": "the name of the variable", + "type": "string", + "x-go-name": "Name" + }, + "owner_id": { + "description": "the owner to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "OwnerID" + }, + "repo_id": { + "description": "the repository to which the variable belongs", + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Activity": { + "type": "object", + "properties": { + "act_user": { + "$ref": "#/definitions/User" + }, + "act_user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ActUserID" + }, + "comment": { + "$ref": "#/definitions/Comment" + }, + "comment_id": { + "type": "integer", + "format": "int64", + "x-go-name": "CommentID" + }, + "content": { + "type": "string", + "x-go-name": "Content" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_private": { + "type": "boolean", + "x-go-name": "IsPrivate" + }, + "op_type": { + "description": "the type of action", + "type": "string", + "enum": [ + "create_repo", + "rename_repo", + "star_repo", + "watch_repo", + "commit_repo", + "create_issue", + "create_pull_request", + "transfer_repo", + "push_tag", + "comment_issue", + "merge_pull_request", + "close_issue", + "reopen_issue", + "close_pull_request", + "reopen_pull_request", + "delete_tag", + "delete_branch", + "mirror_sync_push", + "mirror_sync_create", + "mirror_sync_delete", + "approve_pull_request", + "reject_pull_request", + "comment_pull", + "publish_release", + "pull_review_dismissed", + "pull_request_ready_for_review", + "auto_merge_pull_request" + ], + "x-go-name": "OpType" + }, + "ref_name": { + "type": "string", + "x-go-name": "RefName" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ActivityPub": { + "description": "ActivityPub type", + "type": "object", + "properties": { + "@context": { + "type": "string", + "x-go-name": "Context" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AddCollaboratorOption": { + "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AddTimeOption": { + "description": "AddTimeOption options for adding time to an issue", + "type": "object", + "required": [ + "time" + ], + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "time": { + "description": "time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + }, + "user_name": { + "description": "User who spent the time (optional)", + "type": "string", + "x-go-name": "User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTag": { + "description": "AnnotatedTag represents an annotated tag", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "object": { + "$ref": "#/definitions/AnnotatedTagObject" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tag": { + "type": "string", + "x-go-name": "Tag" + }, + "tagger": { + "$ref": "#/definitions/CommitUser" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTagObject": { + "description": "AnnotatedTagObject contains meta information of the tag object", + "type": "object", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Attachment": { + "description": "Attachment a generic attachment", + "type": "object", + "properties": { + "browser_download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "download_count": { + "type": "integer", + "format": "int64", + "x-go-name": "DownloadCount" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "enum": [ + "attachment", + "external" + ], + "x-go-name": "Type" + }, + "uuid": { + "type": "string", + "x-go-name": "UUID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "BlockedUser": { + "type": "object", + "title": "BlockedUser represents a blocked user.", + "properties": { + "block_id": { + "type": "integer", + "format": "int64", + "x-go-name": "BlockID" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Branch": { + "description": "Branch represents a repository branch", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/PayloadCommit" + }, + "effective_branch_protection_name": { + "type": "string", + "x-go-name": "EffectiveBranchProtectionName" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "protected": { + "type": "boolean", + "x-go-name": "Protected" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "user_can_merge": { + "type": "boolean", + "x-go-name": "UserCanMerge" + }, + "user_can_push": { + "type": "boolean", + "x-go-name": "UserCanPush" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "BranchProtection": { + "description": "BranchProtection represents a branch protection for a repository", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "branch_name": { + "description": "Deprecated: true", + "type": "string", + "x-go-name": "BranchName" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ChangeFileOperation": { + "description": "ChangeFileOperation for creating, updating or deleting a file", + "type": "object", + "required": [ + "operation", + "path" + ], + "properties": { + "content": { + "description": "new or updated file content, must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "from_path": { + "description": "old path of the file to move", + "type": "string", + "x-go-name": "FromPath" + }, + "operation": { + "description": "indicates what to do with the file", + "type": "string", + "enum": [ + "create", + "update", + "delete" + ], + "x-go-name": "Operation" + }, + "path": { + "description": "path to the existing or new file", + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "description": "sha is the SHA for the file that already exists, required for update or delete", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ChangeFilesOptions": { + "description": "ChangeFilesOptions options for creating, updating or deleting multiple files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "files" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "files": { + "description": "list of file operations", + "type": "array", + "items": { + "$ref": "#/definitions/ChangeFileOperation" + }, + "x-go-name": "Files" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ChangedFile": { + "description": "ChangedFile store information about files affected by the pull request", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "changes": { + "type": "integer", + "format": "int64", + "x-go-name": "Changes" + }, + "contents_url": { + "type": "string", + "x-go-name": "ContentsURL" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "filename": { + "type": "string", + "x-go-name": "Filename" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "previous_filename": { + "type": "string", + "x-go-name": "PreviousFilename" + }, + "raw_url": { + "type": "string", + "x-go-name": "RawURL" + }, + "status": { + "type": "string", + "x-go-name": "Status" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CombinedStatus": { + "description": "CombinedStatus holds the combined state of several statuses for a single commit", + "type": "object", + "properties": { + "commit_url": { + "type": "string", + "x-go-name": "CommitURL" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "state": { + "$ref": "#/definitions/CommitStatusState" + }, + "statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitStatus" + }, + "x-go-name": "Statuses" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Comment": { + "description": "Comment represents a comment on a commit or issue", + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Commit": { + "type": "object", + "title": "Commit contains information generated from a Git commit.", + "properties": { + "author": { + "$ref": "#/definitions/User" + }, + "commit": { + "$ref": "#/definitions/RepoCommit" + }, + "committer": { + "$ref": "#/definitions/User" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitAffectedFiles" + }, + "x-go-name": "Files" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "stats": { + "$ref": "#/definitions/CommitStats" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitAffectedFiles": { + "description": "CommitAffectedFiles store information about files affected by the commit", + "type": "object", + "properties": { + "filename": { + "type": "string", + "x-go-name": "Filename" + }, + "status": { + "type": "string", + "x-go-name": "Status" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitDateOptions": { + "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE", + "type": "object", + "properties": { + "author": { + "type": "string", + "format": "date-time", + "x-go-name": "Author" + }, + "committer": { + "type": "string", + "format": "date-time", + "x-go-name": "Committer" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitMeta": { + "type": "object", + "title": "CommitMeta contains meta information of a commit in terms of API.", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitStats": { + "description": "CommitStats is statistics for a RepoCommit", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "total": { + "type": "integer", + "format": "int64", + "x-go-name": "Total" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitStatus": { + "description": "CommitStatus holds a single status of a single Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "status": { + "$ref": "#/definitions/CommitStatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitStatusState": { + "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\" and \"failure\"", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitUser": { + "type": "object", + "title": "CommitUser contains information of a user in the context of a commit.", + "properties": { + "date": { + "type": "string", + "x-go-name": "Date" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Compare": { + "type": "object", + "title": "Compare represents a comparison between two commits.", + "properties": { + "commits": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + }, + "x-go-name": "Commits" + }, + "total_commits": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCommits" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ContentsResponse": { + "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", + "type": "object", + "properties": { + "_links": { + "$ref": "#/definitions/FileLinksResponse" + }, + "content": { + "description": "`content` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Content" + }, + "download_url": { + "type": "string", + "x-go-name": "DownloadURL" + }, + "encoding": { + "description": "`encoding` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Encoding" + }, + "git_url": { + "type": "string", + "x-go-name": "GitURL" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit_sha": { + "type": "string", + "x-go-name": "LastCommitSHA" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "submodule_git_url": { + "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null", + "type": "string", + "x-go-name": "SubmoduleGitURL" + }, + "target": { + "description": "`target` is populated when `type` is `symlink`, otherwise null", + "type": "string", + "x-go-name": "Target" + }, + "type": { + "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`", + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateAccessTokenOption": { + "description": "CreateAccessTokenOption options when create access token", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Scopes" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateBranchProtectionOption": { + "description": "CreateBranchProtectionOption options for creating a branch protection", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "branch_name": { + "description": "Deprecated: true", + "type": "string", + "x-go-name": "BranchName" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateBranchRepoOption": { + "description": "CreateBranchRepoOption options when creating a branch in a repository", + "type": "object", + "required": [ + "new_branch_name" + ], + "properties": { + "new_branch_name": { + "description": "Name of the branch to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "BranchName" + }, + "old_branch_name": { + "description": "Deprecated: true\nName of the old branch to create from", + "type": "string", + "uniqueItems": true, + "x-go-name": "OldBranchName" + }, + "old_ref_name": { + "description": "Name of the old branch/tag/commit to create from", + "type": "string", + "uniqueItems": true, + "x-go-name": "OldRefName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateEmailOption": { + "description": "CreateEmailOption options when creating email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to add", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateFileOptions": { + "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateForkOption": { + "description": "CreateForkOption options for creating a fork", + "type": "object", + "properties": { + "name": { + "description": "name of the forked repository", + "type": "string", + "x-go-name": "Name" + }, + "organization": { + "description": "organization name, if forking into an organization", + "type": "string", + "x-go-name": "Organization" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateGPGKeyOption": { + "description": "CreateGPGKeyOption options create user GPG key", + "type": "object", + "required": [ + "armored_public_key" + ], + "properties": { + "armored_public_key": { + "description": "An armored GPG key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "ArmoredKey" + }, + "armored_signature": { + "type": "string", + "x-go-name": "Signature" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateHookOption": { + "description": "CreateHookOption options when create a hook", + "type": "object", + "required": [ + "type", + "config" + ], + "properties": { + "active": { + "type": "boolean", + "default": false, + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "$ref": "#/definitions/CreateHookOptionConfig" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "type": { + "type": "string", + "enum": [ + "forgejo", + "dingtalk", + "discord", + "gitea", + "gogs", + "msteams", + "slack", + "telegram", + "feishu", + "wechatwork", + "packagist" + ], + "x-go-name": "Type" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateHookOptionConfig": { + "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateIssueCommentOption": { + "description": "CreateIssueCommentOption options for creating a comment on an issue", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateIssueOption": { + "description": "CreateIssueOption options to create one issue", + "type": "object", + "required": [ + "title" + ], + "properties": { + "assignee": { + "description": "deprecated", + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed": { + "type": "boolean", + "x-go-name": "Closed" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "description": "list of label ids", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "description": "milestone id", + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateKeyOption": { + "description": "CreateKeyOption options when creating a key", + "type": "object", + "required": [ + "title", + "key" + ], + "properties": { + "key": { + "description": "An armored SSH key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Key" + }, + "read_only": { + "description": "Describe if the key has only read access or read/write", + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "description": "Title of the key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateLabelOption": { + "description": "CreateLabelOption options for creating a label", + "type": "object", + "required": [ + "name", + "color" + ], + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateMilestoneOption": { + "description": "CreateMilestoneOption options for creating a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "state": { + "type": "string", + "enum": [ + "open", + "closed" + ], + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateOAuth2ApplicationOptions": { + "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application", + "type": "object", + "properties": { + "confidential_client": { + "type": "boolean", + "x-go-name": "ConfidentialClient" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "RedirectURIs" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateOrUpdateSecretOption": { + "description": "CreateOrUpdateSecretOption options when creating or updating secret", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Data of the secret to update", + "type": "string", + "x-go-name": "Data" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateOrgOption": { + "description": "CreateOrgOption options for creating an organization", + "type": "object", + "required": [ + "username" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "description": "possible values are `public` (default), `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreatePullRequestOption": { + "description": "CreatePullRequestOption options when creating a pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "head": { + "type": "string", + "x-go-name": "Head" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreatePullReviewComment": { + "description": "CreatePullReviewComment represent a review comment for creation api", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "new_position": { + "description": "if comment to new file line or 0", + "type": "integer", + "format": "int64", + "x-go-name": "NewLineNum" + }, + "old_position": { + "description": "if comment to old file line or 0", + "type": "integer", + "format": "int64", + "x-go-name": "OldLineNum" + }, + "path": { + "description": "the tree path", + "type": "string", + "x-go-name": "Path" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreatePullReviewCommentOptions": { + "description": "CreatePullReviewCommentOptions are options to create a pull review comment", + "$ref": "#/definitions/CreatePullReviewComment" + }, + "CreatePullReviewOptions": { + "description": "CreatePullReviewOptions are options to create a pull review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/definitions/CreatePullReviewComment" + }, + "x-go-name": "Comments" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "event": { + "$ref": "#/definitions/ReviewStateType" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreatePushMirrorOption": { + "type": "object", + "title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.", + "properties": { + "interval": { + "type": "string", + "x-go-name": "Interval" + }, + "remote_address": { + "type": "string", + "x-go-name": "RemoteAddress" + }, + "remote_password": { + "type": "string", + "x-go-name": "RemotePassword" + }, + "remote_username": { + "type": "string", + "x-go-name": "RemoteUsername" + }, + "sync_on_commit": { + "type": "boolean", + "x-go-name": "SyncOnCommit" + }, + "use_ssh": { + "type": "boolean", + "x-go-name": "UseSSH" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateQuotaGroupOptions": { + "description": "CreateQutaGroupOptions represents the options for creating a quota group", + "type": "object", + "properties": { + "name": { + "description": "Name of the quota group to create", + "type": "string", + "x-go-name": "Name" + }, + "rules": { + "description": "Rules to add to the newly created group.\nIf a rule does not exist, it will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/CreateQuotaRuleOptions" + }, + "x-go-name": "Rules" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateQuotaRuleOptions": { + "description": "CreateQuotaRuleOptions represents the options for creating a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "name": { + "description": "Name of the rule to create", + "type": "string", + "x-go-name": "Name" + }, + "subjects": { + "description": "The subjects affected by the rule", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateReleaseOption": { + "description": "CreateReleaseOption options when creating a release", + "type": "object", + "required": [ + "tag_name" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateRepoOption": { + "description": "CreateRepoOption options when creating repository", + "type": "object", + "required": [ + "name" + ], + "properties": { + "auto_init": { + "description": "Whether the repository should be auto-initialized?", + "type": "boolean", + "x-go-name": "AutoInit" + }, + "default_branch": { + "description": "DefaultBranch of the repository (used when initializes and in template)", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" + }, + "gitignores": { + "description": "Gitignores to use", + "type": "string", + "x-go-name": "Gitignores" + }, + "issue_labels": { + "description": "Label-Set to use", + "type": "string", + "x-go-name": "IssueLabels" + }, + "license": { + "description": "License to use", + "type": "string", + "x-go-name": "License" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": [ + "sha1", + "sha256" + ], + "x-go-name": "ObjectFormatName" + }, + "private": { + "description": "Whether the repository is private", + "type": "boolean", + "x-go-name": "Private" + }, + "readme": { + "description": "Readme of the repository to create", + "type": "string", + "x-go-name": "Readme" + }, + "template": { + "description": "Whether the repository is template", + "type": "boolean", + "x-go-name": "Template" + }, + "trust_model": { + "description": "TrustModel of the repository", + "type": "string", + "enum": [ + "default", + "collaborator", + "committer", + "collaboratorcommitter" + ], + "x-go-name": "TrustModel" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateStatusOption": { + "description": "CreateStatusOption holds the information needed to create a new CommitStatus for a Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "state": { + "$ref": "#/definitions/CommitStatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateTagOption": { + "description": "CreateTagOption options when creating a tag", + "type": "object", + "required": [ + "tag_name" + ], + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateTagProtectionOption": { + "description": "CreateTagProtectionOption options for creating a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateTeamOption": { + "description": "CreateTeamOption options for creating a team", + "type": "object", + "required": [ + "name" + ], + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.actions", + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.ext_wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": "{\"repo.actions\",\"repo.packages\",\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"}" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateUserOption": { + "description": "CreateUserOption create user options", + "type": "object", + "required": [ + "username", + "email" + ], + "properties": { + "created_at": { + "description": "For explicitly setting the user creation timestamp. Useful when users are\nmigrated from other systems. When omitted, the user's creation timestamp\nwill be set to \"now\".", + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "restricted": { + "type": "boolean", + "x-go-name": "Restricted" + }, + "send_notify": { + "type": "boolean", + "x-go-name": "SendNotify" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "username": { + "type": "string", + "x-go-name": "Username" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateVariableOption": { + "description": "CreateVariableOption the option when creating variable", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "Value of the variable to create", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateWikiPageOptions": { + "description": "CreateWikiPageOptions form for creating wiki", + "type": "object", + "properties": { + "content_base64": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "message": { + "description": "optional commit message summarizing the change", + "type": "string", + "x-go-name": "Message" + }, + "title": { + "description": "page title. leave empty to keep unchanged", + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Cron": { + "description": "Cron represents a Cron task", + "type": "object", + "properties": { + "exec_times": { + "type": "integer", + "format": "int64", + "x-go-name": "ExecTimes" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "next": { + "type": "string", + "format": "date-time", + "x-go-name": "Next" + }, + "prev": { + "type": "string", + "format": "date-time", + "x-go-name": "Prev" + }, + "schedule": { + "type": "string", + "x-go-name": "Schedule" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteEmailOption": { + "description": "DeleteEmailOption options when deleting email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to delete", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteFileOptions": { + "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteLabelsOption": { + "description": "DeleteLabelOption options for deleting a label", + "type": "object", + "properties": { + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeployKey": { + "description": "DeployKey a deploy key", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_id": { + "type": "integer", + "format": "int64", + "x-go-name": "KeyID" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DismissPullReviewOptions": { + "description": "DismissPullReviewOptions are options to dismiss a pull review", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "priors": { + "type": "boolean", + "x-go-name": "Priors" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DispatchWorkflowOption": { + "description": "DispatchWorkflowOption options when dispatching a workflow", + "type": "object", + "required": [ + "ref" + ], + "properties": { + "inputs": { + "description": "Input keys and values configured in the workflow file.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Inputs" + }, + "ref": { + "description": "Git reference for the workflow", + "type": "string", + "x-go-name": "Ref" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditAttachmentOptions": { + "description": "EditAttachmentOptions options for editing attachments", + "type": "object", + "properties": { + "browser_download_url": { + "description": "(Can only be set if existing attachment is of external type)", + "type": "string", + "x-go-name": "DownloadURL" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditBranchProtectionOption": { + "description": "EditBranchProtectionOption options for editing a branch protection", + "type": "object", + "properties": { + "apply_to_admins": { + "type": "boolean", + "x-go-name": "ApplyToAdmins" + }, + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "approvals_whitelist_username": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistUsernames" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "merge_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistUsernames" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_deploy_keys": { + "type": "boolean", + "x-go-name": "PushWhitelistDeployKeys" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "push_whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistUsernames" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditDeadlineOption": { + "description": "EditDeadlineOption options for creating a deadline", + "type": "object", + "required": [ + "due_date" + ], + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditGitHookOption": { + "description": "EditGitHookOption options when modifying one Git hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditHookOption": { + "description": "EditHookOption options when modify one hook", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditIssueCommentOption": { + "description": "EditIssueCommentOption options for editing a comment", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditIssueOption": { + "description": "EditIssueOption options for editing an issue", + "type": "object", + "properties": { + "assignee": { + "description": "deprecated", + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "unset_due_date": { + "type": "boolean", + "x-go-name": "RemoveDeadline" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditLabelOption": { + "description": "EditLabelOption options for editing a label", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditMilestoneOption": { + "description": "EditMilestoneOption options for editing a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditOrgOption": { + "description": "EditOrgOption options for editing an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "visibility": { + "description": "possible values are `public`, `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditPullRequestOption": { + "description": "EditPullRequestOption options when modify pull request", + "type": "object", + "properties": { + "allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "AllowMaintainerEdit" + }, + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "state": { + "type": "string", + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "unset_due_date": { + "type": "boolean", + "x-go-name": "RemoveDeadline" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditQuotaRuleOptions": { + "description": "EditQuotaRuleOptions represents the options for editing a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "subjects": { + "description": "The subjects affected by the rule", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditReactionOption": { + "description": "EditReactionOption contain the reaction type", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Reaction" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditReleaseOption": { + "description": "EditReleaseOption options when editing a release", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditRepoOption": { + "description": "EditRepoOption options when editing a repository's properties", + "type": "object", + "properties": { + "allow_fast_forward_only_merge": { + "description": "either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.", + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_manual_merge": { + "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it.", + "type": "boolean", + "x-go-name": "AllowManualMerge" + }, + "allow_merge_commits": { + "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.", + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_rebase_update": { + "description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it.", + "type": "boolean", + "x-go-name": "AllowRebaseUpdate" + }, + "allow_squash_merge": { + "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "description": "set to `true` to archive this repository.", + "type": "boolean", + "x-go-name": "Archived" + }, + "autodetect_manual_merge": { + "description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.", + "type": "boolean", + "x-go-name": "AutodetectManualMerge" + }, + "default_allow_maintainer_edit": { + "description": "set to `true` to allow edits from maintainers by default", + "type": "boolean", + "x-go-name": "DefaultAllowMaintainerEdit" + }, + "default_branch": { + "description": "sets the default branch for this repository.", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "default_delete_branch_after_merge": { + "description": "set to `true` to delete pr branch after merge by default", + "type": "boolean", + "x-go-name": "DefaultDeleteBranchAfterMerge" + }, + "default_merge_style": { + "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\".", + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "description": { + "description": "a short description of the repository.", + "type": "string", + "x-go-name": "Description" + }, + "enable_prune": { + "description": "enable prune - remove obsolete remote-tracking references when mirroring", + "type": "boolean", + "x-go-name": "EnablePrune" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "globally_editable_wiki": { + "description": "set the globally editable state of the wiki", + "type": "boolean", + "x-go-name": "GloballyEditableWiki" + }, + "has_actions": { + "description": "either `true` to enable actions unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasActions" + }, + "has_issues": { + "description": "either `true` to enable issues for this repository or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_packages": { + "description": "either `true` to enable packages unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasPackages" + }, + "has_projects": { + "description": "either `true` to enable project unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasProjects" + }, + "has_pull_requests": { + "description": "either `true` to allow pull requests, or `false` to prevent pull request.", + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_releases": { + "description": "either `true` to enable releases unit, or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasReleases" + }, + "has_wiki": { + "description": "either `true` to enable the wiki for this repository or `false` to disable it.", + "type": "boolean", + "x-go-name": "HasWiki" + }, + "ignore_whitespace_conflicts": { + "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.", + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "mirror_interval": { + "description": "set to a string like `8h30m0s` to set the mirror interval time", + "type": "string", + "x-go-name": "MirrorInterval" + }, + "name": { + "description": "name of the repository", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.", + "type": "boolean", + "x-go-name": "Private" + }, + "template": { + "description": "either `true` to make this repository a template or `false` to make it a normal repository", + "type": "boolean", + "x-go-name": "Template" + }, + "website": { + "description": "a URL with more information about the repository.", + "type": "string", + "x-go-name": "Website" + }, + "wiki_branch": { + "description": "sets the branch used for this repository's wiki.", + "type": "string", + "x-go-name": "WikiBranch" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditTagProtectionOption": { + "description": "EditTagProtectionOption options for editing a tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditTeamOption": { + "description": "EditTeamOption options for editing a team", + "type": "object", + "required": [ + "name" + ], + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": { + "repo.code": "read", + "repo.ext_issues": "none", + "repo.ext_wiki": "none", + "repo.issues": "write", + "repo.projects": "none", + "repo.pulls": "owner", + "repo.releases": "none", + "repo.wiki": "admin" + } + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditUserOption": { + "description": "EditUserOption edit user options", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "allow_create_organization": { + "type": "boolean", + "x-go-name": "AllowCreateOrganization" + }, + "allow_git_hook": { + "type": "boolean", + "x-go-name": "AllowGitHook" + }, + "allow_import_local": { + "type": "boolean", + "x-go-name": "AllowImportLocal" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "max_repo_creation": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxRepoCreation" + }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "prohibit_login": { + "type": "boolean", + "x-go-name": "ProhibitLogin" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "restricted": { + "type": "boolean", + "x-go-name": "Restricted" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Email": { + "description": "Email an email address belonging to a user", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "primary": { + "type": "boolean", + "x-go-name": "Primary" + }, + "user_id": { + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalTracker": { + "description": "ExternalTracker represents settings for external tracker", + "type": "object", + "properties": { + "external_tracker_format": { + "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.", + "type": "string", + "x-go-name": "ExternalTrackerFormat" + }, + "external_tracker_regexp_pattern": { + "description": "External Issue Tracker issue regular expression", + "type": "string", + "x-go-name": "ExternalTrackerRegexpPattern" + }, + "external_tracker_style": { + "description": "External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`", + "type": "string", + "x-go-name": "ExternalTrackerStyle" + }, + "external_tracker_url": { + "description": "URL of external issue tracker.", + "type": "string", + "x-go-name": "ExternalTrackerURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalWiki": { + "description": "ExternalWiki represents setting for external wiki", + "type": "object", + "properties": { + "external_wiki_url": { + "description": "URL of external wiki.", + "type": "string", + "x-go-name": "ExternalWikiURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileCommitResponse": { + "type": "object", + "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse contains information about a repo's file that was deleted", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "x-go-name": "Content" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileLinksResponse": { + "description": "FileLinksResponse contains the links for a repo's file", + "type": "object", + "properties": { + "git": { + "type": "string", + "x-go-name": "GitURL" + }, + "html": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "self": { + "type": "string", + "x-go-name": "Self" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileResponse": { + "description": "FileResponse contains information about a repo's file", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "$ref": "#/definitions/ContentsResponse" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FilesResponse": { + "description": "FilesResponse contains information about multiple files from a repo", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + }, + "x-go-name": "Files" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ForgeLike": { + "description": "ForgeLike activity data type", + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/forgefed" + }, + "GPGKey": { + "description": "GPGKey a user GPG key to sign commit and tag in repository", + "type": "object", + "properties": { + "can_certify": { + "type": "boolean", + "x-go-name": "CanCertify" + }, + "can_encrypt_comms": { + "type": "boolean", + "x-go-name": "CanEncryptComms" + }, + "can_encrypt_storage": { + "type": "boolean", + "x-go-name": "CanEncryptStorage" + }, + "can_sign": { + "type": "boolean", + "x-go-name": "CanSign" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "emails": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKeyEmail" + }, + "x-go-name": "Emails" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Expires" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key_id": { + "type": "string", + "x-go-name": "KeyID" + }, + "primary_key_id": { + "type": "string", + "x-go-name": "PrimaryKeyID" + }, + "public_key": { + "type": "string", + "x-go-name": "PublicKey" + }, + "subkeys": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + }, + "x-go-name": "SubsKey" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GPGKeyEmail": { + "description": "GPGKeyEmail an email attached to a GPGKey", + "type": "object", + "properties": { + "email": { + "type": "string", + "x-go-name": "Email" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GeneralAPISettings": { + "description": "GeneralAPISettings contains global api settings exposed by it", + "type": "object", + "properties": { + "default_git_trees_per_page": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultGitTreesPerPage" + }, + "default_max_blob_size": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultMaxBlobSize" + }, + "default_paging_num": { + "type": "integer", + "format": "int64", + "x-go-name": "DefaultPagingNum" + }, + "max_response_items": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxResponseItems" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GeneralAttachmentSettings": { + "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API", + "type": "object", + "properties": { + "allowed_types": { + "type": "string", + "x-go-name": "AllowedTypes" + }, + "enabled": { + "type": "boolean", + "x-go-name": "Enabled" + }, + "max_files": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxFiles" + }, + "max_size": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxSize" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GeneralRepoSettings": { + "description": "GeneralRepoSettings contains global repository settings exposed by API", + "type": "object", + "properties": { + "forks_disabled": { + "type": "boolean", + "x-go-name": "ForksDisabled" + }, + "http_git_disabled": { + "type": "boolean", + "x-go-name": "HTTPGitDisabled" + }, + "lfs_disabled": { + "type": "boolean", + "x-go-name": "LFSDisabled" + }, + "migrations_disabled": { + "type": "boolean", + "x-go-name": "MigrationsDisabled" + }, + "mirrors_disabled": { + "type": "boolean", + "x-go-name": "MirrorsDisabled" + }, + "stars_disabled": { + "type": "boolean", + "x-go-name": "StarsDisabled" + }, + "time_tracking_disabled": { + "type": "boolean", + "x-go-name": "TimeTrackingDisabled" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GeneralUISettings": { + "description": "GeneralUISettings contains global ui settings exposed by API", + "type": "object", + "properties": { + "allowed_reactions": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AllowedReactions" + }, + "custom_emojis": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "CustomEmojis" + }, + "default_theme": { + "type": "string", + "x-go-name": "DefaultTheme" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GenerateRepoOption": { + "description": "GenerateRepoOption options when creating repository using a template", + "type": "object", + "required": [ + "owner", + "name" + ], + "properties": { + "avatar": { + "description": "include avatar of the template repo", + "type": "boolean", + "x-go-name": "Avatar" + }, + "default_branch": { + "description": "Default branch of the new repository", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" + }, + "git_content": { + "description": "include git content of default branch in template repo", + "type": "boolean", + "x-go-name": "GitContent" + }, + "git_hooks": { + "description": "include git hooks in template repo", + "type": "boolean", + "x-go-name": "GitHooks" + }, + "labels": { + "description": "include labels in template repo", + "type": "boolean", + "x-go-name": "Labels" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "owner": { + "description": "The organization or person who will own the new repository", + "type": "string", + "x-go-name": "Owner" + }, + "private": { + "description": "Whether the repository is private", + "type": "boolean", + "x-go-name": "Private" + }, + "protected_branch": { + "description": "include protected branches in template repo", + "type": "boolean", + "x-go-name": "ProtectedBranch" + }, + "topics": { + "description": "include topics in template repo", + "type": "boolean", + "x-go-name": "Topics" + }, + "webhooks": { + "description": "include webhooks in template repo", + "type": "boolean", + "x-go-name": "Webhooks" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitBlobResponse": { + "description": "GitBlobResponse represents a git blob", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "encoding": { + "type": "string", + "x-go-name": "Encoding" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitEntry": { + "description": "GitEntry represents a git tree", + "type": "object", + "properties": { + "mode": { + "type": "string", + "x-go-name": "Mode" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitHook": { + "description": "GitHook represents a Git repository hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "is_active": { + "type": "boolean", + "x-go-name": "IsActive" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitObject": { + "type": "object", + "title": "GitObject represents a Git object.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitTreeResponse": { + "description": "GitTreeResponse returns a git tree", + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int64", + "x-go-name": "Page" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "tree": { + "type": "array", + "items": { + "$ref": "#/definitions/GitEntry" + }, + "x-go-name": "Entries" + }, + "truncated": { + "type": "boolean", + "x-go-name": "Truncated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo name and text of a gitignore template", + "type": "object", + "properties": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "source": { + "type": "string", + "x-go-name": "Source" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Hook": { + "description": "Hook a hook is a web hook when one repository changed", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "authorization_header": { + "type": "string", + "x-go-name": "AuthorizationHeader" + }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, + "config": { + "description": "Deprecated: use Metadata instead", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "content_type": { + "type": "string", + "x-go-name": "ContentType" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "metadata": { + "x-go-name": "Metadata" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Identity": { + "description": "Identity for a person's identity like an author or committer", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "InternalTracker": { + "description": "InternalTracker represents settings for internal tracker", + "type": "object", + "properties": { + "allow_only_contributors_to_track_time": { + "description": "Let only contributors track time (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "AllowOnlyContributorsToTrackTime" + }, + "enable_issue_dependencies": { + "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableIssueDependencies" + }, + "enable_time_tracker": { + "description": "Enable time tracking (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableTimeTracker" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Issue": { + "description": "Issue represents an issue in a repository", + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_locked": { + "type": "boolean", + "x-go-name": "IsLocked" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, + "pull_request": { + "$ref": "#/definitions/PullRequestMeta" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repository": { + "$ref": "#/definitions/RepositoryMeta" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueConfig": { + "type": "object", + "properties": { + "blank_issues_enabled": { + "type": "boolean", + "x-go-name": "BlankIssuesEnabled" + }, + "contact_links": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueConfigContactLink" + }, + "x-go-name": "ContactLinks" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueConfigContactLink": { + "type": "object", + "properties": { + "about": { + "type": "string", + "x-go-name": "About" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueConfigValidation": { + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "valid": { + "type": "boolean", + "x-go-name": "Valid" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueDeadline": { + "description": "IssueDeadline represents an issue deadline", + "type": "object", + "properties": { + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueFormField": { + "description": "IssueFormField represents a form field", + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Attributes" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "type": { + "$ref": "#/definitions/IssueFormFieldType" + }, + "validations": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Validations" + }, + "visible": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormFieldVisible" + }, + "x-go-name": "Visible" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueFormFieldType": { + "type": "string", + "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueFormFieldVisible": { + "description": "IssueFormFieldVisible defines issue form field visible", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueLabelsOption": { + "description": "IssueLabelsOption a collection of labels", + "type": "object", + "properties": { + "labels": { + "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", + "type": "array", + "items": {}, + "x-go-name": "Labels" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueMeta": { + "description": "IssueMeta basic issue information", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "owner": { + "type": "string", + "x-go-name": "Owner" + }, + "repo": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueTemplate": { + "description": "IssueTemplate represents an issue template for a repository", + "type": "object", + "properties": { + "about": { + "type": "string", + "x-go-name": "About" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormField" + }, + "x-go-name": "Fields" + }, + "content": { + "type": "string", + "x-go-name": "Content" + }, + "file_name": { + "type": "string", + "x-go-name": "FileName" + }, + "labels": { + "$ref": "#/definitions/IssueTemplateLabels" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueTemplateLabels": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Label": { + "description": "Label a label to an issue or a pr", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_archived": { + "type": "boolean", + "x-go-name": "IsArchived", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LabelTemplate": { + "description": "LabelTemplate info of a Label template", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "exclusive": { + "type": "boolean", + "x-go-name": "Exclusive", + "example": false + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LicenseTemplateInfo": { + "description": "LicensesInfo contains information about a License", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "implementation": { + "type": "string", + "x-go-name": "Implementation" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "LicensesTemplateListEntry": { + "description": "LicensesListEntry is used for the API", + "type": "object", + "properties": { + "key": { + "type": "string", + "x-go-name": "Key" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MarkdownOption": { + "description": "MarkdownOption markdown options", + "type": "object", + "properties": { + "Context": { + "description": "Context to render\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render (comment, gfm, markdown)\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markdown to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MarkupOption": { + "description": "MarkupOption markup options", + "type": "object", + "properties": { + "Context": { + "description": "Context to render\n\nin: body", + "type": "string" + }, + "FilePath": { + "description": "File path for detecting extension in file mode\n\nin: body", + "type": "string" + }, + "Mode": { + "description": "Mode to render (comment, gfm, markdown, file)\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markup to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MergePullRequestOption": { + "description": "MergePullRequestForm form for merging Pull Request", + "type": "object", + "required": [ + "Do" + ], + "properties": { + "Do": { + "type": "string", + "enum": [ + "merge", + "rebase", + "rebase-merge", + "squash", + "fast-forward-only", + "manually-merged" + ] + }, + "MergeCommitID": { + "type": "string" + }, + "MergeMessageField": { + "type": "string" + }, + "MergeTitleField": { + "type": "string" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_merge": { + "type": "boolean", + "x-go-name": "ForceMerge" + }, + "head_commit_id": { + "type": "string", + "x-go-name": "HeadCommitID" + }, + "merge_when_checks_succeed": { + "type": "boolean", + "x-go-name": "MergeWhenChecksSucceed" + } + }, + "x-go-name": "MergePullRequestForm", + "x-go-package": "code.gitea.io/gitea/services/forms" + }, + "MigrateRepoOptions": { + "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1", + "type": "object", + "required": [ + "clone_addr", + "repo_name" + ], + "properties": { + "auth_password": { + "type": "string", + "x-go-name": "AuthPassword" + }, + "auth_token": { + "type": "string", + "x-go-name": "AuthToken" + }, + "auth_username": { + "type": "string", + "x-go-name": "AuthUsername" + }, + "clone_addr": { + "type": "string", + "x-go-name": "CloneAddr" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "labels": { + "type": "boolean", + "x-go-name": "Labels" + }, + "lfs": { + "type": "boolean", + "x-go-name": "LFS" + }, + "lfs_endpoint": { + "type": "string", + "x-go-name": "LFSEndpoint" + }, + "milestones": { + "type": "boolean", + "x-go-name": "Milestones" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "mirror_interval": { + "type": "string", + "x-go-name": "MirrorInterval" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + }, + "releases": { + "type": "boolean", + "x-go-name": "Releases" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "repo_owner": { + "description": "Name of User or Organisation who will own Repo after migration", + "type": "string", + "x-go-name": "RepoOwner" + }, + "service": { + "type": "string", + "enum": [ + "git", + "github", + "gitea", + "gitlab", + "gogs", + "onedev", + "gitbucket", + "codebase" + ], + "x-go-name": "Service" + }, + "uid": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "RepoOwnerID" + }, + "wiki": { + "type": "boolean", + "x-go-name": "Wiki" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Milestone": { + "description": "Milestone milestone is a collection of issues on one repository", + "type": "object", + "properties": { + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "closed_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "ClosedIssues" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "open_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NewIssuePinsAllowed": { + "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed", + "type": "object", + "properties": { + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NodeInfo": { + "description": "NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks", + "type": "object", + "properties": { + "metadata": { + "type": "object", + "x-go-name": "Metadata" + }, + "openRegistrations": { + "type": "boolean", + "x-go-name": "OpenRegistrations" + }, + "protocols": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Protocols" + }, + "services": { + "$ref": "#/definitions/NodeInfoServices" + }, + "software": { + "$ref": "#/definitions/NodeInfoSoftware" + }, + "usage": { + "$ref": "#/definitions/NodeInfoUsage" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NodeInfoServices": { + "description": "NodeInfoServices contains the third party sites this server can connect to via their application API", + "type": "object", + "properties": { + "inbound": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Inbound" + }, + "outbound": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Outbound" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NodeInfoSoftware": { + "description": "NodeInfoSoftware contains Metadata about server software in use", + "type": "object", + "properties": { + "homepage": { + "type": "string", + "x-go-name": "Homepage" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "repository": { + "type": "string", + "x-go-name": "Repository" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NodeInfoUsage": { + "description": "NodeInfoUsage contains usage statistics for this server", + "type": "object", + "properties": { + "localComments": { + "type": "integer", + "format": "int64", + "x-go-name": "LocalComments" + }, + "localPosts": { + "type": "integer", + "format": "int64", + "x-go-name": "LocalPosts" + }, + "users": { + "$ref": "#/definitions/NodeInfoUsageUsers" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NodeInfoUsageUsers": { + "description": "NodeInfoUsageUsers contains statistics about the users of this server", + "type": "object", + "properties": { + "activeHalfyear": { + "type": "integer", + "format": "int64", + "x-go-name": "ActiveHalfyear" + }, + "activeMonth": { + "type": "integer", + "format": "int64", + "x-go-name": "ActiveMonth" + }, + "total": { + "type": "integer", + "format": "int64", + "x-go-name": "Total" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Note": { + "description": "Note contains information related to a git note", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/Commit" + }, + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NotificationCount": { + "description": "NotificationCount number of unread notifications", + "type": "object", + "properties": { + "new": { + "type": "integer", + "format": "int64", + "x-go-name": "New" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NotificationSubject": { + "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)", + "type": "object", + "properties": { + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "latest_comment_html_url": { + "type": "string", + "x-go-name": "LatestCommentHTMLURL" + }, + "latest_comment_url": { + "type": "string", + "x-go-name": "LatestCommentURL" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "type": { + "$ref": "#/definitions/NotifySubjectType" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NotificationThread": { + "description": "NotificationThread expose Notification on API", + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "pinned": { + "type": "boolean", + "x-go-name": "Pinned" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "subject": { + "$ref": "#/definitions/NotificationSubject" + }, + "unread": { + "type": "boolean", + "x-go-name": "Unread" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "UpdatedAt" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "NotifySubjectType": { + "description": "NotifySubjectType represent type of notification subject", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "OAuth2Application": { + "type": "object", + "title": "OAuth2Application represents an OAuth2 application.", + "properties": { + "client_id": { + "type": "string", + "x-go-name": "ClientID" + }, + "client_secret": { + "type": "string", + "x-go-name": "ClientSecret" + }, + "confidential_client": { + "type": "boolean", + "x-go-name": "ConfidentialClient" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "RedirectURIs" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Organization": { + "description": "Organization represents an organization", + "type": "object", + "properties": { + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "username": { + "description": "deprecated", + "type": "string", + "x-go-name": "UserName" + }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "OrganizationPermissions": { + "description": "OrganizationPermissions list different users permissions on an organization", + "type": "object", + "properties": { + "can_create_repository": { + "type": "boolean", + "x-go-name": "CanCreateRepository" + }, + "can_read": { + "type": "boolean", + "x-go-name": "CanRead" + }, + "can_write": { + "type": "boolean", + "x-go-name": "CanWrite" + }, + "is_admin": { + "type": "boolean", + "x-go-name": "IsAdmin" + }, + "is_owner": { + "type": "boolean", + "x-go-name": "IsOwner" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PRBranchInfo": { + "description": "PRBranchInfo information about a branch", + "type": "object", + "properties": { + "label": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "sha": { + "type": "string", + "x-go-name": "Sha" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Package": { + "description": "Package represents a package", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "repository": { + "$ref": "#/definitions/Repository" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PackageFile": { + "description": "PackageFile represents a package file", + "type": "object", + "properties": { + "Size": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "md5": { + "type": "string", + "x-go-name": "HashMD5" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sha1": { + "type": "string", + "x-go-name": "HashSHA1" + }, + "sha256": { + "type": "string", + "x-go-name": "HashSHA256" + }, + "sha512": { + "type": "string", + "x-go-name": "HashSHA512" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadCommit": { + "description": "PayloadCommit represents a commit", + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Added" + }, + "author": { + "$ref": "#/definitions/PayloadUser" + }, + "committer": { + "$ref": "#/definitions/PayloadUser" + }, + "id": { + "description": "sha1 hash of the commit", + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Modified" + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Removed" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-go-name": "Timestamp" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadCommitVerification": { + "description": "PayloadCommitVerification represents the GPG verification of a commit", + "type": "object", + "properties": { + "payload": { + "type": "string", + "x-go-name": "Payload" + }, + "reason": { + "type": "string", + "x-go-name": "Reason" + }, + "signature": { + "type": "string", + "x-go-name": "Signature" + }, + "signer": { + "$ref": "#/definitions/PayloadUser" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PayloadUser": { + "description": "PayloadUser represents the author or committer of a commit", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "description": "Full name of the commit author", + "type": "string", + "x-go-name": "Name" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Permission": { + "description": "Permission represents a set of permissions", + "type": "object", + "properties": { + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "pull": { + "type": "boolean", + "x-go-name": "Pull" + }, + "push": { + "type": "boolean", + "x-go-name": "Push" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PublicKey": { + "description": "PublicKey publickey is a user key to push code to repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "fingerprint": { + "type": "string", + "x-go-name": "Fingerprint" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "key": { + "type": "string", + "x-go-name": "Key" + }, + "key_type": { + "type": "string", + "x-go-name": "KeyType" + }, + "read_only": { + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequest": { + "description": "PullRequest represents a pull request", + "type": "object", + "properties": { + "additions": { + "type": "integer", + "format": "int64", + "x-go-name": "Additions" + }, + "allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "AllowMaintainerEdit" + }, + "assignee": { + "$ref": "#/definitions/User" + }, + "assignees": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "Assignees" + }, + "base": { + "$ref": "#/definitions/PRBranchInfo" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "changed_files": { + "type": "integer", + "format": "int64", + "x-go-name": "ChangedFiles" + }, + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "deletions": { + "type": "integer", + "format": "int64", + "x-go-name": "Deletions" + }, + "diff_url": { + "type": "string", + "x-go-name": "DiffURL" + }, + "draft": { + "type": "boolean", + "x-go-name": "Draft" + }, + "due_date": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "head": { + "$ref": "#/definitions/PRBranchInfo" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_locked": { + "type": "boolean", + "x-go-name": "IsLocked" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "merge_base": { + "type": "string", + "x-go-name": "MergeBase" + }, + "merge_commit_sha": { + "type": "string", + "x-go-name": "MergedCommitID" + }, + "mergeable": { + "type": "boolean", + "x-go-name": "Mergeable" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + }, + "merged_by": { + "$ref": "#/definitions/User" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "patch_url": { + "type": "string", + "x-go-name": "PatchURL" + }, + "pin_order": { + "type": "integer", + "format": "int64", + "x-go-name": "PinOrder" + }, + "requested_reviewers": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "x-go-name": "RequestedReviewers" + }, + "requested_reviewers_teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "RequestedReviewersTeams" + }, + "review_comments": { + "description": "number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)", + "type": "integer", + "format": "int64", + "x-go-name": "ReviewComments" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequestMeta": { + "description": "PullRequestMeta PR info if an issue is a PR", + "type": "object", + "properties": { + "draft": { + "type": "boolean", + "x-go-name": "IsWorkInProgress" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullReview": { + "description": "PullReview represents a pull request review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments_count": { + "type": "integer", + "format": "int64", + "x-go-name": "CodeCommentsCount" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "dismissed": { + "type": "boolean", + "x-go-name": "Dismissed" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "official": { + "type": "boolean", + "x-go-name": "Official" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "HTMLPullURL" + }, + "stale": { + "type": "boolean", + "x-go-name": "Stale" + }, + "state": { + "$ref": "#/definitions/ReviewStateType" + }, + "submitted_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Submitted" + }, + "team": { + "$ref": "#/definitions/Team" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullReviewComment": { + "description": "PullReviewComment represents a comment on a pull request review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "commit_id": { + "type": "string", + "x-go-name": "CommitID" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "diff_hunk": { + "type": "string", + "x-go-name": "DiffHunk" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "original_commit_id": { + "type": "string", + "x-go-name": "OrigCommitID" + }, + "original_position": { + "type": "integer", + "format": "uint64", + "x-go-name": "OldLineNum" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "position": { + "type": "integer", + "format": "uint64", + "x-go-name": "LineNum" + }, + "pull_request_review_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ReviewID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "HTMLPullURL" + }, + "resolver": { + "$ref": "#/definitions/User" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullReviewRequestOptions": { + "description": "PullReviewRequestOptions are options to add or remove pull review requests", + "type": "object", + "properties": { + "reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Reviewers" + }, + "team_reviewers": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TeamReviewers" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PushMirror": { + "description": "PushMirror represents information of a push mirror", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedUnix" + }, + "interval": { + "type": "string", + "x-go-name": "Interval" + }, + "last_error": { + "type": "string", + "x-go-name": "LastError" + }, + "last_update": { + "type": "string", + "format": "date-time", + "x-go-name": "LastUpdateUnix" + }, + "public_key": { + "type": "string", + "x-go-name": "PublicKey" + }, + "remote_address": { + "type": "string", + "x-go-name": "RemoteAddress" + }, + "remote_name": { + "type": "string", + "x-go-name": "RemoteName" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "sync_on_commit": { + "type": "boolean", + "x-go-name": "SyncOnCommit" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaGroup": { + "description": "QuotaGroup represents a quota group", + "type": "object", + "properties": { + "name": { + "description": "Name of the group", + "type": "string", + "x-go-name": "Name" + }, + "rules": { + "description": "Rules associated with the group", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaRuleInfo" + }, + "x-go-name": "Rules" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaGroupList": { + "description": "QuotaGroupList represents a list of quota groups", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaGroup" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaInfo": { + "description": "QuotaInfo represents information about a user's quota", + "type": "object", + "properties": { + "groups": { + "$ref": "#/definitions/QuotaGroupList" + }, + "used": { + "$ref": "#/definitions/QuotaUsed" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaRuleInfo": { + "description": "QuotaRuleInfo contains information about a quota rule", + "type": "object", + "properties": { + "limit": { + "description": "The limit set by the rule", + "type": "integer", + "format": "int64", + "x-go-name": "Limit" + }, + "name": { + "description": "Name of the rule (only shown to admins)", + "type": "string", + "x-go-name": "Name" + }, + "subjects": { + "description": "Subjects the rule affects", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Subjects" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsed": { + "description": "QuotaUsed represents the quota usage of a user", + "type": "object", + "properties": { + "size": { + "$ref": "#/definitions/QuotaUsedSize" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedArtifact": { + "description": "QuotaUsedArtifact represents an artifact counting towards a user's quota", + "type": "object", + "properties": { + "html_url": { + "description": "HTML URL to the action run containing the artifact", + "type": "string", + "x-go-name": "HTMLURL" + }, + "name": { + "description": "Name of the artifact", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the artifact (compressed)", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedArtifactList": { + "description": "QuotaUsedArtifactList represents a list of artifacts counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedArtifact" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedAttachment": { + "description": "QuotaUsedAttachment represents an attachment counting towards a user's quota", + "type": "object", + "properties": { + "api_url": { + "description": "API URL for the attachment", + "type": "string", + "x-go-name": "APIURL" + }, + "contained_in": { + "description": "Context for the attachment: URLs to the containing object", + "type": "object", + "properties": { + "api_url": { + "description": "API URL for the object that contains this attachment", + "type": "string", + "x-go-name": "APIURL" + }, + "html_url": { + "description": "HTML URL for the object that contains this attachment", + "type": "string", + "x-go-name": "HTMLURL" + } + }, + "x-go-name": "ContainedIn" + }, + "name": { + "description": "Filename of the attachment", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the attachment (in bytes)", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedAttachmentList": { + "description": "QuotaUsedAttachmentList represents a list of attachment counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedAttachment" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedPackage": { + "description": "QuotaUsedPackage represents a package counting towards a user's quota", + "type": "object", + "properties": { + "html_url": { + "description": "HTML URL to the package version", + "type": "string", + "x-go-name": "HTMLURL" + }, + "name": { + "description": "Name of the package", + "type": "string", + "x-go-name": "Name" + }, + "size": { + "description": "Size of the package version", + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "description": "Type of the package", + "type": "string", + "x-go-name": "Type" + }, + "version": { + "description": "Version of the package", + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedPackageList": { + "description": "QuotaUsedPackageList represents a list of packages counting towards a user's quota", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsedPackage" + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSize": { + "description": "QuotaUsedSize represents the size-based quota usage of a user", + "type": "object", + "properties": { + "assets": { + "$ref": "#/definitions/QuotaUsedSizeAssets" + }, + "git": { + "$ref": "#/definitions/QuotaUsedSizeGit" + }, + "repos": { + "$ref": "#/definitions/QuotaUsedSizeRepos" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSizeAssets": { + "description": "QuotaUsedSizeAssets represents the size-based asset usage of a user", + "type": "object", + "properties": { + "artifacts": { + "description": "Storage size used for the user's artifacts", + "type": "integer", + "format": "int64", + "x-go-name": "Artifacts" + }, + "attachments": { + "$ref": "#/definitions/QuotaUsedSizeAssetsAttachments" + }, + "packages": { + "$ref": "#/definitions/QuotaUsedSizeAssetsPackages" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSizeAssetsAttachments": { + "description": "QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user", + "type": "object", + "properties": { + "issues": { + "description": "Storage size used for the user's issue \u0026 comment attachments", + "type": "integer", + "format": "int64", + "x-go-name": "Issues" + }, + "releases": { + "description": "Storage size used for the user's release attachments", + "type": "integer", + "format": "int64", + "x-go-name": "Releases" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSizeAssetsPackages": { + "description": "QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user", + "type": "object", + "properties": { + "all": { + "description": "Storage suze used for the user's packages", + "type": "integer", + "format": "int64", + "x-go-name": "All" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSizeGit": { + "description": "QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user", + "type": "object", + "properties": { + "LFS": { + "description": "Storage size of the user's Git LFS objects", + "type": "integer", + "format": "int64" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "QuotaUsedSizeRepos": { + "description": "QuotaUsedSizeRepos represents the size-based repository quota usage of a user", + "type": "object", + "properties": { + "private": { + "description": "Storage size of the user's private repositories", + "type": "integer", + "format": "int64", + "x-go-name": "Private" + }, + "public": { + "description": "Storage size of the user's public repositories", + "type": "integer", + "format": "int64", + "x-go-name": "Public" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Reaction": { + "description": "Reaction contain one reaction", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Reaction" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Reference": { + "type": "object", + "title": "Reference represents a Git reference.", + "properties": { + "object": { + "$ref": "#/definitions/GitObject" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Release": { + "description": "Release represents a repository release", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + }, + "x-go-name": "Attachments" + }, + "author": { + "$ref": "#/definitions/User" + }, + "body": { + "type": "string", + "x-go-name": "Note" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "hide_archive_links": { + "type": "boolean", + "x-go-name": "HideArchiveLinks" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "published_at": { + "type": "string", + "format": "date-time", + "x-go-name": "PublishedAt" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarURL" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + }, + "upload_url": { + "type": "string", + "x-go-name": "UploadURL" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RenameUserOption": { + "description": "RenameUserOption options when renaming a user", + "type": "object", + "required": [ + "new_username" + ], + "properties": { + "new_username": { + "description": "New username for this user. This name cannot be in use yet by any other user.", + "type": "string", + "uniqueItems": true, + "x-go-name": "NewName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ReplaceFlagsOption": { + "description": "ReplaceFlagsOption options when replacing the flags of a repository", + "type": "object", + "properties": { + "flags": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Flags" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoCollaboratorPermission": { + "description": "RepoCollaboratorPermission to get repository permission for a collaborator", + "type": "object", + "properties": { + "permission": { + "type": "string", + "x-go-name": "Permission" + }, + "role_name": { + "type": "string", + "x-go-name": "RoleName" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoCommit": { + "type": "object", + "title": "RepoCommit contains information of a commit in the context of a repository.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoTopicOptions": { + "description": "RepoTopicOptions a collection of repo topic names", + "type": "object", + "properties": { + "topics": { + "description": "list of topic names", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoTransfer": { + "description": "RepoTransfer represents a pending repo transfer", + "type": "object", + "properties": { + "doer": { + "$ref": "#/definitions/User" + }, + "recipient": { + "$ref": "#/definitions/User" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + }, + "x-go-name": "Teams" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Repository": { + "description": "Repository represents a repository", + "type": "object", + "properties": { + "allow_fast_forward_only_merge": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge_commits": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_rebase_update": { + "type": "boolean", + "x-go-name": "AllowRebaseUpdate" + }, + "allow_squash_merge": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "type": "boolean", + "x-go-name": "Archived" + }, + "archived_at": { + "type": "string", + "format": "date-time", + "x-go-name": "ArchivedAt" + }, + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, + "clone_url": { + "type": "string", + "x-go-name": "CloneURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "default_allow_maintainer_edit": { + "type": "boolean", + "x-go-name": "DefaultAllowMaintainerEdit" + }, + "default_branch": { + "type": "string", + "x-go-name": "DefaultBranch" + }, + "default_delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DefaultDeleteBranchAfterMerge" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "empty": { + "type": "boolean", + "x-go-name": "Empty" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "fork": { + "type": "boolean", + "x-go-name": "Fork" + }, + "forks_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Forks" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "globally_editable_wiki": { + "type": "boolean", + "x-go-name": "GloballyEditableWiki" + }, + "has_actions": { + "type": "boolean", + "x-go-name": "HasActions" + }, + "has_issues": { + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_packages": { + "type": "boolean", + "x-go-name": "HasPackages" + }, + "has_projects": { + "type": "boolean", + "x-go-name": "HasProjects" + }, + "has_pull_requests": { + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_releases": { + "type": "boolean", + "x-go-name": "HasReleases" + }, + "has_wiki": { + "type": "boolean", + "x-go-name": "HasWiki" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "ignore_whitespace_conflicts": { + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal": { + "type": "boolean", + "x-go-name": "Internal" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "languages_url": { + "type": "string", + "x-go-name": "LanguagesURL" + }, + "link": { + "type": "string", + "x-go-name": "Link" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "mirror_interval": { + "type": "string", + "x-go-name": "MirrorInterval" + }, + "mirror_updated": { + "type": "string", + "format": "date-time", + "x-go-name": "MirrorUpdated" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "object_format_name": { + "description": "ObjectFormatName of the underlying git repository", + "type": "string", + "enum": [ + "sha1", + "sha256" + ], + "x-go-name": "ObjectFormatName" + }, + "open_issues_count": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "open_pr_counter": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenPulls" + }, + "original_url": { + "type": "string", + "x-go-name": "OriginalURL" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "parent": { + "$ref": "#/definitions/Repository" + }, + "permissions": { + "$ref": "#/definitions/Permission" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "release_counter": { + "type": "integer", + "format": "int64", + "x-go-name": "Releases" + }, + "repo_transfer": { + "$ref": "#/definitions/RepoTransfer" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "ssh_url": { + "type": "string", + "x-go-name": "SSHURL" + }, + "stars_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Stars" + }, + "template": { + "type": "boolean", + "x-go-name": "Template" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "watchers_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Watchers" + }, + "website": { + "type": "string", + "x-go-name": "Website" + }, + "wiki_branch": { + "type": "string", + "x-go-name": "WikiBranch" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepositoryMeta": { + "description": "RepositoryMeta basic repository information", + "type": "object", + "properties": { + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "owner": { + "type": "string", + "x-go-name": "Owner" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ReviewStateType": { + "description": "ReviewStateType review state type", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "SearchResults": { + "description": "SearchResults results of a successful search", + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + }, + "x-go-name": "Data" + }, + "ok": { + "type": "boolean", + "x-go-name": "OK" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Secret": { + "description": "Secret represents a secret", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "name": { + "description": "the secret's name", + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ServerVersion": { + "description": "ServerVersion wraps the version of the server", + "type": "object", + "properties": { + "version": { + "type": "string", + "x-go-name": "Version" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "SetUserQuotaGroupsOptions": { + "description": "SetUserQuotaGroupsOptions represents the quota groups of a user", + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "description": "Quota groups the user shall have", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Groups" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "StateType": { + "description": "StateType issue state type", + "type": "string", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "StopWatch": { + "description": "StopWatch represent a running stopwatch", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "duration": { + "type": "string", + "x-go-name": "Duration" + }, + "issue_index": { + "type": "integer", + "format": "int64", + "x-go-name": "IssueIndex" + }, + "issue_title": { + "type": "string", + "x-go-name": "IssueTitle" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "repo_owner_name": { + "type": "string", + "x-go-name": "RepoOwnerName" + }, + "seconds": { + "type": "integer", + "format": "int64", + "x-go-name": "Seconds" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "SubmitPullReviewOptions": { + "description": "SubmitPullReviewOptions are options to submit a pending pull review", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "event": { + "$ref": "#/definitions/ReviewStateType" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Tag": { + "description": "Tag represents a repository tag", + "type": "object", + "properties": { + "archive_download_count": { + "$ref": "#/definitions/TagArchiveDownloadCount" + }, + "commit": { + "$ref": "#/definitions/CommitMeta" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarballURL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipballURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TagArchiveDownloadCount": { + "description": "TagArchiveDownloadCount counts how many times a archive was downloaded", + "type": "object", + "properties": { + "tar_gz": { + "type": "integer", + "format": "int64", + "x-go-name": "TarGz" + }, + "zip": { + "type": "integer", + "format": "int64", + "x-go-name": "Zip" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TagProtection": { + "description": "TagProtection represents a tag protection", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + }, + "whitelist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistUsernames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Team": { + "description": "Team represents a team in an organization", + "type": "object", + "properties": { + "can_create_org_repo": { + "type": "boolean", + "x-go-name": "CanCreateOrgRepo" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "includes_all_repositories": { + "type": "boolean", + "x-go-name": "IncludesAllRepositories" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "permission": { + "type": "string", + "enum": [ + "none", + "read", + "write", + "admin", + "owner" + ], + "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.projects", + "repo.ext_wiki" + ] + }, + "units_map": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "UnitsMap", + "example": { + "repo.code": "read", + "repo.ext_issues": "none", + "repo.ext_wiki": "none", + "repo.issues": "write", + "repo.projects": "none", + "repo.pulls": "owner", + "repo.releases": "none", + "repo.wiki": "admin" + } + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TimeStamp": { + "description": "TimeStamp defines a timestamp", + "type": "integer", + "format": "int64", + "x-go-package": "code.gitea.io/gitea/modules/timeutil" + }, + "TimelineComment": { + "description": "TimelineComment represents a timeline comment (comment of any type) on a commit or issue", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" + }, + "assignee_team": { + "$ref": "#/definitions/Team" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "dependent_issue": { + "$ref": "#/definitions/Issue" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "label": { + "$ref": "#/definitions/Label" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "new_ref": { + "type": "string", + "x-go-name": "NewRef" + }, + "new_title": { + "type": "string", + "x-go-name": "NewTitle" + }, + "old_milestone": { + "$ref": "#/definitions/Milestone" + }, + "old_project_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OldProjectID" + }, + "old_ref": { + "type": "string", + "x-go-name": "OldRef" + }, + "old_title": { + "type": "string", + "x-go-name": "OldTitle" + }, + "project_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ProjectID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "ref_action": { + "type": "string", + "x-go-name": "RefAction" + }, + "ref_comment": { + "$ref": "#/definitions/Comment" + }, + "ref_commit_sha": { + "description": "commit SHA where issue/PR was referenced", + "type": "string", + "x-go-name": "RefCommitSHA" + }, + "ref_issue": { + "$ref": "#/definitions/Issue" + }, + "removed_assignee": { + "description": "whether the assignees were removed or added", + "type": "boolean", + "x-go-name": "RemovedAssignee" + }, + "resolve_doer": { + "$ref": "#/definitions/User" + }, + "review_id": { + "type": "integer", + "format": "int64", + "x-go-name": "ReviewID" + }, + "tracked_time": { + "$ref": "#/definitions/TrackedTime" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TopicName": { + "description": "TopicName a list of repo topic names", + "type": "object", + "properties": { + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TopicNames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TopicResponse": { + "description": "TopicResponse for returning topics", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "repo_count": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoCount" + }, + "topic_name": { + "type": "string", + "x-go-name": "Name" + }, + "updated": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TrackedTime": { + "description": "TrackedTime worked time for an issue / pr", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue": { + "$ref": "#/definitions/Issue" + }, + "issue_id": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "IssueID" + }, + "time": { + "description": "Time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + }, + "user_id": { + "description": "deprecated (only for backwards compatibility)", + "type": "integer", + "format": "int64", + "x-go-name": "UserID" + }, + "user_name": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TransferRepoOption": { + "description": "TransferRepoOption options when transfer a repository's ownership", + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "new_owner": { + "type": "string", + "x-go-name": "NewOwner" + }, + "team_ids": { + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "TeamIDs" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateFileOptions": { + "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha", + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "dates": { + "$ref": "#/definitions/CommitDateOptions" + }, + "from_path": { + "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", + "type": "string", + "x-go-name": "FromPath" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + }, + "signoff": { + "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.", + "type": "boolean", + "x-go-name": "Signoff" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateRepoAvatarOption": { + "description": "UpdateRepoAvatarUserOption options when updating the repo avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateUserAvatarOption": { + "description": "UpdateUserAvatarUserOption options when updating the user avatar", + "type": "object", + "properties": { + "image": { + "description": "image must be base64 encoded", + "type": "string", + "x-go-name": "Image" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateVariableOption": { + "description": "UpdateVariableOption the option when updating variable", + "type": "object", + "required": [ + "value" + ], + "properties": { + "name": { + "description": "New name for the variable. If the field is empty, the variable name won't be updated.", + "type": "string", + "x-go-name": "Name" + }, + "value": { + "description": "Value of the variable to update", + "type": "string", + "x-go-name": "Value" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "User": { + "description": "User represents a user", + "type": "object", + "properties": { + "active": { + "description": "Is user active", + "type": "boolean", + "x-go-name": "IsActive" + }, + "avatar_url": { + "description": "URL to the user's avatar", + "type": "string", + "x-go-name": "AvatarURL" + }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "description": { + "description": "the user's description", + "type": "string", + "x-go-name": "Description" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "followers_count": { + "description": "user counts", + "type": "integer", + "format": "int64", + "x-go-name": "Followers" + }, + "following_count": { + "type": "integer", + "format": "int64", + "x-go-name": "Following" + }, + "full_name": { + "description": "the user's full name", + "type": "string", + "x-go-name": "FullName" + }, + "html_url": { + "description": "URL to the user's gitea page", + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "description": "the user's id", + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_admin": { + "description": "Is the user an administrator", + "type": "boolean", + "x-go-name": "IsAdmin" + }, + "language": { + "description": "User locale", + "type": "string", + "x-go-name": "Language" + }, + "last_login": { + "type": "string", + "format": "date-time", + "x-go-name": "LastLogin" + }, + "location": { + "description": "the user's location", + "type": "string", + "x-go-name": "Location" + }, + "login": { + "description": "the user's username", + "type": "string", + "x-go-name": "UserName" + }, + "login_name": { + "description": "the user's authentication sign-in name.", + "type": "string", + "default": "empty", + "x-go-name": "LoginName" + }, + "prohibit_login": { + "description": "Is user login prohibited", + "type": "boolean", + "x-go-name": "ProhibitLogin" + }, + "pronouns": { + "description": "the user's pronouns", + "type": "string", + "x-go-name": "Pronouns" + }, + "restricted": { + "description": "Is user restricted", + "type": "boolean", + "x-go-name": "Restricted" + }, + "source_id": { + "description": "The ID of the user's Authentication Source", + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "starred_repos_count": { + "type": "integer", + "format": "int64", + "x-go-name": "StarredRepos" + }, + "visibility": { + "description": "User visibility level option: public, limited, private", + "type": "string", + "x-go-name": "Visibility" + }, + "website": { + "description": "the user's website", + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UserHeatmapData": { + "description": "UserHeatmapData represents the data needed to create a heatmap", + "type": "object", + "properties": { + "contributions": { + "type": "integer", + "format": "int64", + "x-go-name": "Contributions" + }, + "timestamp": { + "$ref": "#/definitions/TimeStamp" + } + }, + "x-go-package": "code.gitea.io/gitea/models/activities" + }, + "UserSettings": { + "description": "UserSettings represents user settings", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "diff_view_style": { + "type": "string", + "x-go-name": "DiffViewStyle" + }, + "enable_repo_unit_hints": { + "type": "boolean", + "x-go-name": "EnableRepoUnitHints" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "hide_activity": { + "type": "boolean", + "x-go-name": "HideActivity" + }, + "hide_email": { + "description": "Privacy", + "type": "boolean", + "x-go-name": "HideEmail" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "theme": { + "type": "string", + "x-go-name": "Theme" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UserSettingsOptions": { + "description": "UserSettingsOptions represents options to change user settings", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "diff_view_style": { + "type": "string", + "x-go-name": "DiffViewStyle" + }, + "enable_repo_unit_hints": { + "type": "boolean", + "x-go-name": "EnableRepoUnitHints" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "hide_activity": { + "type": "boolean", + "x-go-name": "HideActivity" + }, + "hide_email": { + "description": "Privacy", + "type": "boolean", + "x-go-name": "HideEmail" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, + "theme": { + "type": "string", + "x-go-name": "Theme" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "WatchInfo": { + "description": "WatchInfo represents an API watch status of one repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "ignored": { + "type": "boolean", + "x-go-name": "Ignored" + }, + "reason": { + "x-go-name": "Reason" + }, + "repository_url": { + "type": "string", + "x-go-name": "RepositoryURL" + }, + "subscribed": { + "type": "boolean", + "x-go-name": "Subscribed" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "WikiCommit": { + "description": "WikiCommit page commit/revision", + "type": "object", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "commiter": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "sha": { + "type": "string", + "x-go-name": "ID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "WikiCommitList": { + "description": "WikiCommitList commit/revision list", + "type": "object", + "properties": { + "commits": { + "type": "array", + "items": { + "$ref": "#/definitions/WikiCommit" + }, + "x-go-name": "WikiCommits" + }, + "count": { + "type": "integer", + "format": "int64", + "x-go-name": "Count" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "WikiPage": { + "description": "WikiPage a wiki page", + "type": "object", + "properties": { + "commit_count": { + "type": "integer", + "format": "int64", + "x-go-name": "CommitCount" + }, + "content_base64": { + "description": "Page content, base64 encoded", + "type": "string", + "x-go-name": "ContentBase64" + }, + "footer": { + "type": "string", + "x-go-name": "Footer" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit": { + "$ref": "#/definitions/WikiCommit" + }, + "sidebar": { + "type": "string", + "x-go-name": "Sidebar" + }, + "sub_url": { + "type": "string", + "x-go-name": "SubURL" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "WikiPageMetaData": { + "description": "WikiPageMetaData wiki page meta information", + "type": "object", + "properties": { + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "last_commit": { + "$ref": "#/definitions/WikiCommit" + }, + "sub_url": { + "type": "string", + "x-go-name": "SubURL" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + } + }, + "responses": { + "AccessToken": { + "description": "AccessToken represents an API access token.", + "schema": { + "$ref": "#/definitions/AccessToken" + } + }, + "AccessTokenList": { + "description": "AccessTokenList represents a list of API access token.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessToken" + } + } + }, + "ActionVariable": { + "description": "ActionVariable", + "schema": { + "$ref": "#/definitions/ActionVariable" + } + }, + "ActivityFeedsList": { + "description": "ActivityFeedsList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, + "ActivityPub": { + "description": "ActivityPub", + "schema": { + "$ref": "#/definitions/ActivityPub" + } + }, + "AnnotatedTag": { + "description": "AnnotatedTag", + "schema": { + "$ref": "#/definitions/AnnotatedTag" + } + }, + "Attachment": { + "description": "Attachment", + "schema": { + "$ref": "#/definitions/Attachment" + } + }, + "AttachmentList": { + "description": "AttachmentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Attachment" + } + } + }, + "BlockedUserList": { + "description": "BlockedUserList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockedUser" + } + } + }, + "Branch": { + "description": "Branch", + "schema": { + "$ref": "#/definitions/Branch" + } + }, + "BranchList": { + "description": "BranchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "BranchProtection": { + "description": "BranchProtection", + "schema": { + "$ref": "#/definitions/BranchProtection" + } + }, + "BranchProtectionList": { + "description": "BranchProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/BranchProtection" + } + } + }, + "ChangedFileList": { + "description": "ChangedFileList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangedFile" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total-Count": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "CombinedStatus": { + "description": "CombinedStatus", + "schema": { + "$ref": "#/definitions/CombinedStatus" + } + }, + "Comment": { + "description": "Comment", + "schema": { + "$ref": "#/definitions/Comment" + } + }, + "CommentList": { + "description": "CommentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Comment" + } + } + }, + "Commit": { + "description": "Commit", + "schema": { + "$ref": "#/definitions/Commit" + } + }, + "CommitList": { + "description": "CommitList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "CommitStatus": { + "description": "CommitStatus", + "schema": { + "$ref": "#/definitions/CommitStatus" + } + }, + "CommitStatusList": { + "description": "CommitStatusList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitStatus" + } + } + }, + "Compare": { + "description": "", + "schema": { + "$ref": "#/definitions/Compare" + } + }, + "ContentsListResponse": { + "description": "ContentsListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + } + } + }, + "ContentsResponse": { + "description": "ContentsResponse", + "schema": { + "$ref": "#/definitions/ContentsResponse" + } + }, + "CronList": { + "description": "CronList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Cron" + } + } + }, + "DeployKey": { + "description": "DeployKey", + "schema": { + "$ref": "#/definitions/DeployKey" + } + }, + "DeployKeyList": { + "description": "DeployKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployKey" + } + } + }, + "EmailList": { + "description": "EmailList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Email" + } + } + }, + "EmptyRepository": { + "description": "EmptyRepository", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse", + "schema": { + "$ref": "#/definitions/FileDeleteResponse" + } + }, + "FileResponse": { + "description": "FileResponse", + "schema": { + "$ref": "#/definitions/FileResponse" + } + }, + "FilesResponse": { + "description": "FilesResponse", + "schema": { + "$ref": "#/definitions/FilesResponse" + } + }, + "GPGKey": { + "description": "GPGKey", + "schema": { + "$ref": "#/definitions/GPGKey" + } + }, + "GPGKeyList": { + "description": "GPGKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + } + } + }, + "GeneralAPISettings": { + "description": "GeneralAPISettings", + "schema": { + "$ref": "#/definitions/GeneralAPISettings" + } + }, + "GeneralAttachmentSettings": { + "description": "GeneralAttachmentSettings", + "schema": { + "$ref": "#/definitions/GeneralAttachmentSettings" + } + }, + "GeneralRepoSettings": { + "description": "GeneralRepoSettings", + "schema": { + "$ref": "#/definitions/GeneralRepoSettings" + } + }, + "GeneralUISettings": { + "description": "GeneralUISettings", + "schema": { + "$ref": "#/definitions/GeneralUISettings" + } + }, + "GitBlobResponse": { + "description": "GitBlobResponse", + "schema": { + "$ref": "#/definitions/GitBlobResponse" + } + }, + "GitHook": { + "description": "GitHook", + "schema": { + "$ref": "#/definitions/GitHook" + } + }, + "GitHookList": { + "description": "GitHookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GitHook" + } + } + }, + "GitTreeResponse": { + "description": "GitTreeResponse", + "schema": { + "$ref": "#/definitions/GitTreeResponse" + } + }, + "GitignoreTemplateInfo": { + "description": "GitignoreTemplateInfo", + "schema": { + "$ref": "#/definitions/GitignoreTemplateInfo" + } + }, + "GitignoreTemplateList": { + "description": "GitignoreTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Hook": { + "description": "Hook", + "schema": { + "$ref": "#/definitions/Hook" + } + }, + "HookList": { + "description": "HookList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Hook" + } + } + }, + "Issue": { + "description": "Issue", + "schema": { + "$ref": "#/definitions/Issue" + } + }, + "IssueDeadline": { + "description": "IssueDeadline", + "schema": { + "$ref": "#/definitions/IssueDeadline" + } + }, + "IssueList": { + "description": "IssueList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Issue" + } + } + }, + "IssueTemplates": { + "description": "IssueTemplates", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueTemplate" + } + } + }, + "Label": { + "description": "Label", + "schema": { + "$ref": "#/definitions/Label" + } + }, + "LabelList": { + "description": "LabelList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + } + } + }, + "LabelTemplateInfo": { + "description": "LabelTemplateInfo", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LabelTemplate" + } + } + }, + "LabelTemplateList": { + "description": "LabelTemplateList", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "LanguageStatistics": { + "description": "LanguageStatistics", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + }, + "LicenseTemplateInfo": { + "description": "LicenseTemplateInfo", + "schema": { + "$ref": "#/definitions/LicenseTemplateInfo" + } + }, + "LicenseTemplateList": { + "description": "LicenseTemplateList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LicensesTemplateListEntry" + } + } + }, + "MarkdownRender": { + "description": "MarkdownRender is a rendered markdown document", + "schema": { + "type": "string" + } + }, + "MarkupRender": { + "description": "MarkupRender is a rendered markup document", + "schema": { + "type": "string" + } + }, + "Milestone": { + "description": "Milestone", + "schema": { + "$ref": "#/definitions/Milestone" + } + }, + "MilestoneList": { + "description": "MilestoneList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Milestone" + } + } + }, + "NodeInfo": { + "description": "NodeInfo", + "schema": { + "$ref": "#/definitions/NodeInfo" + } + }, + "Note": { + "description": "Note", + "schema": { + "$ref": "#/definitions/Note" + } + }, + "NotificationCount": { + "description": "Number of unread notifications", + "schema": { + "$ref": "#/definitions/NotificationCount" + } + }, + "NotificationThread": { + "description": "NotificationThread", + "schema": { + "$ref": "#/definitions/NotificationThread" + } + }, + "NotificationThreadList": { + "description": "NotificationThreadList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NotificationThread" + } + } + }, + "OAuth2Application": { + "description": "OAuth2Application", + "schema": { + "$ref": "#/definitions/OAuth2Application" + } + }, + "OAuth2ApplicationList": { + "description": "OAuth2ApplicationList represents a list of OAuth2 applications.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/OAuth2Application" + } + } + }, + "Organization": { + "description": "Organization", + "schema": { + "$ref": "#/definitions/Organization" + } + }, + "OrganizationList": { + "description": "OrganizationList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Organization" + } + } + }, + "OrganizationPermissions": { + "description": "OrganizationPermissions", + "schema": { + "$ref": "#/definitions/OrganizationPermissions" + } + }, + "Package": { + "description": "Package", + "schema": { + "$ref": "#/definitions/Package" + } + }, + "PackageFileList": { + "description": "PackageFileList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PackageFile" + } + } + }, + "PackageList": { + "description": "PackageList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Package" + } + } + }, + "PublicKey": { + "description": "PublicKey", + "schema": { + "$ref": "#/definitions/PublicKey" + } + }, + "PublicKeyList": { + "description": "PublicKeyList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicKey" + } + } + }, + "PullRequest": { + "description": "PullRequest", + "schema": { + "$ref": "#/definitions/PullRequest" + } + }, + "PullRequestList": { + "description": "PullRequestList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullRequest" + } + } + }, + "PullReview": { + "description": "PullReview", + "schema": { + "$ref": "#/definitions/PullReview" + } + }, + "PullReviewComment": { + "description": "PullComment", + "schema": { + "$ref": "#/definitions/PullReviewComment" + } + }, + "PullReviewCommentList": { + "description": "PullCommentList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullReviewComment" + } + } + }, + "PullReviewList": { + "description": "PullReviewList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullReview" + } + } + }, + "PushMirror": { + "description": "PushMirror", + "schema": { + "$ref": "#/definitions/PushMirror" + } + }, + "PushMirrorList": { + "description": "PushMirrorList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PushMirror" + } + } + }, + "QuotaGroup": { + "description": "QuotaGroup", + "schema": { + "$ref": "#/definitions/QuotaGroup" + } + }, + "QuotaGroupList": { + "description": "QuotaGroupList", + "schema": { + "$ref": "#/definitions/QuotaGroupList" + } + }, + "QuotaInfo": { + "description": "QuotaInfo", + "schema": { + "$ref": "#/definitions/QuotaInfo" + } + }, + "QuotaRuleInfo": { + "description": "QuotaRuleInfo", + "schema": { + "$ref": "#/definitions/QuotaRuleInfo" + } + }, + "QuotaRuleInfoList": { + "description": "QuotaRuleInfoList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/QuotaRuleInfo" + } + } + }, + "QuotaUsedArtifactList": { + "description": "QuotaUsedArtifactList", + "schema": { + "$ref": "#/definitions/QuotaUsedArtifactList" + } + }, + "QuotaUsedAttachmentList": { + "description": "QuotaUsedAttachmentList", + "schema": { + "$ref": "#/definitions/QuotaUsedAttachmentList" + } + }, + "QuotaUsedPackageList": { + "description": "QuotaUsedPackageList", + "schema": { + "$ref": "#/definitions/QuotaUsedPackageList" + } + }, + "Reaction": { + "description": "Reaction", + "schema": { + "$ref": "#/definitions/Reaction" + } + }, + "ReactionList": { + "description": "ReactionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reaction" + } + } + }, + "Reference": { + "description": "Reference", + "schema": { + "$ref": "#/definitions/Reference" + } + }, + "ReferenceList": { + "description": "ReferenceList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + } + }, + "RegistrationToken": { + "description": "RegistrationToken is a string used to register a runner with a server", + "headers": { + "token": { + "type": "string" + } + } + }, + "Release": { + "description": "Release", + "schema": { + "$ref": "#/definitions/Release" + } + }, + "ReleaseList": { + "description": "ReleaseList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Release" + } + } + }, + "RepoCollaboratorPermission": { + "description": "RepoCollaboratorPermission", + "schema": { + "$ref": "#/definitions/RepoCollaboratorPermission" + } + }, + "RepoIssueConfig": { + "description": "RepoIssueConfig", + "schema": { + "$ref": "#/definitions/IssueConfig" + } + }, + "RepoIssueConfigValidation": { + "description": "RepoIssueConfigValidation", + "schema": { + "$ref": "#/definitions/IssueConfigValidation" + } + }, + "RepoNewIssuePinsAllowed": { + "description": "RepoNewIssuePinsAllowed", + "schema": { + "$ref": "#/definitions/NewIssuePinsAllowed" + } + }, + "Repository": { + "description": "Repository", + "schema": { + "$ref": "#/definitions/Repository" + } + }, + "RepositoryList": { + "description": "RepositoryList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + } + } + }, + "SearchResults": { + "description": "SearchResults", + "schema": { + "$ref": "#/definitions/SearchResults" + } + }, + "Secret": { + "description": "Secret", + "schema": { + "$ref": "#/definitions/Secret" + } + }, + "SecretList": { + "description": "SecretList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + } + } + }, + "ServerVersion": { + "description": "ServerVersion", + "schema": { + "$ref": "#/definitions/ServerVersion" + } + }, + "StopWatch": { + "description": "StopWatch", + "schema": { + "$ref": "#/definitions/StopWatch" + } + }, + "StopWatchList": { + "description": "StopWatchList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/StopWatch" + } + } + }, + "StringSlice": { + "description": "StringSlice", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Tag": { + "description": "Tag", + "schema": { + "$ref": "#/definitions/Tag" + } + }, + "TagList": { + "description": "TagList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, + "TagProtection": { + "description": "TagProtection", + "schema": { + "$ref": "#/definitions/TagProtection" + } + }, + "TagProtectionList": { + "description": "TagProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TagProtection" + } + } + }, + "TasksList": { + "description": "TasksList", + "schema": { + "$ref": "#/definitions/ActionTaskResponse" + } + }, + "Team": { + "description": "Team", + "schema": { + "$ref": "#/definitions/Team" + } + }, + "TeamList": { + "description": "TeamList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + } + }, + "TimelineList": { + "description": "TimelineList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TimelineComment" + } + } + }, + "TopicListResponse": { + "description": "TopicListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TopicResponse" + } + } + }, + "TopicNames": { + "description": "TopicNames", + "schema": { + "$ref": "#/definitions/TopicName" + } + }, + "TrackedTime": { + "description": "TrackedTime", + "schema": { + "$ref": "#/definitions/TrackedTime" + } + }, + "TrackedTimeList": { + "description": "TrackedTimeList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TrackedTime" + } + } + }, + "User": { + "description": "User", + "schema": { + "$ref": "#/definitions/User" + } + }, + "UserHeatmapData": { + "description": "UserHeatmapData", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/UserHeatmapData" + } + } + }, + "UserList": { + "description": "UserList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + } + }, + "UserSettings": { + "description": "UserSettings", + "schema": { + "$ref": "#/definitions/UserSettings" + } + }, + "VariableList": { + "description": "VariableList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionVariable" + } + } + }, + "WatchInfo": { + "description": "WatchInfo", + "schema": { + "$ref": "#/definitions/WatchInfo" + } + }, + "WikiCommitList": { + "description": "WikiCommitList", + "schema": { + "$ref": "#/definitions/WikiCommitList" + } + }, + "WikiPage": { + "description": "WikiPage", + "schema": { + "$ref": "#/definitions/WikiPage" + } + }, + "WikiPageList": { + "description": "WikiPageList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/WikiPageMetaData" + } + } + }, + "boolean": { + "description": "Boolean" + }, + "conflict": { + "description": "APIConflict is a conflict empty response" + }, + "empty": { + "description": "APIEmpty is an empty response" + }, + "error": { + "description": "APIError is error format response", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "forbidden": { + "description": "APIForbiddenError is a forbidden error response", + "schema": { + "$ref": "#/definitions/APIForbiddenError" + } + }, + "invalidTopicsError": { + "description": "APIInvalidTopicsError is error format response to invalid topics", + "schema": { + "$ref": "#/definitions/APIInvalidTopicsError" + } + }, + "notFound": { + "description": "APINotFound is a not found error response", + "schema": { + "$ref": "#/definitions/APINotFound" + } + }, + "parameterBodies": { + "description": "parameterBodies", + "schema": { + "$ref": "#/definitions/SetUserQuotaGroupsOptions" + } + }, + "quotaExceeded": { + "description": "QuotaExceeded", + "headers": { + "message": { + "type": "string" + }, + "user_id": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + } + } + }, + "redirect": { + "description": "APIRedirect is a redirect response" + }, + "repoArchivedError": { + "description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified", + "schema": { + "$ref": "#/definitions/APIRepoArchivedError" + } + }, + "string": { + "description": "APIString is a string response", + "schema": { + "type": "string" + } + }, + "unauthorized": { + "description": "APIUnauthorizedError is a unauthorized error response", + "schema": { + "$ref": "#/definitions/APIUnauthorizedError" + } + }, + "validationError": { + "description": "APIValidationError is error format response related to input validation", + "schema": { + "$ref": "#/definitions/APIValidationError" + } + } + }, + "securityDefinitions": { + "AccessToken": { + "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.", + "type": "apiKey", + "name": "access_token", + "in": "query" + }, + "AuthorizationHeaderToken": { + "description": "API tokens must be prepended with \"token\" followed by a space.", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + }, + "SudoHeader": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "Sudo", + "in": "header" + }, + "SudoParam": { + "description": "Sudo API request as the user provided as the key. Admin privileges are required.", + "type": "apiKey", + "name": "sudo", + "in": "query" + }, + "TOTPHeader": { + "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.", + "type": "apiKey", + "name": "X-FORGEJO-OTP", + "in": "header" + }, + "Token": { + "description": "This authentication option is deprecated for removal in Gitea 1.23. Please use AuthorizationHeaderToken instead.", + "type": "apiKey", + "name": "token", + "in": "query" + } + }, + "security": [ + { + "BasicAuth": [] + }, + { + "Token": [] + }, + { + "AccessToken": [] + }, + { + "AuthorizationHeaderToken": [] + }, + { + "SudoParam": [] + }, + { + "SudoHeader": [] + }, + { + "TOTPHeader": [] + } + ] +} diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl new file mode 100644 index 0000000..9ae811b --- /dev/null +++ b/templates/user/auth/activate.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "auth.active_your_account"}} +

    +
    + {{template "base/alert" .}} + {{if .IsActivatePage}} + {{if .ServiceNotEnabled}} +

    {{ctx.Locale.Tr "auth.disable_register_mail"}}

    + {{else if .ResendLimited}} +

    {{ctx.Locale.Tr "auth.resent_limit_prompt"}}

    + {{else}} +

    {{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives}}

    + {{end}} + {{else}} + {{if .NeedsPassword}} +
    + + +
    +
    + +
    + + {{else if .IsSendRegisterMail}} +

    {{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives}}

    + {{else if .IsCodeInvalid}} +

    {{ctx.Locale.Tr "auth.invalid_code"}}

    + {{else if .IsPasswordInvalid}} +

    {{ctx.Locale.Tr "auth.invalid_password"}}

    + {{else if .ManualActivationOnly}} +

    {{ctx.Locale.Tr "auth.manual_activation_only"}}

    + {{else}} +

    {{ctx.Locale.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email}}

    +
    +
    + {{ctx.Locale.Tr "auth.change_unconfirmed_email_summary"}} + +

    {{ctx.Locale.Tr "auth.change_unconfirmed_email"}}

    +
    + + +
    +
    + +
    + +
    + {{end}} + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/captcha.tmpl b/templates/user/auth/captcha.tmpl new file mode 100644 index 0000000..03e3607 --- /dev/null +++ b/templates/user/auth/captcha.tmpl @@ -0,0 +1,30 @@ +{{if .EnableCaptcha}}{{if eq .CaptchaType "image"}} +
    + + +
    +
    + + +
    +{{else if eq .CaptchaType "recaptcha"}} +
    +
    +
    + +{{else if eq .CaptchaType "hcaptcha"}} +
    +
    +
    + +{{else if eq .CaptchaType "mcaptcha"}} +
    +
    +
    +
    +{{else if eq .CaptchaType "cfturnstile"}} +
    +
    +
    + +{{end}}{{end}} diff --git a/templates/user/auth/change_passwd.tmpl b/templates/user/auth/change_passwd.tmpl new file mode 100644 index 0000000..e05f46f --- /dev/null +++ b/templates/user/auth/change_passwd.tmpl @@ -0,0 +1,7 @@ +{{template "base/head" .}} +
    +
    + {{template "user/auth/change_passwd_inner" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl new file mode 100644 index 0000000..601f036 --- /dev/null +++ b/templates/user/auth/change_passwd_inner.tmpl @@ -0,0 +1,22 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

    + {{ctx.Locale.Tr "settings.update_password"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + +
    +
    +
    diff --git a/templates/user/auth/finalize_openid.tmpl b/templates/user/auth/finalize_openid.tmpl new file mode 100644 index 0000000..f84f860 --- /dev/null +++ b/templates/user/auth/finalize_openid.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl new file mode 100644 index 0000000..55bcf63 --- /dev/null +++ b/templates/user/auth/forgot_passwd.tmpl @@ -0,0 +1,39 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +

    + {{ctx.Locale.Tr "auth.forgot_password_title"}} +

    +
    + {{template "base/alert" .}} + {{if .IsResetSent}} +

    {{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives}}

    + {{else if .IsResetRequest}} +
    + + +
    +
    +
    + +
    + {{else if .IsResetDisable}} +

    + {{if $.IsAdmin}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail_admin"}} + {{else}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail"}} + {{end}} +

    + {{else if .ResendLimited}} +

    {{ctx.Locale.Tr "auth.resent_limit_prompt"}}

    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/grant.tmpl b/templates/user/auth/grant.tmpl new file mode 100644 index 0000000..1a1b72b --- /dev/null +++ b/templates/user/auth/grant.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} +
    +
    +
    +

    + {{ctx.Locale.Tr "auth.authorize_title" .Application.Name}} +

    +
    + {{template "base/alert" .}} +

    + {{ctx.Locale.Tr "auth.authorize_application_description"}}
    + {{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}} +

    +

    With scopes: {{.Scope}}.

    +
    +
    +

    {{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}

    +
    +
    +
    + {{.CsrfTokenHtml}} + + + + + + + +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/grant_error.tmpl b/templates/user/auth/grant_error.tmpl new file mode 100644 index 0000000..b2e0779 --- /dev/null +++ b/templates/user/auth/grant_error.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
    + {{if .IsRepo}}{{template "repo/header" .}}{{end}} +
    +
    +

    + {{ctx.Locale.Tr "auth.authorization_failed"}} +

    +

    {{.Error.ErrorDescription}}

    +
    +

    {{ctx.Locale.Tr "auth.authorization_failed_desc"}}

    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl new file mode 100644 index 0000000..e8bb3d4 --- /dev/null +++ b/templates/user/auth/link_account.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} + + +{{template "base/footer" .}} diff --git a/templates/user/auth/oauth_container.tmpl b/templates/user/auth/oauth_container.tmpl new file mode 100644 index 0000000..bb6a10d --- /dev/null +++ b/templates/user/auth/oauth_container.tmpl @@ -0,0 +1,29 @@ +{{if or .OAuth2Providers .EnableOpenIDSignIn}} +
    + {{ctx.Locale.Tr "sign_in_or"}} +
    + +{{end}} diff --git a/templates/user/auth/oidc_wellknown.tmpl b/templates/user/auth/oidc_wellknown.tmpl new file mode 100644 index 0000000..54bb4a7 --- /dev/null +++ b/templates/user/auth/oidc_wellknown.tmpl @@ -0,0 +1,49 @@ +{ + "issuer": "{{AppUrl | JSEscape}}", + "authorization_endpoint": "{{AppUrl | JSEscape}}login/oauth/authorize", + "token_endpoint": "{{AppUrl | JSEscape}}login/oauth/access_token", + "jwks_uri": "{{AppUrl | JSEscape}}login/oauth/keys", + "userinfo_endpoint": "{{AppUrl | JSEscape}}login/oauth/userinfo", + "introspection_endpoint": "{{AppUrl | JSEscape}}login/oauth/introspect", + "response_types_supported": [ + "code", + "id_token" + ], + "id_token_signing_alg_values_supported": [ + "{{.SigningKey.SigningMethod.Alg | JSEscape}}" + ], + "subject_types_supported": [ + "public" + ], + "scopes_supported": [ + "openid", + "profile", + "email", + "groups" + ], + "claims_supported": [ + "aud", + "exp", + "iat", + "iss", + "sub", + "name", + "preferred_username", + "profile", + "picture", + "website", + "locale", + "updated_at", + "email", + "email_verified", + "groups" + ], + "code_challenge_methods_supported": [ + "plain", + "S256" + ], + "grant_types_supported": [ + "authorization_code", + "refresh_token" + ] +} diff --git a/templates/user/auth/prohibit_login.tmpl b/templates/user/auth/prohibit_login.tmpl new file mode 100644 index 0000000..962ddfa --- /dev/null +++ b/templates/user/auth/prohibit_login.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "auth.prohibit_login"}} +

    +
    +

    {{ctx.Locale.Tr "auth.prohibit_login_desc"}}

    +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..f8303fe --- /dev/null +++ b/templates/user/auth/reset_passwd.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} + +

    + {{ctx.Locale.Tr "auth.reset_password"}} +

    +
    + {{template "base/alert" .}} + {{if .user_email}} +
    + + +
    + {{end}} + {{if .IsResetForm}} +
    + + +
    + {{if not .user_signed_in}} +
    +
    + + +
    +
    + {{end}} + {{if .has_two_factor}} +

    + {{ctx.Locale.Tr "twofa"}} +

    +
    {{ctx.Locale.Tr "settings.twofa_is_enrolled"}}
    + {{if .scratch_code}} +
    + + +
    + + {{else}} +
    + + +
    + {{end}} + {{end}} +
    +
    + + {{if and .has_two_factor (not .scratch_code)}} + {{ctx.Locale.Tr "auth.use_scratch_code"}} + {{end}} +
    + {{else}} +

    {{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl)}}

    + {{end}} +
    +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl new file mode 100644 index 0000000..54cc82d --- /dev/null +++ b/templates/user/auth/signin.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
    +
    +
    + {{template "user/auth/signin_inner" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl new file mode 100644 index 0000000..56532f4 --- /dev/null +++ b/templates/user/auth/signin_inner.tmpl @@ -0,0 +1,65 @@ +
    + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

    + {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signin_title"}} + {{else}} + {{ctx.Locale.Tr "auth.login_userpass"}} + {{end}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{if or (not .DisablePassword) .LinkAccountMode}} +
    + + +
    + {{end}} + {{if not .LinkAccountMode}} +
    +
    + + +
    +
    + {{end}} + + {{template "user/auth/captcha" .}} + +
    + +
    +
    + + {{template "user/auth/oauth_container" .}} +
    +
    + +
    + {{template "user/auth/webauthn_error" .}} + +
    + {{if .ShowRegistrationButton}} +
    + {{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}} +
    +
    + {{end}} + +
    +
    diff --git a/templates/user/auth/signin_openid.tmpl b/templates/user/auth/signin_openid.tmpl new file mode 100644 index 0000000..20c7bdc --- /dev/null +++ b/templates/user/auth/signin_openid.tmpl @@ -0,0 +1,51 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup.tmpl b/templates/user/auth/signup.tmpl new file mode 100644 index 0000000..1ce3934 --- /dev/null +++ b/templates/user/auth/signup.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
    +
    +
    + {{template "user/auth/signup_inner" .}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl new file mode 100644 index 0000000..6c5ac67 --- /dev/null +++ b/templates/user/auth/signup_inner.tmpl @@ -0,0 +1,64 @@ +
    +

    + {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signup_title"}} + {{else}} + {{ctx.Locale.Tr "sign_up"}} + {{end}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} + {{template "base/alert" .}} + {{end}} + {{if .DisableRegistration}} +

    {{ctx.Locale.Tr "auth.disable_register_prompt"}}

    + {{else}} +
    + + +
    +
    + + +
    + + {{if not .DisablePassword}} +
    + + +
    +
    + + +
    + {{end}} + + {{template "user/auth/captcha" .}} + +
    + +
    + {{end}} + + {{template "user/auth/oauth_container" .}} +
    +
    +
    + +{{if not .LinkAccountMode}} +
    +
    +
    + {{ctx.Locale.Tr "auth.hint_login" (printf "%s/user/login" AppSubUrl)}} +
    +
    +
    +{{end}} diff --git a/templates/user/auth/signup_openid_connect.tmpl b/templates/user/auth/signup_openid_connect.tmpl new file mode 100644 index 0000000..e4b7936 --- /dev/null +++ b/templates/user/auth/signup_openid_connect.tmpl @@ -0,0 +1,36 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl new file mode 100644 index 0000000..89068dd --- /dev/null +++ b/templates/user/auth/signup_openid_navbar.tmpl @@ -0,0 +1,12 @@ + +
    + + {{ctx.Locale.Tr "auth.openid_connect_title"}} + + {{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}} + + {{ctx.Locale.Tr "auth.openid_register_title"}} + + {{end}} +
    +
    diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl new file mode 100644 index 0000000..c017a0e --- /dev/null +++ b/templates/user/auth/signup_openid_register.tmpl @@ -0,0 +1,37 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl new file mode 100644 index 0000000..d245239 --- /dev/null +++ b/templates/user/auth/twofa.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa_scratch.tmpl b/templates/user/auth/twofa_scratch.tmpl new file mode 100644 index 0000000..23ad77f --- /dev/null +++ b/templates/user/auth/twofa_scratch.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl new file mode 100644 index 0000000..1b84765 --- /dev/null +++ b/templates/user/auth/webauthn.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl new file mode 100644 index 0000000..511ff7c --- /dev/null +++ b/templates/user/auth/webauthn_error.tmpl @@ -0,0 +1,13 @@ +
    +
    {{ctx.Locale.Tr "webauthn_error"}}
    +
    +
    +
    {{ctx.Locale.Tr "webauthn_unsupported_browser"}}
    +
    {{ctx.Locale.Tr "webauthn_error_unknown"}}
    +
    {{ctx.Locale.Tr "webauthn_error_insecure"}}
    +
    {{ctx.Locale.Tr "webauthn_error_unable_to_process"}}
    +
    {{ctx.Locale.Tr "webauthn_error_duplicated"}}
    +
    {{ctx.Locale.Tr "webauthn_error_empty"}}
    +
    {{ctx.Locale.Tr "webauthn_error_timeout"}}
    +
    +
    diff --git a/templates/user/code.tmpl b/templates/user/code.tmpl new file mode 100644 index 0000000..ff6c69d --- /dev/null +++ b/templates/user/code.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "shared/search/code/search" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "shared/search/code/search" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..5dc46dc --- /dev/null +++ b/templates/user/dashboard/dashboard.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .}} +
    + {{template "user/dashboard/navbar" .}} +
    +
    + {{template "base/alert" .}} + {{template "user/heatmap" .}} + {{template "user/dashboard/feeds" .}} +
    + {{template "user/dashboard/repolist" .}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl new file mode 100644 index 0000000..60aa194 --- /dev/null +++ b/templates/user/dashboard/feeds.tmpl @@ -0,0 +1,127 @@ +
    + {{range .Feeds}} +
    +
    + {{ctx.AvatarUtils.AvatarByAction .}} +
    +
    +
    + {{if gt .ActUser.ID 0}} + {{.GetActDisplayName ctx}} + {{else}} + {{.ShortActUserName ctx}} + {{end}} + {{if .GetOpType.InActions "create_repo"}} + {{ctx.Locale.Tr "action.create_repo" (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "rename_repo"}} + {{ctx.Locale.Tr "action.rename_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "commit_repo"}} + {{if .Content}} + {{ctx.Locale.Tr "action.commit_repo" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else}} + {{ctx.Locale.Tr "action.create_branch" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{end}} + {{else if .GetOpType.InActions "create_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.create_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "create_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.create_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "transfer_repo"}} + {{ctx.Locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "push_tag"}} + {{ctx.Locale.Tr "action.push_tag" (.GetRepoLink ctx) (.GetRefLink ctx) .GetTag (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "comment_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.comment_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "merge_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "close_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.close_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reopen_issue"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reopen_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "close_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.close_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reopen_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reopen_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "delete_tag"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.delete_tag" (.GetRepoLink ctx) .GetTag (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "delete_branch"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.delete_branch" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_push"}} + {{ctx.Locale.Tr "action.mirror_sync_push" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_create"}} + {{ctx.Locale.Tr "action.mirror_sync_create" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "mirror_sync_delete"}} + {{ctx.Locale.Tr "action.mirror_sync_delete" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "approve_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.approve_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "reject_pull_request"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.reject_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "comment_pull"}} + {{$index := index .GetIssueInfos 0}} + {{ctx.Locale.Tr "action.comment_pull" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} + {{else if .GetOpType.InActions "publish_release"}} + {{$linkText := .Content | RenderEmoji $.Context}} + {{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}} + {{else if .GetOpType.InActions "review_dismissed"}} + {{$index := index .GetIssueInfos 0}} + {{$reviewer := index .GetIssueInfos 1}} + {{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}} + {{end}} + {{TimeSince .GetCreate ctx.Locale}} +
    + {{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}} + {{$push := ActionContent2Commits .}} + {{$repoLink := (.GetRepoLink ctx)}} + {{$repo := .Repo}} +
    + {{range $push.Commits}} + {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} +
    + + {{ShortSha .Sha1}} + + {{RenderCommitMessage $.Context .Message ($repo.ComposeMetas ctx)}} + +
    + {{end}} +
    + {{if and (gt $push.Len 1) $push.CompareURL}} + {{ctx.Locale.Tr "action.compare_commits" $push.Len}} » + {{end}} + {{else if .GetOpType.InActions "create_issue"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "create_pull_request"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{$comment := index .GetIssueInfos 1}} + {{if $comment}} +
    {{RenderMarkdownToHtml ctx $comment}}
    + {{end}} + {{else if .GetOpType.InActions "merge_pull_request"}} +
    {{index .GetIssueInfos 1}}
    + {{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "pull_review_dismissed"}} +
    {{ctx.Locale.Tr "action.review_dismissed_reason"}}
    +
    {{index .GetIssueInfos 2 | RenderEmoji $.Context}}
    + {{end}} +
    +
    + {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}} +
    +
    + {{end}} + {{template "base/paginate" .}} +
    diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl new file mode 100644 index 0000000..09d282b --- /dev/null +++ b/templates/user/dashboard/issues.tmpl @@ -0,0 +1,91 @@ +{{template "base/head" .}} +
    + {{template "user/dashboard/navbar" .}} +
    + {{template "base/alert" .}} +
    + + + +
    + {{template "shared/issuelist" dict "." . "listType" "dashboard"}} +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl new file mode 100644 index 0000000..fe8e246 --- /dev/null +++ b/templates/user/dashboard/milestones.tmpl @@ -0,0 +1,155 @@ +{{template "base/head" .}} +
    + {{template "user/dashboard/navbar" .}} +
    +
    +
    + +
    +
    + +
    + {{range .Milestones}} +
  • +
    +

    + + {{.Repo.FullName}} + + {{svg "octicon-milestone" 16}} + {{.Name}} +

    +
    + {{.Completeness}}% + +
    +
    +
    +
    +
    + {{svg "octicon-issue-opened" 14}} + {{ctx.Locale.PrettyNumber .NumOpenIssues}} {{ctx.Locale.Tr "repo.issues.open_title"}} +
    +
    + {{svg "octicon-check" 14}} + {{ctx.Locale.PrettyNumber .NumClosedIssues}} {{ctx.Locale.Tr "repo.issues.closed_title"}} +
    + {{if .TotalTrackedTime}} +
    + {{svg "octicon-clock"}} + {{.TotalTrackedTime|Sec2Time}} +
    + {{end}} + {{if .UpdatedUnix}} +
    + {{svg "octicon-clock"}} + {{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale)}} +
    + {{end}} +
    + {{if .IsClosed}} + {{$closedDate:= TimeSinceUnix .ClosedDateUnix ctx.Locale}} + {{svg "octicon-clock" 14}} + {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} + {{else}} + {{if .DeadlineString}} + + {{svg "octicon-calendar" 14}} + {{DateTime "short" .DeadlineString}} + + {{else}} + {{svg "octicon-calendar" 14}} + {{ctx.Locale.Tr "repo.milestones.no_due_date"}} + {{end}} + {{end}} +
    +
    + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} + + {{end}} +
    + {{if .Content}} +
    + {{.RenderedContent}} +
    + {{end}} +
  • + {{end}} + + {{template "base/paginate" .}} +
    + +
    +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl new file mode 100644 index 0000000..1fa356f --- /dev/null +++ b/templates/user/dashboard/navbar.tmpl @@ -0,0 +1,102 @@ +
    + +
    diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl new file mode 100644 index 0000000..2781f71 --- /dev/null +++ b/templates/user/dashboard/repolist.tmpl @@ -0,0 +1,55 @@ + + +
    diff --git a/templates/user/heatmap.tmpl b/templates/user/heatmap.tmpl new file mode 100644 index 0000000..05403e3 --- /dev/null +++ b/templates/user/heatmap.tmpl @@ -0,0 +1,13 @@ +{{if .HeatmapData}} +
    +
    +{{end}} diff --git a/templates/user/notification/notification.tmpl b/templates/user/notification/notification.tmpl new file mode 100644 index 0000000..b483c15 --- /dev/null +++ b/templates/user/notification/notification.tmpl @@ -0,0 +1,3 @@ +{{template "base/head" .}} +{{template "user/notification/notification_div" .}} +{{template "base/footer" .}} diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl new file mode 100644 index 0000000..5c27ba8 --- /dev/null +++ b/templates/user/notification/notification_div.tmpl @@ -0,0 +1,130 @@ +
    +
    + {{$notificationUnreadCount := call .NotificationUnreadCount}} +
    + +
    + + {{ctx.Locale.Tr "notification.subscriptions"}} + + {{if and (eq .Status 1)}} +
    + {{$.CsrfTokenHtml}} +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{if not .Notifications}} +
    + {{svg "octicon-inbox" 56 "tw-mb-4"}} + {{if eq .Status 1}} + {{ctx.Locale.Tr "notification.no_unread"}} + {{else}} + {{ctx.Locale.Tr "notification.no_read"}} + {{end}} +
    + {{else}} + {{range $notification := .Notifications}} +
    +
    + {{if .Issue}} + {{template "shared/issueicon" .Issue}} + {{else}} + {{svg "octicon-repo" 16 "text grey"}} + {{end}} +
    + +
    + {{.Repository.FullName}} {{if .Issue}}#{{.Issue.Index}}{{end}} + {{if eq .Status 3}} + {{svg "octicon-pin" 13 "text blue tw-mt-0.5 tw-ml-1"}} + {{end}} +
    +
    + + {{if .Issue}} + {{RenderRefIssueTitle $.Context .Issue.Title}} + {{else}} + {{.Repository.FullName}} + {{end}} + +
    +
    +
    + {{if .Issue}} + {{TimeSinceUnix .Issue.UpdatedUnix ctx.Locale}} + {{else}} + {{TimeSinceUnix .UpdatedUnix ctx.Locale}} + {{end}} +
    +
    + {{if ne .Status 3}} +
    + {{$.CsrfTokenHtml}} + + + +
    + {{end}} + {{if or (eq .Status 1) (eq .Status 3)}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{else if eq .Status 2}} +
    + {{$.CsrfTokenHtml}} + + + + +
    + {{end}} +
    +
    + {{end}} + {{end}} +
    +
    + {{template "base/paginate" .}} +
    +
    diff --git a/templates/user/notification/notification_subscriptions.tmpl b/templates/user/notification/notification_subscriptions.tmpl new file mode 100644 index 0000000..0a3ae99 --- /dev/null +++ b/templates/user/notification/notification_subscriptions.tmpl @@ -0,0 +1,84 @@ +{{template "base/head" .}} +
    +
    + +
    + {{if eq .Status 1}} + +
    + {{if not .Issues}} + {{ctx.Locale.Tr "notification.no_subscriptions"}} + {{else}} + {{template "shared/issuelist" dict "." . "listType" "dashboard"}} + {{end}} + {{else}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl new file mode 100644 index 0000000..ea5d805 --- /dev/null +++ b/templates/user/overview/header.tmpl @@ -0,0 +1,58 @@ + +
    + {{if and .HasProfileReadme .ContextUser.IsIndividual}} + + {{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}} + + {{end}} + + {{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}} + {{if .RepoCount}} +
    {{.RepoCount}}
    + {{end}} + +
    + {{if or .ContextUser.IsIndividual .CanReadProjects}} + + {{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}} + {{if .ProjectCount}} +
    {{.ProjectCount}}
    + {{end}} + +
    + {{end}} + {{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}} + + {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}} + {{if .PackageCount}} +
    {{.PackageCount}}
    + {{end}} + +
    + {{end}} + {{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}} + + {{svg "octicon-code"}} {{ctx.Locale.Tr "user.code"}} + + {{end}} + {{if .ContextUser.IsIndividual}} + {{if or (eq .TabName "activity") .IsAdmin (eq .SignedUserID .ContextUser.ID) (not .ContextUser.KeepActivityPrivate)}} + + {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}} + + {{end}} + {{if not .DisableStars}} + + {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}} + {{if .ContextUser.NumStars}} +
    {{.ContextUser.NumStars}}
    + {{end}} +
    + {{else}} + + {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}} + + {{end}} + {{end}} +
    +
    diff --git a/templates/user/overview/package_versions.tmpl b/templates/user/overview/package_versions.tmpl new file mode 100644 index 0000000..0ac2db0 --- /dev/null +++ b/templates/user/overview/package_versions.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "package/shared/versionlist" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "package/shared/versionlist" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/user/overview/packages.tmpl b/templates/user/overview/packages.tmpl new file mode 100644 index 0000000..bb2238b --- /dev/null +++ b/templates/user/overview/packages.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
    + {{template "org/header" .}} +
    + {{template "package/shared/list" .}} +
    +
    +{{else}} +
    +
    +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{template "package/shared/list" .}} +
    +
    +
    +
    +{{end}} +{{template "base/footer" .}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl new file mode 100644 index 0000000..477b838 --- /dev/null +++ b/templates/user/profile.tmpl @@ -0,0 +1,76 @@ +{{template "base/head" .}} +
    +
    + {{template "base/alert" .}} +
    +
    + {{template "shared/user/profile_big_avatar" .}} +
    +
    + {{template "user/overview/header" .}} + {{if eq .TabName "activity"}} + {{if eq .SignedUserID .ContextUser.ID}} +

    + {{if .ContextUser.KeepActivityPrivate}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.self_private" "/user/settings#keep-activity-private"}} + {{else}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.self_public" "/user/settings#keep-activity-private"}} + {{end}} +

    + {{else}} + {{if .IsAdmin}} +
    + {{if .ContextUser.KeepActivityPrivate}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_private"}} + {{else}} + {{ctx.Locale.Tr "user.public_activity.visibility_hint.admin_public"}} + {{end}} +
    + {{else}} + {{if .ContextUser.KeepActivityPrivate}} +

    {{ctx.Locale.Tr "user.disabled_public_activity"}}

    + {{end}} + {{end}} + {{end}} + {{if or .IsAdmin (eq .SignedUserID .ContextUser.ID) (not .ContextUser.KeepActivityPrivate)}} + {{template "user/heatmap" .}} + {{template "user/dashboard/feeds" .}} + {{end}} + {{else if eq .TabName "stars"}} +
    + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
    + {{else if eq .TabName "following"}} + {{template "repo/user_cards" .}} + {{else if eq .TabName "followers"}} + {{template "repo/user_cards" .}} + {{else if eq .TabName "overview"}} +
    {{.ProfileReadme}}
    + {{else}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} + {{end}} +
    +
    +
    +
    + + + +{{template "base/footer" .}} diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl new file mode 100644 index 0000000..a97136f --- /dev/null +++ b/templates/user/settings/account.tmpl @@ -0,0 +1,180 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings account")}} +
    +

    + {{ctx.Locale.Tr "settings.change_password"}} +

    +
    + {{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}} +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + {{if .SignedUser.IsPasswordSet}} +
    + + +
    + {{end}} +
    + + +
    +
    + + +
    + +
    + + {{ctx.Locale.Tr "auth.forgot_password"}} +
    +
    + {{else}} +
    +

    {{ctx.Locale.Tr "settings.password_change_disabled"}}

    +
    + {{end}} +
    + +

    + {{ctx.Locale.Tr "settings.manage_emails"}} +

    +
    +
    + {{if $.EnableNotifyMail}} +
    +
    {{ctx.Locale.Tr "settings.email_desc"}}
    +
    + {{$.CsrfTokenHtml}} + +
    + + +
    +
    +
    + {{end}} + {{range .Emails}} +
    + {{if not .IsPrimary}} +
    + +
    + {{if .CanBePrimary}} +
    +
    + {{$.CsrfTokenHtml}} + + + +
    +
    + {{end}} + {{end}} + {{if not .IsActivated}} +
    +
    + {{$.CsrfTokenHtml}} + + + {{if $.ActivationsPending}} + + {{else}} + + {{end}} +
    +
    + {{end}} +
    + {{.Email}} + {{if .IsPrimary}} +
    {{ctx.Locale.Tr "settings.primary"}}
    + {{end}} + {{if .IsActivated}} +
    {{ctx.Locale.Tr "settings.activated"}}
    + {{else}} +
    {{ctx.Locale.Tr "settings.requires_activation"}}
    + {{end}} +
    +
    + {{end}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + {{/* if ActivationsPending is false, then CanAddEmails must be true, so if CanAddEmails is false, ActivationsPending must be true */}} + {{if not .CanAddEmails}} +
    {{ctx.Locale.Tr "settings.can_not_add_email_activations_pending"}}
    + {{end}} +
    + + {{if not ($.UserDisabledFeatures.Contains "deletion")}} +

    + {{ctx.Locale.Tr "settings.delete_account"}} +

    +
    +
    +

    {{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}

    + {{if .UserDeleteWithComments}} +

    {{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}

    + {{end}} +
    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    +
    + +
    +
    + +
    + {{end}} +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/actions.tmpl b/templates/user/settings/actions.tmpl new file mode 100644 index 0000000..abc5443 --- /dev/null +++ b/templates/user/settings/actions.tmpl @@ -0,0 +1,12 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings actions")}} +
    + {{if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/appearance.tmpl b/templates/user/settings/appearance.tmpl new file mode 100644 index 0000000..2aaf24a --- /dev/null +++ b/templates/user/settings/appearance.tmpl @@ -0,0 +1,195 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} +
    + + +

    + {{ctx.Locale.Tr "settings.manage_themes"}} +

    +
    + +
    + + +

    + {{ctx.Locale.Tr "settings.language.title"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.language.description"}} +
    + {{.CsrfTokenHtml}} +
    + +
    +
    + {{ctx.Locale.Tr "settings.language.localization_project" "https://forgejo.org/docs/next/contributor/localization/"}} +
    +
    + +
    +
    +
    + + +

    + {{ctx.Locale.Tr "settings.hints"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    +
    + + +
    +
    +
    + +
    +
    +
    + + +

    + {{ctx.Locale.Tr "settings.hidden_comment_types"}} +

    +
    +

    + {{ctx.Locale.Tr "settings.hidden_comment_types_description"}} +

    +
    + {{.CsrfTokenHtml}} +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl new file mode 100644 index 0000000..04d4dcd --- /dev/null +++ b/templates/user/settings/applications.tmpl @@ -0,0 +1,113 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} +
    +

    + {{ctx.Locale.Tr "settings.manage_access_token"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.tokens_desc"}} +
    + {{range .Tokens}} +
    +
    + + {{svg "fontawesome-send" 32}} + +
    +
    +
    + {{.Name}} +

    + {{ctx.Locale.Tr "settings.repo_and_org_access"}}: + {{if .DisplayPublicOnly}} + {{ctx.Locale.Tr "settings.permissions_public_only"}} + {{else}} + {{ctx.Locale.Tr "settings.permissions_access_all"}} + {{end}} +

    +

    {{ctx.Locale.Tr "settings.permissions_list"}}

    +
      + {{range .Scope.StringSlice}} + {{if (ne . $.AccessTokenScopePublicOnly)}} +
    • {{.}}
    • + {{end}} + {{end}} +
    +
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{ctx.Locale.Tr "settings.generate_new_token"}} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + + +
    +
    + + {{ctx.Locale.Tr "settings.select_permissions"}} + +

    +

    {{ctx.Locale.Tr "settings.access_token_desc" (HTMLFormat `href="%s/api/swagger" target="_blank"` AppSubUrl) (`href="https://forgejo.org/docs/latest/user/token-scope/" target="_blank"`|SafeHTML)}}

    +

    +
    +
    + +
    {{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}} +
    + {{ctx.Locale.Tr "settings.at_least_one_permission"}} +
    +
    + + {{if .EnableOAuth2}} + {{template "user/settings/grants_oauth2" .}} + {{template "user/settings/applications_oauth2" .}} + {{end}} +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2.tmpl b/templates/user/settings/applications_oauth2.tmpl new file mode 100644 index 0000000..866a1f8 --- /dev/null +++ b/templates/user/settings/applications_oauth2.tmpl @@ -0,0 +1,6 @@ +

    + {{ctx.Locale.Tr "settings.manage_oauth2_applications"}} +

    + +{{template "user/settings/applications_oauth2_list" .}} + diff --git a/templates/user/settings/applications_oauth2_edit.tmpl b/templates/user/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..2858ecd --- /dev/null +++ b/templates/user/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,6 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} +
    + + {{template "user/settings/applications_oauth2_edit_form" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl new file mode 100644 index 0000000..199d43a --- /dev/null +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -0,0 +1,54 @@ +

    + {{ctx.Locale.Tr "settings.edit_oauth2_application"}} +

    +
    +

    {{ctx.Locale.Tr "settings.oauth2_application_create_description"}}

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{if .ClientSecret}} +
    + + +
    + {{else}} +
    + + +
    + {{end}} +
    + +
    + {{.CsrfTokenHtml}} + {{ctx.Locale.Tr "settings.oauth2_regenerate_secret_hint"}} + +
    +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    + +
    +
    diff --git a/templates/user/settings/applications_oauth2_list.tmpl b/templates/user/settings/applications_oauth2_list.tmpl new file mode 100644 index 0000000..74cdac4 --- /dev/null +++ b/templates/user/settings/applications_oauth2_list.tmpl @@ -0,0 +1,74 @@ +
    +
    +
    + {{ctx.Locale.Tr "settings.oauth2_application_create_description"}} +
    + {{range .Applications}} +
    +
    + {{svg "octicon-apps" 32}} +
    +
    +
    {{.Name}}
    +
    + {{ctx.Locale.Tr "settings.oauth2_client_id"}} + {{.ClientID}} +
    +
    + {{$isBuiltin := and $.BuiltinApplications (index $.BuiltinApplications .ClientID)}} +
    + {{if $isBuiltin}} + {{ctx.Locale.Tr "locked"}} + {{else}} + + {{svg "octicon-pencil" 16 "tw-mr-1"}} + {{ctx.Locale.Tr "settings.oauth2_application_edit"}} + + + {{end}} +
    +
    + {{end}} +
    + + +
    + +
    +
    + {{ctx.Locale.Tr "settings.create_oauth2_application"}} +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    + + +
    +
    + +
    +
    diff --git a/templates/user/settings/blocked_users.tmpl b/templates/user/settings/blocked_users.tmpl new file mode 100644 index 0000000..5256503 --- /dev/null +++ b/templates/user/settings/blocked_users.tmpl @@ -0,0 +1,10 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings blocked-users")}} +
    +

    + {{ctx.Locale.Tr "settings.blocked_users"}} +

    +
    + {{template "shared/blocked_users_list" .}} +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/grants_oauth2.tmpl b/templates/user/settings/grants_oauth2.tmpl new file mode 100644 index 0000000..e89d275 --- /dev/null +++ b/templates/user/settings/grants_oauth2.tmpl @@ -0,0 +1,40 @@ +

    + {{ctx.Locale.Tr "settings.authorized_oauth2_applications"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.authorized_oauth2_applications_description"}} +
    + {{range .Grants}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Application.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}}

    +
    +
    +
    + +
    +
    + {{end}} +
    + + +
    diff --git a/templates/user/settings/hook_new.tmpl b/templates/user/settings/hook_new.tmpl new file mode 100644 index 0000000..be21f59 --- /dev/null +++ b/templates/user/settings/hook_new.tmpl @@ -0,0 +1,7 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings new webhook")}} +
    + {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/hooks.tmpl b/templates/user/settings/hooks.tmpl new file mode 100644 index 0000000..477c333 --- /dev/null +++ b/templates/user/settings/hooks.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings webhooks")}} +
    + {{template "repo/settings/webhook/list" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/keys.tmpl b/templates/user/settings/keys.tmpl new file mode 100644 index 0000000..e0f5e42 --- /dev/null +++ b/templates/user/settings/keys.tmpl @@ -0,0 +1,11 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} +
    + {{if not ($.UserDisabledFeatures.Contains "manage_ssh_keys")}} + {{template "user/settings/keys_ssh" .}} + {{end}} + {{template "user/settings/keys_principal" .}} + {{if not ($.UserDisabledFeatures.Contains "manage_gpg_keys")}} + {{template "user/settings/keys_gpg" .}} + {{end}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl new file mode 100644 index 0000000..f5e91ce --- /dev/null +++ b/templates/user/settings/keys_gpg.tmpl @@ -0,0 +1,129 @@ +

    + {{ctx.Locale.Tr "settings.manage_gpg_keys"}} +
    + +
    +

    +
    +
    +
    + {{.CsrfTokenHtml}} + +
    + + +
    + {{if .Err_Signature}} +
    +

    {{ctx.Locale.Tr "settings.gpg_token_required"}}

    +
    +
    + + +
    +

    {{ctx.Locale.Tr "settings.gpg_token_help"}}

    +

    {{printf `echo "%s" | gpg -a --default-key %s --detach-sig` .TokenToSign .PaddedKeyID}}

    +
    +
    +
    + + +
    + {{end}} + + + +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "settings.gpg_desc"}}
    + {{ctx.Locale.Tr "settings.gpg_helper" "https://docs.codeberg.org/security/gpg-key/"}} +

    +
    + {{range .GPGKeys}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    + {{if .Verified}} + {{svg "octicon-verified"}} {{ctx.Locale.Tr "settings.gpg_key_verified"}} + {{end}} + {{if .Emails}} + {{svg "octicon-mail"}} {{ctx.Locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}{{.Email}} {{end}} + {{end}} +
    + {{ctx.Locale.Tr "settings.key_id"}}: {{.PaddedKeyID}} + {{ctx.Locale.Tr "settings.subkeys"}}: {{range .SubsKey}} {{.PaddedKeyID}} {{end}} +
    +
    +

    + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .AddedUnix)}} + - + {{if not .ExpiredUnix.IsZero}} + {{ctx.Locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix)}} + {{else}} + {{ctx.Locale.Tr "settings.valid_forever"}} + {{end}} +

    +
    +
    +
    + + {{if and (not .Verified) (ne $.VerifyingID .KeyID)}} + {{ctx.Locale.Tr "settings.gpg_key_verify"}} + {{end}} +
    +
    + {{if and (not .Verified) (eq $.VerifyingID .KeyID)}} +
    +

    {{ctx.Locale.Tr "settings.gpg_token_required"}}

    +
    + {{$.CsrfTokenHtml}} + + + +
    + + +
    +

    {{ctx.Locale.Tr "settings.gpg_token_help"}}

    +

    {{printf `echo "%s" | gpg -a --default-key %s --detach-sig` $.TokenToSign .PaddedKeyID}}

    +
    +
    +
    +
    + + +
    + + + + {{ctx.Locale.Tr "settings.cancel"}} + +
    +
    + {{end}} + {{end}} +
    + +
    diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl new file mode 100644 index 0000000..94b1b2c --- /dev/null +++ b/templates/user/settings/keys_principal.tmpl @@ -0,0 +1,69 @@ +{{if .AllowPrincipals}} +

    + {{ctx.Locale.Tr "settings.manage_ssh_principals"}} +
    + {{if not .DisableSSH}} + + {{else}} + + {{end}} +
    +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.principal_desc"}} +
    + {{range .Principals}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info" 16}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    + +
    +

    + {{ctx.Locale.Tr "settings.add_new_principal"}} +

    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + + + +
    +
    +
    + + +{{end}} diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl new file mode 100644 index 0000000..058dc9c --- /dev/null +++ b/templates/user/settings/keys_ssh.tmpl @@ -0,0 +1,111 @@ +

    + {{ctx.Locale.Tr "settings.manage_ssh_keys"}} +
    + +
    +

    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + + + +
    +
    +
    +
    +

    + {{ctx.Locale.Tr "settings.ssh_desc"}}
    + {{ctx.Locale.Tr "settings.ssh_helper" "https://docs.codeberg.org/security/ssh-key/" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh"}} +

    +
    + {{if .DisableSSH}} +
    + {{ctx.Locale.Tr "settings.ssh_signonly"}} +
    + {{end}} + {{range $index, $key := .Keys}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    + {{if .Verified}} +
    {{svg "octicon-verified"}}{{ctx.Locale.Tr "settings.ssh_key_verified"}}
    + {{end}} +
    {{.Name}}
    +
    + {{.Fingerprint}} +
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

    +
    +
    +
    + + {{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}} + {{ctx.Locale.Tr "settings.ssh_key_verify"}} + {{end}} +
    +
    + {{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}} +
    +

    {{ctx.Locale.Tr "settings.ssh_token_required"}}

    +
    + {{$.CsrfTokenHtml}} + + + +
    + + +
    +

    {{ctx.Locale.Tr "settings.ssh_token_help"}}

    +

    {{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}

    +
    +
    +
    +
    + + +
    + + + + {{ctx.Locale.Tr "settings.cancel"}} + +
    +
    + {{end}} + {{end}} +
    + +
    diff --git a/templates/user/settings/layout_footer.tmpl b/templates/user/settings/layout_footer.tmpl new file mode 100644 index 0000000..46120d5 --- /dev/null +++ b/templates/user/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    + {{/* block: user-setting-content */}} +{{end}} + +
    +
    +
    +{{template "base/footer" .}} diff --git a/templates/user/settings/layout_head.tmpl b/templates/user/settings/layout_head.tmpl new file mode 100644 index 0000000..dce496e --- /dev/null +++ b/templates/user/settings/layout_head.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .ctxData}} +
    +
    + {{template "user/settings/navbar" .ctxData}} +
    + {{template "base/alert" .ctxData}} + {{/* block: user-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
    +
    +
    +{{end}} diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl new file mode 100644 index 0000000..d45d89e --- /dev/null +++ b/templates/user/settings/navbar.tmpl @@ -0,0 +1,58 @@ + diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl new file mode 100644 index 0000000..16c27b5 --- /dev/null +++ b/templates/user/settings/organization.tmpl @@ -0,0 +1,55 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings organization")}} +
    +

    + {{ctx.Locale.Tr "settings.orgs"}} + {{if .SignedUser.CanCreateOrganization}} + + {{end}} +

    +
    + {{if .Orgs}} +
    + {{range .Orgs}} +
    +
    + {{ctx.AvatarUtils.Avatar . 28 "mini"}} +
    +
    +
    {{template "shared/user/name" .}}
    +
    + {{.Description}} +
    +
    +
    +
    + {{$.CsrfTokenHtml}} + +
    +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} + {{ctx.Locale.Tr "settings.orgs_none"}} + {{end}} +
    +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages.tmpl b/templates/user/settings/packages.tmpl new file mode 100644 index 0000000..bd7d69b --- /dev/null +++ b/templates/user/settings/packages.tmpl @@ -0,0 +1,24 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} +
    + {{template "package/shared/cleanup_rules/list" .}} + {{template "package/shared/cargo" .}} + +

    + {{ctx.Locale.Tr "packages.owner.settings.chef.title"}} +

    +
    +
    +
    + +
    +
    + {{.CsrfTokenHtml}} + +
    +
    + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_edit.tmpl b/templates/user/settings/packages_cleanup_rules_edit.tmpl new file mode 100644 index 0000000..522b524 --- /dev/null +++ b/templates/user/settings/packages_cleanup_rules_edit.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} +
    + {{template "package/shared/cleanup_rules/edit" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_preview.tmpl b/templates/user/settings/packages_cleanup_rules_preview.tmpl new file mode 100644 index 0000000..d99aee4 --- /dev/null +++ b/templates/user/settings/packages_cleanup_rules_preview.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user packages admin")}} +
    + {{template "package/shared/cleanup_rules/preview" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl new file mode 100644 index 0000000..a092a42 --- /dev/null +++ b/templates/user/settings/profile.tmpl @@ -0,0 +1,166 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings profile")}} +
    +

    + {{ctx.Locale.Tr "settings.public_profile"}} +

    +
    +

    {{ctx.Locale.Tr "settings.profile_desc"}}

    +
    + {{.CsrfTokenHtml}} +
    + + + {{if or (not .SignedUser.IsLocal) .IsReverseProxy}} +

    {{ctx.Locale.Tr "settings.password_username_disabled"}}

    + {{end}} +
    +
    + + +
    +
    + + + +
    +
    + +

    {{.SignedUser.Email}}

    +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + + +
    + +
    + +
    + + +
    + +
    +
    + + +
    + {{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}} +
    + +
    +
    + + +
    + {{ctx.Locale.Tr "settings.keep_activity_private.description" (printf "/%s?tab=activity" .SignedUser.Name)}} +
    + +
    + +
    + +
    +
    +
    + +

    + {{ctx.Locale.Tr "settings.avatar"}} +

    +
    +
    + {{.CsrfTokenHtml}} + {{if not .DisableGravatar}} +
    +
    + + +
    +
    +
    + + +
    + {{end}} + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + +
    +
    +
    +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl new file mode 100644 index 0000000..09b00f0 --- /dev/null +++ b/templates/user/settings/repos.tmpl @@ -0,0 +1,130 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings repos")}} +
    +

    + {{ctx.Locale.Tr "settings.repos"}} +

    +
    + {{if or .allowAdopt .allowDelete}} + {{if .Dirs}} +
    + {{range $dirI, $dir := .Dirs}} + {{$repo := index $.ReposMap $dir}} +
    {{/* if not repo, then there are "adapt" buttons, so the padding shouldn't be that default large*/}} +
    + {{if $repo}} + {{if $repo.IsPrivate}} + {{svg "octicon-lock"}} + {{else if $repo.IsFork}} + {{svg "octicon-repo-forked"}} + {{else if $repo.IsMirror}} + {{svg "octicon-mirror"}} + {{else if $repo.IsTemplate}} + {{svg "octicon-repo-template"}} + {{else}} + {{svg "octicon-repo"}} + {{end}} + {{$repo.OwnerName}}/{{$repo.Name}} + {{ctx.Locale.TrSize $repo.Size}} + {{if $repo.IsFork}} + {{ctx.Locale.Tr "repo.forked_from"}} + {{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}} + {{end}} + {{else}} + {{svg "octicon-file-directory-fill"}} + {{$.ContextUser.Name}}/{{$dir}} +
    + {{if $.allowAdopt}} + + + {{end}} + {{if $.allowDelete}} + + + {{end}} +
    + {{end}} +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{ctx.Locale.Tr "settings.repos_none"}} +
    + {{end}} + {{else}} + {{if .Repos}} +
    + {{range .Repos}} +
    +
    + {{if .IsPrivate}} + {{svg "octicon-lock" 16 "tw-mr-1 iconFloat text gold"}} + {{else if .IsFork}} + {{svg "octicon-repo-forked" 16 "tw-mr-1 iconFloat"}} + {{else if .IsMirror}} + {{svg "octicon-mirror" 16 "tw-mr-1 iconFloat"}} + {{else if .IsTemplate}} + {{svg "octicon-repo-template" 16 "tw-mr-1 iconFloat"}} + {{else}} + {{svg "octicon-repo" 16 "tw-mr-1 iconFloat"}} + {{end}} + {{.OwnerName}}/{{.Name}} + {{ctx.Locale.TrSize .Size}} + {{if .IsFork}} + {{ctx.Locale.Tr "repo.forked_from"}} + {{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}} + {{end}} +
    +
    + {{end}} +
    + {{template "base/paginate" .}} + {{else}} +
    + {{ctx.Locale.Tr "settings.repos_none"}} +
    + {{end}} + {{end}} +
    +
    + + + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/runner_edit.tmpl b/templates/user/settings/runner_edit.tmpl new file mode 100644 index 0000000..90c58c1 --- /dev/null +++ b/templates/user/settings/runner_edit.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings runners")}} +
    + {{template "shared/actions/runner_edit" .}} +
    +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/accountlinks.tmpl b/templates/user/settings/security/accountlinks.tmpl new file mode 100644 index 0000000..0820844 --- /dev/null +++ b/templates/user/settings/security/accountlinks.tmpl @@ -0,0 +1,62 @@ +{{/* No account links, no way to add account links: Menu will not be shown. */}} +{{if or .AccountLinks .OrderedOAuth2Names}} +

    + {{ctx.Locale.Tr "settings.manage_account_links"}} + {{if .OrderedOAuth2Names}} +
    + +
    + {{end}} +

    + +
    +
    +
    + {{ctx.Locale.Tr "settings.manage_account_links_desc"}} +
    + {{range $loginSource, $provider := .AccountLinks}} +
    + {{$providerData := index $.OAuth2Providers $loginSource.Name}} +
    + {{$providerData.IconHTML 20}} +
    +
    + + {{$loginSource.Name}} + + {{if $loginSource.IsActive}} + {{ctx.Locale.Tr "repo.settings.active"}} + {{end}} +
    +
    + +
    +
    + {{end}} +
    + + +
    +{{end}} diff --git a/templates/user/settings/security/openid.tmpl b/templates/user/settings/security/openid.tmpl new file mode 100644 index 0000000..b0473c9 --- /dev/null +++ b/templates/user/settings/security/openid.tmpl @@ -0,0 +1,63 @@ +

    + {{ctx.Locale.Tr "settings.manage_openid"}} +

    +
    +
    +
    + {{ctx.Locale.Tr "settings.openid_desc"}} +
    + {{range .OpenIDs}} +
    +
    + {{svg "fontawesome-openid" 20}} +
    +
    +
    {{.URI}}
    +
    +
    +
    + {{$.CsrfTokenHtml}} + + {{if .Show}} + + {{else}} + + {{end}} +
    + +
    +
    + {{end}} +
    +
    +
    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + +
    diff --git a/templates/user/settings/security/security.tmpl b/templates/user/settings/security/security.tmpl new file mode 100644 index 0000000..aee0456 --- /dev/null +++ b/templates/user/settings/security/security.tmpl @@ -0,0 +1,11 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings security")}} +
    + {{template "user/settings/security/twofa" .}} + {{template "user/settings/security/webauthn" .}} + {{template "user/settings/security/accountlinks" .}} + {{if .EnableOpenIDSignIn}} + {{template "user/settings/security/openid" .}} + {{end}} +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl new file mode 100644 index 0000000..adebce4 --- /dev/null +++ b/templates/user/settings/security/twofa.tmpl @@ -0,0 +1,37 @@ +

    + {{ctx.Locale.Tr "settings.twofa"}} +

    +
    +

    {{ctx.Locale.Tr "settings.twofa_desc"}}

    + {{if .TOTPEnrolled}} +

    {{ctx.Locale.Tr "settings.twofa_is_enrolled"}}

    +
    + {{.CsrfTokenHtml}} +

    {{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}

    + +
    +
    + {{.CsrfTokenHtml}} +

    {{ctx.Locale.Tr "settings.twofa_disable_note"}}

    + +
    + {{else}} + {{/* The recovery tip is there as a means of encouraging a user to enroll */}} +

    {{ctx.Locale.Tr "settings.twofa_recovery_tip"}}

    +

    {{ctx.Locale.Tr "settings.twofa_not_enrolled"}}

    + + {{end}} + + +
    diff --git a/templates/user/settings/security/twofa_enroll.tmpl b/templates/user/settings/security/twofa_enroll.tmpl new file mode 100644 index 0000000..d6bfadf --- /dev/null +++ b/templates/user/settings/security/twofa_enroll.tmpl @@ -0,0 +1,25 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings twofa")}} +
    +

    + {{ctx.Locale.Tr "settings.twofa_enroll"}} +

    +
    +

    {{ctx.Locale.Tr "settings.scan_this_image"}}

    + {{.TwofaSecret}} +

    {{ctx.Locale.Tr "settings.or_enter_secret" .TwofaSecret}}

    +

    {{ctx.Locale.Tr "settings.then_enter_passcode"}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    +
    +
    + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl new file mode 100644 index 0000000..346f61c --- /dev/null +++ b/templates/user/settings/security/webauthn.tmpl @@ -0,0 +1,43 @@ +

    {{ctx.Locale.Tr "settings.webauthn"}}

    +
    +

    {{ctx.Locale.Tr "settings.webauthn_desc" "https://w3c.github.io/webauthn/#webauthn-authenticator"}}

    +

    {{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}

    + {{template "user/auth/webauthn_error" .}} +
    + {{range .WebAuthnCredentials}} +
    +
    + {{svg "octicon-key" 32}} +
    +
    +
    {{.Name}}
    +
    +

    {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}}

    +
    +
    +
    + +
    +
    + {{end}} +
    +
    +
    + + +
    + +
    + +
    diff --git a/templates/webhook/new.tmpl b/templates/webhook/new.tmpl new file mode 100644 index 0000000..a3fd896 --- /dev/null +++ b/templates/webhook/new.tmpl @@ -0,0 +1,44 @@ +

    + {{.CustomHeaderTitle}} + +

    +
    + {{with .ctxData}} + + {{if eq .HookType "forgejo"}} + {{template "webhook/new/forgejo" .}} + {{else if eq .HookType "gitea"}} + {{template "webhook/new/gitea" .}} + {{else if eq .HookType "gogs"}} + {{template "webhook/new/gogs" .}} + {{else if eq .HookType "slack"}} + {{template "webhook/new/slack" .}} + {{else if eq .HookType "discord"}} + {{template "webhook/new/discord" .}} + {{else if eq .HookType "dingtalk"}} + {{template "webhook/new/dingtalk" .}} + {{else if eq .HookType "telegram"}} + {{template "webhook/new/telegram" .}} + {{else if eq .HookType "msteams"}} + {{template "webhook/new/msteams" .}} + {{else if eq .HookType "feishu"}} + {{template "webhook/new/feishu" .}} + {{else if eq .HookType "matrix"}} + {{template "webhook/new/matrix" .}} + {{else if eq .HookType "wechatwork"}} + {{template "webhook/new/wechatwork" .}} + {{else if eq .HookType "packagist"}} + {{template "webhook/new/packagist" .}} + {{else if eq .HookType "sourcehut_builds"}} + {{template "webhook/new/sourcehut_builds" .}} + {{end}} + {{end}} +
    +{{template "repo/settings/webhook/history" .ctxData}} diff --git a/templates/webhook/new/dingtalk.tmpl b/templates/webhook/new/dingtalk.tmpl new file mode 100644 index 0000000..e805ead --- /dev/null +++ b/templates/webhook/new/dingtalk.tmpl @@ -0,0 +1,9 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/discord.tmpl b/templates/webhook/new/discord.tmpl new file mode 100644 index 0000000..455a96c --- /dev/null +++ b/templates/webhook/new/discord.tmpl @@ -0,0 +1,17 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://discord.com" (ctx.Locale.Tr "repo.settings.web_hook_name_discord")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/feishu.tmpl b/templates/webhook/new/feishu.tmpl new file mode 100644 index 0000000..10c2827 --- /dev/null +++ b/templates/webhook/new/feishu.tmpl @@ -0,0 +1,10 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://feishu.cn" (ctx.Locale.Tr "repo.settings.web_hook_name_feishu_only")}}

    +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://larksuite.com" (ctx.Locale.Tr "repo.settings.web_hook_name_larksuite_only")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/forgejo.tmpl b/templates/webhook/new/forgejo.tmpl new file mode 100644 index 0000000..cdb3334 --- /dev/null +++ b/templates/webhook/new/forgejo.tmpl @@ -0,0 +1,38 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://forgejo.org/docs/latest/user/webhooks/" (ctx.Locale.Tr "repo.settings.web_hook_name_forgejo")}}

    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/gitea.tmpl b/templates/webhook/new/gitea.tmpl new file mode 100644 index 0000000..3926370 --- /dev/null +++ b/templates/webhook/new/gitea.tmpl @@ -0,0 +1,38 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://forgejo.org/docs/latest/user/webhooks/" (ctx.Locale.Tr "repo.settings.web_hook_name_gitea")}}

    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/gogs.tmpl b/templates/webhook/new/gogs.tmpl new file mode 100644 index 0000000..5b6cd72 --- /dev/null +++ b/templates/webhook/new/gogs.tmpl @@ -0,0 +1,26 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://forgejo.org/docs/latest/user/webhooks/" (ctx.Locale.Tr "repo.settings.web_hook_name_gogs")}}

    +
    + {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/matrix.tmpl b/templates/webhook/new/matrix.tmpl new file mode 100644 index 0000000..920180d --- /dev/null +++ b/templates/webhook/new/matrix.tmpl @@ -0,0 +1,32 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://matrix.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_matrix")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + +
    + + + {{ctx.Locale.Tr "repo.settings.matrix.access_token_helper"}} +
    +
    + + + {{ctx.Locale.Tr "repo.settings.matrix.room_id_helper" ("!opaque_id:example.org"|SafeHTML)}} +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/msteams.tmpl b/templates/webhook/new/msteams.tmpl new file mode 100644 index 0000000..535d0fc --- /dev/null +++ b/templates/webhook/new/msteams.tmpl @@ -0,0 +1,9 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://teams.microsoft.com" (ctx.Locale.Tr "repo.settings.web_hook_name_msteams")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/packagist.tmpl b/templates/webhook/new/packagist.tmpl new file mode 100644 index 0000000..04240bb --- /dev/null +++ b/templates/webhook/new/packagist.tmpl @@ -0,0 +1,17 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://packagist.org" (ctx.Locale.Tr "repo.settings.web_hook_name_packagist")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/slack.tmpl b/templates/webhook/new/slack.tmpl new file mode 100644 index 0000000..cfaeb41 --- /dev/null +++ b/templates/webhook/new/slack.tmpl @@ -0,0 +1,26 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://slack.com" (ctx.Locale.Tr "repo.settings.web_hook_name_slack")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/sourcehut_builds.tmpl b/templates/webhook/new/sourcehut_builds.tmpl new file mode 100644 index 0000000..3bcbe1b --- /dev/null +++ b/templates/webhook/new/sourcehut_builds.tmpl @@ -0,0 +1,39 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://sourcehut.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_sourcehut_builds")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + + {{ctx.Locale.Tr "repo.settings.sourcehut_builds.secrets_helper"}} +
    +
    + +
    + + + {{ctx.Locale.Tr "repo.settings.sourcehut_builds.access_token_helper" "https://meta.sr.ht/oauth2/personal-token?grants=builds.sr.ht/JOBS:RW" "https://meta.sr.ht/oauth2/personal-token?grants=builds.sr.ht/JOBS:RW+builds.sr.ht/SECRETS:RO"}} +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/telegram.tmpl b/templates/webhook/new/telegram.tmpl new file mode 100644 index 0000000..3627dff --- /dev/null +++ b/templates/webhook/new/telegram.tmpl @@ -0,0 +1,17 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (ctx.Locale.Tr "repo.settings.web_hook_name_telegram")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    +
    + + +
    +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/new/wechatwork.tmpl b/templates/webhook/new/wechatwork.tmpl new file mode 100644 index 0000000..ae9d36a --- /dev/null +++ b/templates/webhook/new/wechatwork.tmpl @@ -0,0 +1,9 @@ +

    {{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://work.weixin.qq.com" (ctx.Locale.Tr "repo.settings.web_hook_name_wechatwork")}}

    +
    + {{.CsrfTokenHtml}} +
    + + +
    + {{template "webhook/shared-settings" .}} +
    diff --git a/templates/webhook/shared-settings.tmpl b/templates/webhook/shared-settings.tmpl new file mode 100644 index 0000000..b6c05b7 --- /dev/null +++ b/templates/webhook/shared-settings.tmpl @@ -0,0 +1,193 @@ +{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}} +
    +
    + {{ctx.Locale.Tr "repo.settings.event_desc"}} + + + +
    + +
    + {{ctx.Locale.Tr "repo.settings.event_header_repository"}} + + + + + + + + + + + + + + + + +
    + +
    + {{ctx.Locale.Tr "repo.settings.event_header_issue"}} + + + + + + + + + + +
    + +
    + {{ctx.Locale.Tr "repo.settings.event_header_pull_request"}} + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + +
    + + + {{ctx.Locale.Tr "repo.settings.branch_filter_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}} +
    + +{{$skipAuthorizationHeader := or (eq .HookType "sourcehut_builds") (eq .HookType "matrix")}} +{{if not $skipAuthorizationHeader}} + +
    + + + {{ctx.Locale.Tr "repo.settings.authorization_header_desc" ("Bearer token123456, Basic YWxhZGRpbjpvcGVuc2VzYW1l" | SafeHTML)}} +
    +{{end}} + +
    + +
    + + {{if $isNew}} + + {{else}} + + {{ctx.Locale.Tr "repo.settings.delete_webhook"}} + {{end}} +
    + +{{template "repo/settings/webhook/delete_modal" .}} -- cgit v1.2.3