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

Add support multiple projects again #30163

Closed
wants to merge 5 commits into from
Closed

Conversation

tyroneyeh
Copy link
Contributor

Closes #12974 and #27984

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 29, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 29, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/frontend modifies/templates This PR modifies the template files modifies/js labels Mar 29, 2024
@tyroneyeh tyroneyeh marked this pull request as draft March 29, 2024 02:35
@tyroneyeh
Copy link
Contributor Author

Hi @wolfogre

Could you help me take a look at how unit test modules/indexer/issues/internal/tests/tests.go handles this part?

@wolfogre
Copy link
Member

wolfogre commented Apr 1, 2024

Could you help me take a look at how unit test modules/indexer/issues/internal/tests/tests.go handles this part?

8dcdbf6

Main changes:

  • Rename ProjectID to ProjectIDs in data model and query conditions.
  • So len(ProjectIDs) == 0 (it was ProjectID == 0) means no project, so we need additional NoProject field to query.
  • Index definitions of bleve / MeiliSearch / Elasticsearch need to be updated, so do the index versions.
  • Update the tests for the changes.

Know issues:

  • Not sure if it works with the DB issue indexer; I haven't checked it since it's totally a different logic path.
  • Some tests may still fail, but I think they should be easy to understand and fix.

PLEASE NOTE:

@tyroneyeh tyroneyeh marked this pull request as ready for review April 1, 2024 07:49
@tyroneyeh tyroneyeh force-pushed the main branch 2 times, most recently from d8b98ce to 0f2e898 Compare April 1, 2024 07:58
@lunny
Copy link
Member

lunny commented Apr 1, 2024

This is not conflicted with #30190. That PR just ensures an issue will only be added once to a project. It will not prevent an issue added to multiple different projects.

@tyroneyeh tyroneyeh deleted the branch go-gitea:main April 9, 2024 05:36
@tyroneyeh tyroneyeh closed this Apr 9, 2024
@tyroneyeh tyroneyeh deleted the main branch April 9, 2024 05:36
@tyroneyeh
Copy link
Contributor Author

New branch name PR change to #30381

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/js modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple projects per issue
5 participants