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

[#360] Show that repos is Forked if Repositories #367

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RubanovDmitriy
Copy link
Contributor

* Added filter for oranization.name in repositories_list.html
<a href="{{ repository.get_absolute_url }}">
{{ repository.name }}
</a>
{% elif repository.organization.name != 'Hexlet' %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

вот эта штука не должна решаться на фронте. Ведь есть репозитории, которые форкнули в Хекслете, а есть проекты-оригиналы для тех. Посмотрите, что может отдавать гитхаб. Врое бы там есть атрибут, который говорит .что репозиторий - форк.

* Added bool field "fork" to Repository model
* Added saving this field to update_or_create_record
* Added check for fork in repositories_list template
* Added bool field "fork" to Repository model
* Added saving this field to update_or_create_record
* Added check for fork in repositories_list template
@fey
Copy link
Collaborator

fey commented Nov 21, 2023

Можете подключить еще парочку репозиториев? Можно например

@fey
Copy link
Collaborator

fey commented Nov 21, 2023

operations = [
migrations.AddField(
model_name="repository",
name="fork",
Copy link
Collaborator

Choose a reason for hiding this comment

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

тк это булево значение, давайте его так и назовем is_fork и дальше ниже по коду.

@fey fey marked this pull request as draft November 27, 2023 12:23
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.

2 participants