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

Ks 1 2 #171

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Choose a reason for hiding this comment

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

Нужно добавить эти файлы .idea в gitignor, чтобы они не коммитились

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/main/kotlin/Lessson_1/L1.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package Lessson_1

fun main() {

Choose a reason for hiding this comment

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

Есть нарушения в git флоу, то есть в логике работы с коммитами и ветками.
Обрати внимание, сначала ты сделал одну задачу, запушил и все ок.
Затем ты закоммитил в эту же ветку другую задачу (либо создал следующую ветку из предыдущей рабочей ветки) – это видно в истории коммитов.

Что из этого следует? В пулл реквест с одной задачей попала задача, которая должна быть в другой ветке. Это нарушает суть разделения кода задач по веткам. Задача из одной ветки не должна знать и пересекаться с задачей из другой ветки.

На большом проекте затрагивается много файлов и если в одном ПР делать другие изменения (из другой задачи), то при слиянии может быть много проблем и/или гит конфликтов. Например, над кодом другой задачи уже работает программист, изменения из второй задачи не проверены и не протестированы (тестировщики проверяют функционал по конкретному тех. заданию в рамках данного описания задачи в конкретной ветке).

Новые ветки создаем только из мастера (который предварительно надо обновить, если до этого мержились задачи в гитхабе), чтобы не было пересечений с другими тасками)

Что делать?
в данном пулл реквесте надо:

  • переключиться в ветку текущего ПР
  • удалить лишний файл с задачей (физически из проекта)
  • сделать коммит (с изменением удаления)
  • прислать ссылку на этот же пулл реквест снова в бот

И новые ветки всегда создаем из основной ветки master.

var ordersOnWeb = 75
val textAfterPurchase = "Благодарим за заказ, ждем Вас вновь!"
}
16 changes: 16 additions & 0 deletions src/main/kotlin/Lessson_1/L2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package Lessson_1


fun main() {
var ordersOnWeb = 75

Choose a reason for hiding this comment

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

По умолчанию делаем val

Choose a reason for hiding this comment

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

Забыл здесь исправить

val textAfterPurchase = "Благодарим за заказ, ждем Вас вновь!"
println(ordersOnWeb)
println(textAfterPurchase)

/*
var workers = 2000
println(workers)
*/
var workers = 1999

Choose a reason for hiding this comment

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

Здесь переменная объявляется заново. По условию задачи нужно закомментировать только вывод 2000, а значение переменной перезаписать новым.

println(workers)
}