-
Notifications
You must be signed in to change notification settings - Fork 26
Implement exercise T4L1/view-commits #102
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
Open
SAN-MUYUN
wants to merge
1
commit into
git-mastery:main
Choose a base branch
from
SAN-MUYUN:exercise/view-commits
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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,19 @@ | ||
| { | ||
| "exercise_name": "view-commits", | ||
| "tags": [ | ||
| "git-diff", | ||
| "git-show" | ||
| ], | ||
| "requires_git": true, | ||
| "requires_github": true, | ||
| "base_files": { | ||
| "answers.txt": "answers.txt" | ||
| }, | ||
| "exercise_repo": { | ||
| "repo_type": "remote", | ||
| "repo_name": "duty-roster", | ||
| "repo_title": "gm-duty-roster", | ||
| "create_fork": false, | ||
| "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,7 @@ | ||
| # view-commits | ||
|
|
||
| The duty-roster repo contains five files, each one containing names of people assigned to a duty roster for a specific day of the week. For example, Monday.txt contains names of people assigned to duties on Mondays. These files are updated monthly, to record any changes to duty assignments. | ||
|
|
||
| ## Task | ||
|
|
||
| Answer the questions in the answers.txt, by examining the relevant commits in the duty-roster repo. |
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,8 @@ | ||
| from exercise_utils.cli import run_command | ||
| from exercise_utils.file import append_to_file, create_or_update_file | ||
| from exercise_utils.gitmastery import create_start_tag | ||
|
|
||
| def setup(verbose: bool = False): | ||
| create_start_tag(verbose) | ||
|
|
||
|
|
||
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,16 @@ | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Remove/add extra rows where appropriate. | ||
| A: | ||
| - name1 | ||
| - name2 | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Remove/add extra rows where appropriate. | ||
| A: | ||
| - name1 | ||
| - name2 | ||
|
|
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,6 @@ | ||
| initialization: | ||
| steps: | ||
| - type: commit | ||
| empty: true | ||
| message: Empty commit | ||
| id: start |
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,27 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Betsy | ||
| - Beth | ||
| - Daisy | ||
| - Eric | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,22 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,22 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: Betsy Daisy | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,22 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,26 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Betsy | ||
| - Beth | ||
| - Daisy | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,25 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Ergodic | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Betsy | ||
| - Daisy | ||
| - Beth | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,26 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bruce | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Betsy | ||
| - Bruce | ||
| - Daisy | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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,26 @@ | ||
| initialization: | ||
| steps: | ||
| - type: new-file | ||
| filename: answers.txt | ||
| contents: | | ||
| Q: In February, who was replaced in the Wednesday duty roster? | ||
| A: Eric | ||
|
|
||
| Q: In February, who joined the Tuesday duty roster? | ||
| A: Bru | ||
|
|
||
| Q: In April, what were the new names added to the duty rosters? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Betsy | ||
| - Beth | ||
| - Daisy | ||
|
|
||
| Q: In January, who were in the Tuesday duty roster? Give the list of names as one line, separated by spaces. | ||
| A: | ||
| - Charlie | ||
| - type: add | ||
| files: | ||
| - answers.txt | ||
| - type: commit | ||
| message: Initial commit | ||
| id: start |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this. We can just leave this function as
...