Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missed RenderLabel change in card template #29772

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

6543
Copy link
Member

@6543 6543 commented Mar 13, 2024

regression of #29680
close #29770

PS: it would be nice to have a linter that is able to check template helpers ...

@6543 6543 added type/bug issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change labels Mar 13, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 13, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 13, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Mar 13, 2024
@6543 6543 added this to the 1.22.0 milestone Mar 13, 2024
@6543 6543 requested a review from wxiaoguang March 13, 2024 16:04
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 13, 2024
@lunny
Copy link
Member

lunny commented Mar 13, 2024

It seems it's impossible. Maybe you should add those links to links_test.go in integrations to test whether the template have been broken.

@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 13, 2024
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 13, 2024

PS: it would be nice to have a linter that is able to check template helpers ...

I have a plan to refactor these "Render" functions by our ctx function, I just haven't found a good timing.

(Other ctx refactorings like ctx.AvatarUtils is pretty stable, no regression anymore)

@6543
Copy link
Member Author

6543 commented Mar 13, 2024

It seems it's impossible. Maybe you should add those links to links_test.go in integrations to test whether the template have been broken.

in that case it must be a link to a repo in our fixtures witch contains actuall labels on issues withing projecs 🤔

I can try to address that tomorow ... I'm bussy and of keyboard as from now on

@silverwind
Copy link
Member

silverwind commented Mar 13, 2024

PS: it would be nice to have a linter that is able to check template helpers ...

No such linter exists to my knowledge. djlint does not even look into go files. Would likely need to write one ourselves, or write better integration tests.

@wxiaoguang
Copy link
Contributor

PS: it would be nice to have a linter that is able to check template helpers ...

No such linter exists to my knowledge. djlint does not even look into go files. Would likely need to write one ourselves.

The real problem is that Golang template is a pure dynamic system, many calls and types can't be known before execution.

@silverwind
Copy link
Member

The real problem is that Golang template is a pure dynamic system, many calls and types can't be known before execution.

Yeah it would never be fully lintable, but at least basic stuff like argument count for functions without vararg shouldn't too hard to lint for I guess.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 13, 2024
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 13, 2024
@silverwind silverwind enabled auto-merge (squash) March 13, 2024 17:23
@silverwind silverwind merged commit 712e19f into go-gitea:main Mar 13, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 13, 2024
silverwind added a commit to silverwind/gitea that referenced this pull request Mar 13, 2024
* main:
  fix missed RenderLabel change in card template (go-gitea#29772)
  Fix incorrect locale Tr for gpg command (go-gitea#29754)
  Improve a11y document and dropdown item (go-gitea#29753)
  Improve QueryEscape helper function (go-gitea#29768)
  Use relative links for commits, mentions, and issues in markdown (go-gitea#29427)
  Move fork router functions to a standalone file (go-gitea#29756)
  Configure pinned JS dependencies via updates.config.js (go-gitea#29696)
  Refactor to use optional.Option for issue index search option (go-gitea#29739)
  Fix user router possbile panic (go-gitea#29751)
  Refactor label.IsArchived() (go-gitea#29750)
  Fix date rendering by adding `<gitea-absolute-date>` (go-gitea#29725)
  Update to labeler v5 (go-gitea#29721)
  Update Chroma to v2.13.0 (go-gitea#29732)
@6543 6543 deleted the fix_regression branch March 13, 2024 23:31
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 14, 2024
* giteaofficial/main:
  Fix `make generate-swagger` in go 1.22 (go-gitea#29780)
  Fix incorrect menu/link on webhook edit page (go-gitea#29709)
  Add test for webhook (go-gitea#29755)
  Fix possible NPE in ToPullReviewList (go-gitea#29759)
  fix missed RenderLabel change in card template (go-gitea#29772)
  Fix incorrect locale Tr for gpg command (go-gitea#29754)
  Improve a11y document and dropdown item (go-gitea#29753)
  Improve QueryEscape helper function (go-gitea#29768)
  Use relative links for commits, mentions, and issues in markdown (go-gitea#29427)
  Move fork router functions to a standalone file (go-gitea#29756)
  Configure pinned JS dependencies via updates.config.js (go-gitea#29696)
  Refactor to use optional.Option for issue index search option (go-gitea#29739)
  Fix user router possbile panic (go-gitea#29751)
  Refactor label.IsArchived() (go-gitea#29750)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/regression Indicates a previously functioning feature or behavior that has broken or regressed after a change lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/templates This PR modifies the template files size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project boards fail to render after newest docker nightly update
6 participants