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

Related refactors to ctx.FormX functions #16567

Merged
merged 5 commits into from
Aug 11, 2021

Conversation

6543
Copy link
Member

@6543 6543 commented Jul 28, 2021

followup of #16562
blocked by #16571

@6543 6543 added pr/wip This PR is not ready for review type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Jul 28, 2021
@6543 6543 added this to the 1.16.0 milestone Jul 28, 2021
@lunny
Copy link
Member

lunny commented Jul 28, 2021

No. This will not work. You still needs FormX for those Post requests. #16562 only the first step to do rename, next PRs we can add Query back but use ctx.URL for those GET requests.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 28, 2021
@6543
Copy link
Member Author

6543 commented Jul 28, 2021

I think we can do it in one ... and most func use Query in GET requests this few who doesnt can be migrated easyly within this pull

see discord maintainer channel :) @lunny

@6543 6543 changed the title [WIP] Refactor ctx.QueryX functions to not depend on forms Refactor ctx.QueryX functions to not depend on forms Jul 29, 2021
@6543 6543 removed the pr/wip This PR is not ready for review label Jul 29, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2021

Codecov Report

Merging #16567 (51136f7) into main (2d25b7d) will increase coverage by 0.00%.
The diff coverage is 58.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16567   +/-   ##
=======================================
  Coverage   45.39%   45.40%           
=======================================
  Files         758      758           
  Lines       85072    85068    -4     
=======================================
+ Hits        38619    38624    +5     
+ Misses      40199    40195    -4     
+ Partials     6254     6249    -5     
Impacted Files Coverage Δ
routers/api/v1/notify/user.go 11.62% <0.00%> (ø)
routers/web/admin/repos.go 0.00% <0.00%> (ø)
routers/web/explore/code.go 0.00% <0.00%> (ø)
routers/web/repo/issue.go 38.33% <0.00%> (-0.05%) ⬇️
routers/web/repo/milestone.go 0.00% <0.00%> (ø)
routers/web/repo/topic.go 0.00% <0.00%> (ø)
routers/web/user/notification.go 37.71% <25.00%> (ø)
routers/api/v1/repo/issue_tracked_time.go 20.37% <50.00%> (ø)
routers/api/v1/notify/repo.go 70.76% <100.00%> (ø)
routers/api/v1/org/team.go 37.06% <100.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d25b7d...51136f7. Read the comment docs.

routers/web/user/auth.go Outdated Show resolved Hide resolved
@6543 6543 changed the title Refactor ctx.QueryX functions to not depend on forms Related refactors to ctx.FormX functions Jul 29, 2021
@6543 6543 added the pr/wip This PR is not ready for review label Jul 29, 2021
@6543 6543 force-pushed the alternate-to-16562_ctx-query branch from 3b3f8aa to c29fb27 Compare July 29, 2021 02:45
6543 added a commit that referenced this pull request Aug 11, 2021
…6571)

Followup from #16562 prepare for #16567

* Rename ctx.Form() to ctx.FormString()
* Reimplement FormX func to need less code and cpu cycles
* Move code into own file
@6543 6543 force-pushed the alternate-to-16562_ctx-query branch from c29fb27 to aa4f40c Compare August 11, 2021 00:34
@6543 6543 removed the pr/wip This PR is not ready for review label Aug 11, 2021
@6543
Copy link
Member Author

6543 commented Aug 11, 2021

@lunny now it's ready :)

@lunny
Copy link
Member

lunny commented Aug 11, 2021

CI is failing related

@6543 6543 force-pushed the alternate-to-16562_ctx-query branch from aa4f40c to 51136f7 Compare August 11, 2021 11:56
@6543
Copy link
Member Author

6543 commented Aug 11, 2021

I should have tested it after rebase ... cleaned up relicts & untouch tests + fix goGet speedup

@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 Aug 11, 2021
@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 Aug 11, 2021
@lafriks lafriks added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Aug 11, 2021
@lafriks lafriks merged commit f1a810e into go-gitea:main Aug 11, 2021
@lafriks lafriks deleted the alternate-to-16562_ctx-query branch August 11, 2021 15:08
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants