Skip to content

Automatically create repositories referenced on a revision#2530

Merged
Archaeopteryx merged 13 commits intomozilla:masterfrom
vrigal:auto-create-repository
Nov 27, 2024
Merged

Automatically create repositories referenced on a revision#2530
Archaeopteryx merged 13 commits intomozilla:masterfrom
vrigal:auto-create-repository

Conversation

@vrigal
Copy link
Copy Markdown
Collaborator

@vrigal vrigal commented Nov 18, 2024

Closes #2521

@vrigal vrigal requested a review from La0 November 18, 2024 17:42
Copy link
Copy Markdown
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 👍

Comment thread backend/code_review_backend/issues/serializers.py Outdated
Comment thread backend/code_review_backend/issues/serializers.py
Comment thread backend/code_review_backend/issues/serializers.py Outdated
@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
Copy Markdown
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 /)

Comment thread backend/code_review_backend/issues/serializers.py Outdated
@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
Copy Markdown
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
Copy Markdown
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
La0
La0 previously approved these changes Nov 25, 2024
Comment thread backend/code_review_backend/issues/management/commands/cleanup_issues.py Outdated
Archaeopteryx
Archaeopteryx previously approved these changes Nov 25, 2024
Comment thread backend/code_review_backend/issues/management/commands/load_issues.py Outdated
@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
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