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

[testcase notes] #21: pull request functionalities exploration #35

Open
dorawyy opened this issue Oct 22, 2017 · 1 comment
Open

[testcase notes] #21: pull request functionalities exploration #35

dorawyy opened this issue Oct 22, 2017 · 1 comment

Comments

@dorawyy
Copy link
Owner

dorawyy commented Oct 22, 2017

Scenario

Exploration question:

What would happen if adding more commits after the pull request is made?

  • Intro: PR1 works as base branch, while PR2 works as head branch
  • Alice worked on PR2 branch, Bob worked on PR1 branch
  • Alice made 1 commit on PR2, pushed
  • Alice opened a pull request PR2 --> PR1
  • Alice made more commits on PR2, pushed
  • what would happen inside the pull request?

Answer:

  • New commits pushed to remote branch will be automatically added to the pull request

Test case steps

Step0: prep

# create start point
git checkout PR1
touch test21
vim test21

git add test21
git commit -m "testcase21: startpoint (create file test21 on PR1 branch)"

git push origin PR1

git checkout PR2
git merge PR1
git push origin PR2

Edit in test21 is:
screen shot 2017-10-21 at 6 27 01 pm

The project start point status is:
screen shot 2017-10-21 at 6 27 59 pm

Step1: Alice, 1 commit on PR2

git checkout PR2
vim test21
git add test21
git commit -m "PR2: commit1, in file test21 line 15"

git push origin PR2

Commit1 edit is:
screen shot 2017-10-21 at 6 28 45 pm

Project status after commit1 is:
screen shot 2017-10-21 at 6 29 34 pm

Step2: Alice created a pull request

base: PR1, head: PR2

screen shot 2017-10-21 at 6 30 25 pm

Curerntly, the pull request page is like (with only 1 commit):
screen shot 2017-10-21 at 6 32 48 pm

Step3: Alice made more commits on PR2

git checkout PR2
vim test21
git add test21
git commit -m "PR2: commit2, in file test21 line 16"

git push origin PR2

Commit2 edit is:
screen shot 2017-10-21 at 6 34 29 pm

The project status becomes (after commit2):
screen shot 2017-10-21 at 6 35 11 pm

Step4: Back to check what happened inside the pull request

screen shot 2017-10-21 at 6 37 00 pm

@dorawyy
Copy link
Owner Author

dorawyy commented Oct 22, 2017

More adds-on: When manually merging the two branches, the pull request will be closed automatically.

screen shot 2017-10-21 at 7 20 26 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant