diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b7594a1ba7..91d001e078 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,11 @@ Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for backports. -2. Make sure you have read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md . -3. For documentations contribution, please go to https://gitea.com/gitea/docs -4. Describe what your pull request does and which issue you're targeting (if any). -5. It is recommended to enable "Allow edits by maintainers", so maintainers can help more easily. -6. Your input here will be included in the commit message when this PR has been merged. If you don't want some content to be included, please separate them with a line like `---`. -7. Delete all these tips before posting. +2. Use a Conventional Commits PR title, for example `fix(repo): handle empty branch names`. +3. Make sure you have read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md . +4. For documentations contribution, please go to https://gitea.com/gitea/docs +5. Describe what your pull request does and which issue you're targeting (if any). +6. It is recommended to enable "Allow edits by maintainers", so maintainers can help more easily. +7. Your input here will be included in the commit message when this PR has been merged. If you don't want some content to be included, please separate them with a line like `---`. +8. Delete all these tips before posting. diff --git a/.github/workflows/pull-pr-title.yml b/.github/workflows/pull-pr-title.yml new file mode 100644 index 0000000000..59b0e78c40 --- /dev/null +++ b/.github/workflows/pull-pr-title.yml @@ -0,0 +1,28 @@ +name: pr-title + +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + - ready_for_review + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + lint-pr-title: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - run: make lint-pr-title + env: + PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/AGENTS.md b/AGENTS.md index fd87f432b7..276023f234 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,7 @@ - Run single playwright e2e test files with `GITEA_TEST_E2E_FLAGS='' make test-e2e` - Add the current year into the copyright header of new `.go` files - Ensure no trailing whitespace in edited files +- Use Conventional Commits format for commit messages and PR titles (e.g. `type(scope): subject`) - Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates - Preserve existing code comments, do not remove or rewrite comments that are still relevant - In TypeScript, use `!` (non-null assertion) instead of `?.`/`??` when a value is known to always exist diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b6b94269..f807f16b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1383,7 +1383,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com). * Fix mCaptcha bug (#33659) (#33661) * Git graph: don't show detached commits (#33645) (#33650) * Use MatchPhraseQuery for bleve code search (#33628) - * Adjust appearence of commit status webhook (#33778) #33789 + * Adjust appearance of commit status webhook (#33778) #33789 * Upgrade golang net from 0.35.0 -> 0.36.0 (#33795) #33796 ## [1.23.4](https://github.com/go-gitea/gitea/releases/tag/v1.23.4) - 2025-02-16 @@ -2114,7 +2114,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com). * Optimize repo-list layout to enhance visual experience (#31272) (#31276) * fixed the dropdown menu for the top New button to expand to the left (#31273) (#31275) * Fix Activity Page Contributors dropdown (#31264) (#31269) - * fix: allow actions artifacts storage migration to complete succesfully (#31251) (#31257) + * fix: allow actions artifacts storage migration to complete successfully (#31251) (#31257) * Make blockquote attention recognize more syntaxes (#31240) (#31250) * Remove .segment from .project-column (#31204) (#31239) * Ignore FindRecentlyPushedNewBranches err (#31164) (#31171) @@ -2298,7 +2298,7 @@ Key highlights of this release encompass significant changes categorized under ` * Performance optimization for git push and check permissions for push options (#30104) (#30354) * BUGFIXES * Fix close file in the Upload func (#30262) (#30269) - * Fix inline math blocks can't be preceeded/followed by alphanumerical characters (#30175) (#30250) + * Fix inline math blocks can't be preceded/followed by alphanumerical characters (#30175) (#30250) * Fix missing 0 prefix of GPG key id (#30245) (#30247) * Include encoding in signature payload (#30174) (#30181) * Move from `max( id )` to `max( index )` for latest commit statuses (#30076) (#30155) @@ -5590,7 +5590,7 @@ Key highlights of this release encompass significant changes categorized under ` * Fix navbar on project view (#17749) * More pleasantly handle broken or missing git repositories (#17747) * Use `*PushUpdateOptions` as receiver (#17724) - * Remove unused `user` paramater (#17723) + * Remove unused `user` parameter (#17723) * Better builtin avatar generator (#17707) * Cleanup and use global style on popups (#17674) * Move user/org deletion to services (#17673) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1871f1470..c62950d84b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -189,6 +189,22 @@ In the PR title, describe the problem you are fixing, not how you are fixing it. Use the first comment as a summary of your PR. \ In the PR summary, you can describe exactly how you are fixing this problem. +PR titles must follow the [Conventional Commits](https://www.conventionalcommits.org/) format, because PRs are squash-merged and the PR title becomes the resulting commit message: + +```text +type(scope)!: subject +``` + +The allowed types are `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, and `test`. The generic `chore` type is intentionally not accepted; pick a more descriptive type instead. + +Examples: + +```text +fix(web): prevent avatar upload crash on empty file +feat(api): add pagination to repo hooks list +ci(workflows): lint PR titles with commitlint +``` + Keep this summary up-to-date as the PR evolves. \ If your PR changes the UI, you must add **after** screenshots in the PR summary. \ If you are not implementing a new feature, you should also post **before** screenshots for comparison. diff --git a/Makefile b/Makefile index 2466435b17..b6aa9371e5 100644 --- a/Makefile +++ b/Makefile @@ -321,6 +321,10 @@ lint-md: node_modules ## lint markdown files lint-md-fix: node_modules ## lint markdown files and fix issues pnpm exec markdownlint --fix *.md +.PHONY: lint-pr-title +lint-pr-title: ## lint PR title against Conventional Commits (set PR_TITLE=...) + @node ./tools/lint-pr-title.js + .PHONY: lint-spell lint-spell: ## lint spelling @git ls-files $(SPELLCHECK_FILES) | xargs go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -error diff --git a/modules/httplib/serve.go b/modules/httplib/serve.go index 6c2fe9b0d6..d51c938bf0 100644 --- a/modules/httplib/serve.go +++ b/modules/httplib/serve.go @@ -87,8 +87,9 @@ func ServeSetHeaders(w http.ResponseWriter, opts ServeHeaderOptions) { if opts.ContentLength != nil { header.Set("Content-Length", strconv.FormatInt(*opts.ContentLength, 10)) } - if opts.Filename != "" && opts.ContentDisposition != "" { - header.Set("Content-Disposition", encodeContentDisposition(opts.ContentDisposition, path.Base(opts.Filename))) + if opts.Filename != "" { + contentDisposition := util.IfZero(opts.ContentDisposition, ContentDispositionAttachment) + header.Set("Content-Disposition", encodeContentDisposition(contentDisposition, path.Base(opts.Filename))) header.Set("Access-Control-Expose-Headers", "Content-Disposition") } diff --git a/modules/httplib/serve_test.go b/modules/httplib/serve_test.go index 2a245300b0..419085237c 100644 --- a/modules/httplib/serve_test.go +++ b/modules/httplib/serve_test.go @@ -133,3 +133,11 @@ func TestServeSetHeaderContentRelated(t *testing.T) { // make sure sandboxed require.Contains(t, serveHeaderCspDefault, "; sandbox") } + +func TestServeSetHeaders(t *testing.T) { + w := httptest.NewRecorder() + ServeSetHeaders(w, ServeHeaderOptions{Filename: "foo.zip"}) + assert.Equal(t, "attachment; filename=foo.zip", w.Header().Get("Content-Disposition")) + ServeSetHeaders(w, ServeHeaderOptions{Filename: "foo.zip", ContentDisposition: ContentDispositionInline}) + assert.Equal(t, "inline; filename=foo.zip", w.Header().Get("Content-Disposition")) +} diff --git a/options/locale/locale_en-US.json b/options/locale/locale_en-US.json index 6f3141885b..47fcac7ae7 100644 --- a/options/locale/locale_en-US.json +++ b/options/locale/locale_en-US.json @@ -1306,7 +1306,7 @@ "repo.editor.upload_file_is_locked": "File \"%s\" is locked by %s.", "repo.editor.upload_files_to_dir": "Upload files to \"%s\"", "repo.editor.cannot_commit_to_protected_branch": "Cannot commit to protected branch \"%s\".", - "repo.editor.no_commit_to_branch": "Unable to commit directly to branch because:", + "repo.editor.no_commit_to_branch": "Not allowed to commit directly to branch because:", "repo.editor.user_no_push_to_branch": "User cannot push to branch", "repo.editor.require_signed_commit": "Branch requires a signed commit", "repo.editor.cherry_pick": "Cherry-pick %s onto:", diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index e17d6b42d7..07a7187955 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -1072,7 +1072,7 @@ func EnableWorkflowFile(ctx *context_module.Context) { func disableOrEnableWorkflowFile(ctx *context_module.Context, isEnable bool) { workflow := ctx.FormString("workflow") if len(workflow) == 0 { - ctx.ServerError("workflow", nil) + ctx.JSONError("workflow is required") return } diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index eab4df77ad..d20bbdc36c 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -974,17 +974,15 @@ func UpdatePullRequest(ctx *context.Context) { return } - // ToDo: add check if maintainers are allowed to change branch ... (need migration & co) if (!allowedUpdateByMerge && !rebase) || (rebase && !allowedUpdateByRebase) { - ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) - ctx.Redirect(issue.Link()) + ctx.JSONError(ctx.Tr("repo.pulls.update_not_allowed")) return } // default merge commit message message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch) - // The update process should not be cancelled by the user + // The update process should not be canceled by the user // so we set the context to be a background context if err = pull_service.Update(graceful.GetManager().ShutdownContext(), issue.PullRequest, ctx.Doer, message, rebase); err != nil { if pull_service.IsErrMergeConflicts(err) { @@ -998,8 +996,7 @@ func UpdatePullRequest(ctx *context.Context) { ctx.ServerError("UpdatePullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) - ctx.Redirect(issue.Link()) + ctx.JSONError(flashError) return } else if pull_service.IsErrRebaseConflicts(err) { conflictError := err.(pull_service.ErrRebaseConflicts) @@ -1012,19 +1009,18 @@ func UpdatePullRequest(ctx *context.Context) { ctx.ServerError("UpdatePullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) - ctx.Redirect(issue.Link()) + ctx.JSONError(flashError) return } - ctx.Flash.Error(err.Error()) - ctx.Redirect(issue.Link()) + log.Error("Update pull request failed: %v", err) + ctx.JSONError("Unable to update pull request") return } - time.Sleep(1 * time.Second) + time.Sleep(100 * time.Millisecond) // TODO: it is really questionable whether the Sleep is useful here, need to figure out ctx.Flash.Success(ctx.Tr("repo.pulls.update_branch_success")) - ctx.Redirect(issue.Link()) + ctx.JSONRedirect(issue.Link()) } // MergePullRequest response for merging pull request diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl index 7fdd36b3bd..d0c47e9bdd 100644 --- a/templates/repo/editor/commit_form.tmpl +++ b/templates/repo/editor/commit_form.tmpl @@ -22,7 +22,7 @@ -
+
@@ -30,9 +30,9 @@ {{svg "octicon-git-commit"}} {{ctx.Locale.Tr "repo.editor.commit_directly_to_this_branch" .BranchName}} {{if not .CommitFormOptions.CanCommitToBranch}} -
+
{{ctx.Locale.Tr "repo.editor.no_commit_to_branch"}} -
    +
      {{if not .CommitFormOptions.UserCanPush}}
    • {{ctx.Locale.Tr "repo.editor.user_no_push_to_branch"}}
    • {{end}} {{if and .CommitFormOptions.RequireSigned (not .CommitFormOptions.WillSign)}}
    • {{ctx.Locale.Tr "repo.editor.require_signed_commit"}}
    • {{end}}
    diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 275dd47a76..d1b327434b 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -1,8 +1,8 @@
    {{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}} -
    -
    -
    +
    +
    +
    {{if .Issue.OriginalAuthor}} {{ctx.AvatarUtils.Avatar nil 40}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 6a67ef754d..ad26d4da88 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -362,7 +362,7 @@ {{else if eq .Type 22}}
    - {{$reviewType := -1}} + {{$reviewType := 2}}{{/* default to "comment" type if the review record is missing */}} {{if .Review}}{{$reviewType = .Review.Type}}{{end}} {{if not .OriginalAuthor}} {{/* Some timeline avatars need a offset to correctly align with their speech bubble. @@ -372,15 +372,17 @@ {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}} - - {{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}} + + {{- if .Review -}} + {{- svg (printf "octicon-%s" .Review.Type.Icon) -}} + {{- else -}} + {{- svg "octicon-comment" -}} + {{- end -}} {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq $reviewType 1}} {{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}} - {{else if eq $reviewType 2}} - {{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}} {{else if eq $reviewType 3}} {{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}} {{else}} diff --git a/templates/repo/issue/view_content/pull_merge_box.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 9f6330305a..d1594a52dd 100644 --- a/templates/repo/issue/view_content/pull_merge_box.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -46,7 +46,7 @@ {{end}} {{if $data.ShowUpdatePullInfo}}
    - {{template "repo/issue/view_content/update_branch_by_merge" (dict "MergeBoxData" $data "Issue" $.Issue)}} + {{template "repo/issue/view_content/update_branch_by_merge" (dict "MergeBoxData" $data "IssueLink" $.Issue.Link)}}
    {{end}} diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 0f24b1b3ea..b3a36f01d6 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,9 +1,14 @@ {{$data := $.MergeBoxData}} {{$pull := $.PullRequest}}
    - {{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"}}
    + {{/* align with other item icon & text */}} + {{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 := $pull.HeadBranch}} {{if ne $pull.HeadRepo.ID $pull.BaseRepo.ID}} {{$localBranch = print $pull.HeadRepo.OwnerName "-" $pull.HeadBranch}} @@ -19,7 +24,7 @@
    {{if $data.ShowMergeInstructions}}
    -

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

    +

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

    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} {{if not $data.AutodetectManualMerge}}
    {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}
    diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl index 0af10045d8..fcdf65b74d 100644 --- a/templates/repo/issue/view_content/update_branch_by_merge.tmpl +++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl @@ -1,33 +1,24 @@ {{$data := $.MergeBoxData}} -{{$issue := $.Issue}} +{{$issueLink := $.IssueLink}}
    {{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
    -
    - {{if and $data.UpdateAllowed $data.UpdateByRebaseAllowed}} -
    - - + {{if $data.UpdateAllowed}} +
    + + {{if $data.UpdateByRebaseAllowed}} + {{end}}
    + {{end}}
    diff --git a/tests/e2e/reactions.test.ts b/tests/e2e/reactions.test.ts index 603cae8298..2048b938cf 100644 --- a/tests/e2e/reactions.test.ts +++ b/tests/e2e/reactions.test.ts @@ -12,7 +12,7 @@ test('toggle issue reactions', async ({page, request}) => { ]); await page.goto(`/${owner}/${repoName}/issues/1`); - const issueComment = page.locator('.timeline-item.comment.first'); + const issueComment = page.locator('.timeline-item.comment.issue-content-comment'); const reactionPicker = issueComment.locator('.select-reaction'); await reactionPicker.click(); diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 4d88d42f36..e7a3cd7b4f 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -1801,7 +1801,7 @@ jobs: testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11") // update by rebase req := NewRequest(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index)) - session.MakeRequest(t, req, http.StatusSeeOther) + session.MakeRequest(t, req, http.StatusOK) runner.fetchNoTask(t) }) } diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 09475bad20..ba15f8962e 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -692,9 +692,9 @@ func TestIssueReferenceURL(t *testing.T) { htmlDoc := NewHTMLParser(t, resp.Body) // the "reference" uses relative URLs, then JS code will convert them to absolute URLs for current origin, in case users are using multiple domains - ref, _ := htmlDoc.Find(`.timeline-item.comment.first .reference-issue`).Attr("data-reference") + ref, _ := htmlDoc.Find(`.timeline-item.comment.issue-content-comment .reference-issue`).Attr("data-reference") assert.Equal(t, "/user2/repo1/issues/1#issue-1", ref) - ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.first) .reference-issue`).Attr("data-reference") + ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.issue-content-comment) .reference-issue`).Attr("data-reference") assert.Equal(t, "/user2/repo1/issues/1#issuecomment-2", ref) } diff --git a/tools/lint-pr-title.js b/tools/lint-pr-title.js new file mode 100644 index 0000000000..2df340f186 --- /dev/null +++ b/tools/lint-pr-title.js @@ -0,0 +1,19 @@ +#!/usr/bin/env node +import {env, exit} from 'node:process'; + +const allowedTypes = 'build, ci, docs, feat, fix, perf, refactor, revert, style, test'; +const title = env.PR_TITLE; + +if (!title) { + console.error('Missing PR_TITLE'); + exit(1); +} + +const validTitlePattern = new RegExp(`^(${allowedTypes.replaceAll(', ', '|')})(\\([\\w.-]+\\))?(!)?: .+$`); + +if (!validTitlePattern.test(title)) { + console.error(`Invalid PR title: ${title}`); + console.error('Expected format: type(scope): subject'); + console.error(`Allowed types: ${allowedTypes}`); + exit(1); +} diff --git a/web_src/css/modules/checkbox.css b/web_src/css/modules/checkbox.css index f24b91df07..a6caf3324f 100644 --- a/web_src/css/modules/checkbox.css +++ b/web_src/css/modules/checkbox.css @@ -105,6 +105,7 @@ input[type="checkbox"]:indeterminate::before { vertical-align: middle; } +.ui.disabled.checkbox input, .ui.disabled.checkbox label, .ui.checkbox input[disabled] ~ label { cursor: default !important; diff --git a/web_src/css/repo.css b/web_src/css/repo.css index fb85dc8e9f..8a581750ee 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -423,28 +423,14 @@ td .commit-summary { margin-right: 5px; } -.repository.view.issue .comment-list:not(.prevent-before-timeline)::before { - display: block; - content: ""; - position: absolute; - margin-top: 12px; - margin-bottom: 14px; - top: 0; - bottom: 0; - left: 96px; - width: 2px; - background-color: var(--color-timeline); - z-index: -1; -} - -.repository.view.issue .comment-list .timeline { +.repository.view.issue .comment-list { position: relative; display: block; margin-left: 40px; padding-left: 16px; } -.repository.view.issue .comment-list .timeline::before { /* ciara */ +.repository.view.issue .comment-list::before { display: block; content: ""; position: absolute; @@ -1318,6 +1304,7 @@ td .commit-summary { display: flex; align-items: center; gap: 6px; + flex-wrap: wrap; } .comment-header-right { @@ -1844,26 +1831,23 @@ tbody.commit-list { } @media (max-width: 767.98px) { - .repository.view.issue .comment-list .timeline, + .repository.view.issue .comment-list, .repository.view.issue .comment-list .timeline-item { margin-left: 0; } - .repository.view.issue .comment-list .timeline::before { + .repository.view.issue .comment-list::before { left: 14px; } - .repository.view.issue .comment-list .timeline .inline-timeline-avatar { + .repository.view.issue .comment-list .inline-timeline-avatar { display: flex; margin-bottom: auto; margin-left: 6px; margin-right: 2px; } - .repository.view.issue .comment-list .timeline .comment-header { - padding-left: 4px; - } /* Don't show the general avatar, we show the inline avatar on mobile. * And don't show the role labels, there's no place for that. */ - .repository.view.issue .comment-list .timeline .timeline-avatar, - .repository.view.issue .comment-list .timeline .comment-header-right .role-label { + .repository.view.issue .comment-list .timeline-avatar, + .repository.view.issue .comment-list .comment-header-right .role-label { display: none; } .commit-header h3 { diff --git a/web_src/js/features/repo-issue-content.ts b/web_src/js/features/repo-issue-content.ts index 865d4305e4..e385d5b1e8 100644 --- a/web_src/js/features/repo-issue-content.ts +++ b/web_src/js/features/repo-issue-content.ts @@ -94,7 +94,7 @@ function showContentHistoryDetail(issueBaseUrl: string, commentId: string, histo function showContentHistoryMenu(issueBaseUrl: string, elCommentItem: Element, commentId: string) { const elHeaderLeft = elCommentItem.querySelector('.comment-header-left')!; const menuHtml = ` -