Skip to content

ST-ITM/oss-todo-collab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seoultech logo small.png

Simple Todo App (Collaboration Exercise)

This repository is a teaching example for learning the GitHub workflow:

  • Fork → Clone → Branch → Implement → Pull Request → Code Review → Revise → Merge.

The app is a very simple console-based Todo list in Java.


Base Features (provided)

  1. Add task (with title + description)
  2. List tasks
  3. Mark task DONE by id

Exercise Feature (to implement via PR)

  • Remove task by id

Workflow steps

A) Fork & clone

  1. Fork this repo on GitHub (click Fork).
  2. Clone your fork:
    git clone https://github.com/<your-username>/oss-todo-collab.git
    cd oss-todo-collab
  3. (Optional) Add the ST-ITM organizations’ repo as upstream:
    git remote add upstream https://github.com/ST-ITM/oss-todo-collab.git
    git remote -v

B) Create a feature branch

git checkout -b feature/remove-task

C) Implement the feature

  1. TodoList.java

    • Implement remove(int id) so it removes the task and returns true if found, false otherwise.
  2. TodoApp.java

    • Add a new menu option: 4) Remove by id
    • Shift Quit to 5) Quit
    • Add a new method removeTask() that:
      • Reads the id
      • Calls todoList.remove(id)
      • Prints [INFO] Removed. or [ERROR] Not found.
  3. Compile & run locally

    javac *.java
    java Main
    • Add two tasks
    • List tasks
    • Mark one DONE
    • Remove one by id

D) Commit your changes

git add .
git commit -m "feat: remove task by id"

E) Push & open a Pull Request

git push -u origin feature/remove-task
  • On GitHub, click Compare & pull request
  • Fill PR description:
    • What changed
    • How to test
    • (Optional) Link to issue

F) Code Review

As a reviewer:

  • Open Files changed
  • Add specific comments (not just “good job”)
  • Examples:
    • “Consider handling non-numeric input in removeTask() like in markDone().”
    • “You return immediately after removing; this prevents index skipping. Good!”

G) Address feedback

Make edits → commit with clear message → push:

git commit -am "fix: consistent error handling in removeTask"
git push

H) Merge PR

Maintainer merges.
After that, the forked repository can be synced. First checkout the main branch, then pulling the changes in the upstream (now updated after the PR was merged), and finally pushing to the origin (the forked repository).

git checkout main 
git pull upstream main
git push origin main

Learning Goals

  • Practice branching and PR workflow
  • Learn to give constructive code review comments
  • Experience revising code in response to feedback

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages