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

Automatically create repositories referenced on a revision #2530

Merged
merged 13 commits into from
Nov 27, 2024

Conversation

vrigal
Copy link
Collaborator

@vrigal vrigal commented Nov 18, 2024

Closes #2521

@vrigal vrigal requested a review from La0 November 18, 2024 17:42
Copy link
Collaborator

@La0 La0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great already 👍

backend/code_review_backend/issues/serializers.py Outdated Show resolved Hide resolved
backend/code_review_backend/issues/serializers.py Outdated Show resolved Hide resolved
@vrigal vrigal requested a review from La0 November 19, 2024 09:27
@vrigal vrigal force-pushed the auto-create-repository branch from da1b458 to c62044d Compare November 19, 2024 13:24
Copy link
Collaborator

@La0 La0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also create the repository automatically from load_issues command when it's not in DB ?
Same rules as from the API

  • must belong to the list of known repos
  • slug from parsed path (stripping leading /)

backend/code_review_backend/issues/serializers.py Outdated Show resolved Hide resolved
@vrigal vrigal requested a review from La0 November 22, 2024 09:54
@vrigal vrigal force-pushed the auto-create-repository branch from 1834015 to e80f654 Compare November 22, 2024 10:06
@marco-c
Copy link
Collaborator

marco-c commented Nov 22, 2024

Could we also remove repositories with no revisions attached in the cleanup script? This way we don't accrue noise in the repository table (e.g. if a repository is added on Phab and later removed or renamed).
We have a few of these currently, e.g. the ci-config

Copy link
Collaborator

@La0 La0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes are OK, Repositories are created without leading / both from the API & load_issues.

Please implement the cleanup mentionned by @marco-c and we should be ready to merge

@vrigal vrigal force-pushed the auto-create-repository branch 2 times, most recently from 5eae12f to dc62f9c Compare November 25, 2024 15:26
@vrigal vrigal dismissed stale reviews from Archaeopteryx and La0 via 525beaf November 25, 2024 16:34
@vrigal vrigal force-pushed the auto-create-repository branch from 525beaf to aeef32e Compare November 25, 2024 16:43
@vrigal vrigal force-pushed the auto-create-repository branch from aeef32e to 4552c4d Compare November 26, 2024 10:40
@Archaeopteryx Archaeopteryx merged commit e49122d into mozilla:master Nov 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create automatically repositories
4 participants