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

Introduce task make target that runs tests before committing the provided message #353

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Kostov6
Copy link
Contributor

@Kostov6 Kostov6 commented Nov 25, 2024

What this PR does / why we need it:
Inspired by Use git tactically this PR introduces make task m="commit message" that ensures the code compiles and runs tests before committing all the added files with the given commit message. These are the biggest benefits from make task:

  • There are no commits that represent a partial functionality state. So when going over commits the reviewer doesn't need to keep mental track of previous partial states. That way all he needs to focus on is whether the current commit does what is described to do from the commit message
  • This encourages people to split big tasks into smaller subtasks that are achievable and reviewable
  • This discourages doing huge tasks that don't seem to be achievable through incremental steps (avoiding sunk cost fallacy)

This PR's commit is added using make task

$  make task m="Introduce task make target that runs tests before commiting the provided message"
-------------
Staged changes:
Makefile
task.sh

-------------

Running tests:
Running integration tests:
[introduce-make-task 672b363] [task] Introduce task make target that runs tests before commiting the provided message
 2 files changed, 44 insertions(+)
 create mode 100755 task.sh

Note: Authors can still create normal commits. Just doing commits through make task adds the [task] prefix to the commit message that lets the reviewer know that the given commit is done through make task and represents a complete state

Release note:

New make target `task` was added for aiding in creating micro-commits

@gardener-robot gardener-robot added needs/review Needs review size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels Nov 25, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 25, 2024
Copy link
Contributor

@RadaBDimitrova RadaBDimitrova left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Nov 26, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 26, 2024
@Kostov6 Kostov6 merged commit 32230ca into gardener:master Nov 26, 2024
10 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/s Size of pull request is small (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants