-
Notifications
You must be signed in to change notification settings - Fork 26
Implement exercise T6L2/merge-squash #148
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2cbfa35
Add merge-squash scaffolding and add download
VikramGoyal23 dc4ad65
Add autograding (incomplete)
VikramGoyal23 e39ecf5
Clean up autograding
VikramGoyal23 c9629ff
Fix verification logic and add message
VikramGoyal23 6b868b6
Improve exercise verification
VikramGoyal23 d9100b0
Fix linter type issue
VikramGoyal23 d9c294d
Add check for uncommitted files
VikramGoyal23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "exercise_name": "merge-squash", | ||
| "tags": [ | ||
| "git-branch", | ||
| "git-merge", | ||
| "git-reset" | ||
| ], | ||
| "requires_git": true, | ||
| "requires_github": false, | ||
| "base_files": {}, | ||
| "exercise_repo": { | ||
| "repo_type": "local", | ||
| "repo_name": "friends-cast", | ||
| "repo_title": null, | ||
| "create_fork": null, | ||
| "init": true | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| See https://git-mastery.github.io/lessons/merge/exercise-merge-squash.html |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| from exercise_utils.file import create_or_update_file | ||
| from exercise_utils.git import add, commit, checkout | ||
|
|
||
|
|
||
| def setup(verbose: bool = False): | ||
| create_or_update_file( | ||
| "joey.txt", | ||
| """ | ||
| Matt LeBlanc | ||
| """, | ||
| ) | ||
| add(["."], verbose) | ||
| commit("Add Joey", verbose) | ||
|
|
||
| create_or_update_file( | ||
| "phoebe.txt", | ||
| """ | ||
| Lisa Kudrow | ||
| """, | ||
| ) | ||
| add(["."], verbose) | ||
| commit("Add Phoebe", verbose) | ||
|
|
||
| checkout("supporting", True, verbose) | ||
| create_or_update_file( | ||
| "mike.txt", | ||
| """ | ||
| Paul Rudd | ||
| """, | ||
| ) | ||
| add(["."], verbose) | ||
| commit("Add Mike", verbose) | ||
|
|
||
| create_or_update_file( | ||
| "janice.txt", | ||
| """ | ||
| Maggie Wheeler | ||
| """, | ||
| ) | ||
| add(["."], verbose) | ||
| commit("Add Janice", verbose) | ||
|
|
||
| checkout("main", False, verbose) | ||
| create_or_update_file( | ||
| "ross.txt", | ||
| """ | ||
| David Schwimmer | ||
| """, | ||
| ) | ||
| add(["."], verbose) | ||
| commit("Add Ross", verbose) |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| initialization: | ||
| steps: | ||
| - type: commit | ||
| empty: true | ||
| message: Set initial state | ||
| id: start | ||
| - type: new-file | ||
| filename: joey.txt | ||
| contents: | | ||
| Matt LeBlanc | ||
| - type: add | ||
| files: | ||
| - joey.txt | ||
| - type: commit | ||
| message: Add Joey | ||
|
|
||
| - type: new-file | ||
| filename: phoebe.txt | ||
| contents: | | ||
| Lisa Kudrow | ||
| - type: add | ||
| files: | ||
| - phoebe.txt | ||
| - type: commit | ||
| message: Add Phoebe | ||
|
|
||
| - type: branch | ||
| branch-name: supporting | ||
| - type: checkout | ||
| branch-name: supporting | ||
|
|
||
| - type: new-file | ||
| filename: mike.txt | ||
| contents: | | ||
| Paul Rudd | ||
| - type: add | ||
| files: | ||
| - mike.txt | ||
| - type: commit | ||
| message: Add Mike | ||
|
|
||
| - type: new-file | ||
| filename: janice.txt | ||
| contents: | | ||
| Maggie Wheeler | ||
| - type: add | ||
| files: | ||
| - janice.txt | ||
| - type: commit | ||
| message: Add Janice | ||
|
|
||
| - type: checkout | ||
| branch-name: main | ||
|
|
||
| - type: new-file | ||
| filename: ross.txt | ||
| contents: | | ||
| David Schwimmer | ||
| - type: add | ||
| files: | ||
| - ross.txt | ||
| - type: commit | ||
| message: Add Ross | ||
|
|
||
| - type: merge | ||
| squash: true | ||
| branch-name: supporting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| initialization: | ||
| steps: | ||
| - type: commit | ||
| empty: true | ||
| message: Set initial state | ||
| id: start | ||
| - type: new-file | ||
| filename: joey.txt | ||
| contents: | | ||
| Matt LeBlanc | ||
| - type: add | ||
| files: | ||
| - joey.txt | ||
| - type: commit | ||
| message: Add Joey | ||
|
|
||
| - type: branch | ||
| branch-name: supporting | ||
| - type: checkout | ||
| branch-name: supporting | ||
|
|
||
| - type: new-file | ||
| filename: mike.txt | ||
| contents: | | ||
| Paul Rudd | ||
| - type: add | ||
| files: | ||
| - mike.txt | ||
| - type: commit | ||
| message: Add Mike | ||
|
|
||
| - type: new-file | ||
| filename: janice.txt | ||
| contents: | | ||
| Maggie Wheeler | ||
| - type: add | ||
| files: | ||
| - janice.txt | ||
| - type: commit | ||
| message: Add Janice | ||
|
|
||
| - type: checkout | ||
| branch-name: main | ||
|
|
||
| - type: new-file | ||
| filename: ross.txt | ||
| contents: | | ||
| David Schwimmer | ||
| - type: add | ||
| files: | ||
| - ross.txt | ||
| - type: commit | ||
| message: Add Ross | ||
|
|
||
| - type: merge | ||
| branch-name: supporting | ||
| squash: true | ||
|
|
||
| - type: commit | ||
| message: Squash commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| initialization: | ||
| steps: | ||
| - type: commit | ||
| empty: true | ||
| message: Set initial state | ||
| id: start | ||
| - type: new-file | ||
| filename: joey.txt | ||
| contents: | | ||
| Matt LeBlanc | ||
| - type: add | ||
| files: | ||
| - joey.txt | ||
| - type: commit | ||
| message: Add Joey | ||
|
|
||
| - type: new-file | ||
| filename: phoebe.txt | ||
| contents: | | ||
| Lisa Kudrow | ||
| - type: add | ||
| files: | ||
| - phoebe.txt | ||
| - type: commit | ||
| message: Add Phoebe | ||
|
|
||
| - type: branch | ||
| branch-name: supporting | ||
| - type: checkout | ||
| branch-name: supporting | ||
|
|
||
| - type: new-file | ||
| filename: mike.txt | ||
| contents: | | ||
| Paul Rudd | ||
| - type: add | ||
| files: | ||
| - mike.txt | ||
| - type: commit | ||
| message: Add Mike | ||
|
|
||
| - type: new-file | ||
| filename: janice.txt | ||
| contents: | | ||
| Maggie Wheeler | ||
| - type: add | ||
| files: | ||
| - janice.txt | ||
| - type: commit | ||
| message: Add Janice | ||
|
|
||
| - type: checkout | ||
| branch-name: main | ||
|
|
||
| - type: new-file | ||
| filename: ross.txt | ||
| contents: | | ||
| David Schwimmer | ||
| - type: add | ||
| files: | ||
| - ross.txt | ||
| - type: commit | ||
| message: Add Ross | ||
|
|
||
| - type: merge | ||
| branch-name: supporting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| initialization: | ||
| steps: | ||
| - type: commit | ||
| empty: true | ||
| message: Set initial state | ||
| id: start | ||
| - type: new-file | ||
| filename: joey.txt | ||
| contents: | | ||
| Matt LeBlanc | ||
| - type: add | ||
| files: | ||
| - joey.txt | ||
| - type: commit | ||
| message: Add Joey | ||
|
|
||
| - type: new-file | ||
| filename: phoebe.txt | ||
| contents: | | ||
| Lisa Kudrow | ||
| - type: add | ||
| files: | ||
| - phoebe.txt | ||
| - type: commit | ||
| message: Add Phoebe | ||
|
|
||
| - type: branch | ||
| branch-name: supporting | ||
| - type: checkout | ||
| branch-name: supporting | ||
|
|
||
| - type: new-file | ||
| filename: mike.txt | ||
| contents: | | ||
| Paul Rudd | ||
| - type: add | ||
| files: | ||
| - mike.txt | ||
| - type: commit | ||
| message: Add Mike | ||
|
|
||
| - type: new-file | ||
| filename: janice.txt | ||
| contents: | | ||
| Maggie Wheeler | ||
| - type: add | ||
| files: | ||
| - janice.txt | ||
| - type: commit | ||
| message: Add Janice | ||
|
|
||
| - type: checkout | ||
| branch-name: main | ||
|
|
||
| - type: new-file | ||
| filename: ross.txt | ||
| contents: | | ||
| David Schwimmer | ||
| - type: add | ||
| files: | ||
| - ross.txt | ||
| - type: commit | ||
| message: Add Ross |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.