Skip to content

Test the course from a second GitHub account (fork and first-time contributor path) #45

Done

Description

@thejesh23

The course's bots were tested from the maintainer's account. One path can't be tested that way: a pull request from a fork, by an account that has never contributed here. This issue is the checklist for that test.

Who can test: anyone with a GitHub account other than thejesh23. Best is an account that has never had a pull request merged in this repository.

How long: about 45 minutes, plus waiting for the maintainer twice.

How to report: comment on this issue. For each test, say what you saw, how long it took, and paste any output that differs from what's expected. Screenshots help.

Before you start

  • git, the GitHub CLI (gh) and Python 3.10 or newer are installed (Lesson 03)
  • Tell us your operating system. On Windows, use Git Bash, as Lesson 03 says
  • Follow the written lessons exactly as a learner would. If a step is unclear or wrong, that is a finding: report it

Test 1: first pull request, in the browser (Lesson 02)

Follow Lesson 02.

  • Fork the repo and add first-commits/YOUR-USERNAME.py, with a mistake on purpose: leave out the closing quote on the message line
  • Open the pull request

Expected:

  • A check called Validate first commit starts by itself within a minute or two. It must not wait for approval.
  • The check fails, and a bot comments that the file isn't valid Python and a quote is probably missing.

Then:

  • Fix the quote in your fork (pencil icon, commit)

Expected:

  • The pull request updates by itself, the check runs again and passes.
  • The bot comments "Looks great" and says a maintainer will review and merge.

Report: how long each bot comment took, and whether "awaiting approval" appeared anywhere.

Please don't wait for the merge. Go straight to Test 2.

Test 2: second pull request, from the terminal, before the first is merged (Lesson 05)

This is the main reason for this issue. GitHub holds a first-time contributor's checks until a maintainer approves them, and Lesson 05 now says so. We need to confirm what a learner really sees.

Follow Lesson 03 to clone your fork, then Lesson 05 up to Step 10.

  • python3 tools/doctor.py is all green (py tools/doctor.py on Windows)
  • Your test and greeting pass locally: python -m pytest practice, ruff format practice, ruff check practice
  • gh pr create --fill
  • gh pr checks --watch

Expected, while your Test 1 pull request is still unmerged:

  • gh pr checks --watch reports that there are no checks.
  • The pull request page says a workflow is awaiting approval.
  • No bot comment yet.

Report, please, word for word:

  • The exact output of gh pr checks --watch
  • The exact wording on the pull request page (a screenshot is best)
  • Whether the lesson's "No checks yet?" note prepared you for it

Then tell the maintainer in a comment here. The maintainer approves the run.

Expected after approval:

  • One check, listed as test, runs and passes.
  • About a minute later a review bot comments "Nice work" and says a maintainer will review and merge.
  • gh pr view --comments shows that comment.

Test 3: after the first merge

The maintainer merges your Test 1 pull request. Then:

  • Push one more small commit to your Exercise 2 branch, for example a second test (Stretch 1 in the exercise)

Expected:

  • The test check now starts by itself, with no approval.

Report: did it start by itself?

Test 4: the bug hunt (Lesson 09)

Follow Lesson 09.

  • Find a bug in bug-hunt/splitbill.py
  • Issues → New issue → Bug hunt, and fill in the form. In Steps to reproduce, first put a command that works correctly, on purpose

Expected:

  • Within a minute a bot comments with a check list, and a cross on Steps: it ran your command and saw no bug.

Then:

  • Edit the issue and put in the command that shows the bug

Expected:

  • The bot updates the same comment (no second comment): all ticks, and what it saw when it ran your command.

Test 5: graduate (Lesson 15), optional

Only if you already have a pull request merged in a project you don't own.

  • Add graduates/YOUR-USERNAME.py with the link to that pull request, and open a pull request, as in Lesson 15

Expected:

  • Validate graduate runs by itself and comments 🎓. After the maintainer merges, your name appears in graduates/README.md within a few minutes.

Also worth a note

  • Anything in a video that doesn't match what you saw on GitHub or in your terminal
  • Any command that failed, with its full output
  • Any button or menu on GitHub that is named differently from the lesson

For the maintainer

  • Test 2: open the tester's pull request, click Awaiting approval → Approve workflows to run
  • Test 3: merge the tester's Test 1 pull request
  • Merge the Exercise 2 and graduate pull requests when their checks pass
  • Fix the lessons if the wording in Test 2 differs from what the tester saw
  • Close this issue when all five tests are reported

Already tested from the maintainer's account (26 November 2026)

For comparison: the first-commit, Exercise 2, graduate and bug-hunt bots all commented within 10 to 35 seconds and said what the lessons say (pull requests #40, #41, #42 and issue #43).

Activity

  1. added
    help wanted
    on Nov 26, 2026
  2. divya0795 commented on Nov 26, 2026

    @divya0795
    Contributor

    Tester: @divya0795, macOS 26.3, git 2.50.1, gh 2.103.3, Python 3.12.16. This account had no earlier PRs here. I used gh and the API for the fork and the Lesson 02 edits, and the browser for the Bug hunt form.

    Test 1: first PR (#46) ✅

    • Validate first commit started by itself, with no "awaiting approval" anywhere.
    • Missing quote: the bot commented about 20 s after the PR opened. Small nit: the message repeats the line number: unterminated string literal (detected at line 3) (line 3).
    • After the fix: the check re-ran and "🎉 Looks great" arrived about 10 s later.

    Test 2: Exercise 2 PR before Test 1 is merged (#47) ❌ the lesson's expectation doesn't hold

    gh pr checks --watch did not say there were no checks. It showed a failing first-commit check:

    validate	fail	7s	https://github.com/thejesh23/first-python-contribution/actions/runs/45906416746/job/140204115964
    

    The PR page said:

    1 workflow awaiting approval
    This workflow requires approval from a maintainer. Learn more about approving workflows.
    ❌ Validate first commit / validate (pull_request_target) Failing after 7s

    The first-commit bot also commented, telling me to undo practice/... because "Your first commit should only add your own file".

    Cause: Lesson 02 has learners commit to their fork's main. Lesson 05 Step 1 (git switch main && git pull upstream main) keeps that unmerged commit on main, and Step 3 branches from it. So the Exercise 2 PR also contains first-commits/divya0795.py (3 commits, 3 files). It matches paths: first-commits/**, so first-commit.yml runs on it and fails it. A side effect: with 3 commits, gh pr create --fill titled the PR from the branch name ("exercise 2"), not the commit message as Step 9 says.

    The "No checks yet?" note half-prepared me: it covers the approval part, but not the red check or the bot telling me to delete my exercise.

    Suggested fix (Lesson 05): branch from upstream instead of local main:

    git fetch upstream
    git switch -c exercise-2 upstream/main

    Also, Step 1's git pull upstream main on a fork whose main has the Lesson 02 commit makes a merge commit. That's harmless but confusing. Optionally, first-commit.yml could skip PRs that also touch practice/ and say "this looks like Exercise 2".

    @thejesh23 #47 is ready for Approve workflows to run. I've left it as a learner would have it, so you can see the state.

    Test 3: waiting for #46 to be merged.

    Test 4: bug hunt (#49) ✅

    • The form applied bug-hunt. With a working command, the bot commented within about 10 s with ✘ on Steps, as expected.
    • After I edited Steps to --tip 15%, the same comment updated about 10 s later: all ✔, plus what it saw.
    • (splitbill: tip with a % sign crashes #48 was my mistake: I opened it with gh issue create --label bug-hunt, but outside contributors can't set labels, so the bot skipped it. I closed it. Learners use the form, so this doesn't affect them. Lesson 09 could mention it, though, for anyone who prefers the CLI.)

    Test 5: skipped (optional).

    Other notes

    • Lesson 03: macOS's built-in python3 is 3.9.6, and the doctor's ✘ for it was clear. Good.
  3. thejesh23 commented on Nov 26, 2026

    @thejesh23
    OwnerAuthor

    Thank you, this is exactly what the test was for. Everything you reported is fixed in #50, now merged.

    Test 2 (the Exercise 2 PR carried the first commit)

    • Lesson 05 now does what you suggested: git fetch upstream, then git switch -c exercise-2 upstream/main. Lessons 03, 09 and 10 no longer pull into main either.
    • With a default git config, git pull upstream main doesn't make a merge commit: it stops with Need to specify how to reconcile divergent branches. Troubleshooting section 8 now covers that, and warns not to reset main while the first PR is open.
    • The first-commit bot now stays quiet on an Exercise 2 PR.
    • The Exercise 2 bot accepts your own first-commit file, checks it, and explains why it's there.
    • Run against exercise 2 #47 as it stands, the new Exercise 2 bot says "Nice work" with that note. The red Validate first commit check on exercise 2 #47 is from before the fix, and it goes away with your next push.

    Smaller things

    • The doubled line number is gone: unterminated string literal (line 3).
    • Lesson 09's exercise now says to use the form, because only maintainers can add the label from gh.
    • gh pr create --fill takes the title from the commit again, because a branch from upstream/main has one commit.

    Still to do

    • Maintainer: approve the workflow run on exercise 2 #47, and merge Add first commit for divya0795 #46.
    • Then Test 3: push one more commit to exercise-2. The test check should start by itself.
    • Not yet seen by anyone: what gh pr checks --watch prints for a waiting PR that has only the two exercise files. If you have time, a fresh branch from upstream/main in a new PR would show it.
  4. thejesh23 commented on Nov 26, 2026

    @thejesh23
    OwnerAuthor

    The workflow run on #47 is approved: test passed in 10 s, and the review bot commented 11 s later with the new explanation. #46 is merged. Test 3 can go ahead: push one more commit to exercise-2, and the test check should start by itself.

  5. thejesh23 commented on Nov 26, 2026

    @thejesh23
    OwnerAuthor

    One more change that came out of this test: the first-commit bot now merges a first pull request that passes (#51), so nobody waits for the maintainer before Lesson 05. A demo is in #52: missing quote, fix, merged by the bot 15 seconds later. Exercise 2 and graduate pull requests are still merged by a maintainer. A first pull request from a fork has not been through the new merge step yet; if you can, a fresh fork from another account would confirm it.

  6. divya0795 commented on Nov 26, 2026

    @divya0795
    Contributor

    Test 3 ✅ Pushed a second test to exercise-2 (Stretch 1). test started by itself, with no approval: pending 15 s after the push, passed in 11 s. Review bot said "Nice work" about 30 s after the push.

    The other two (gh pr checks --watch on a held PR with only the exercise files, and the bot auto-merging a first PR from a fork) need an account that has never contributed here. Now that #46 is merged, mine no longer gets held for approval. Someone with a fresh account will need to cover those.

  7. thejesh23 commented on Nov 27, 2026

    @thejesh23
    OwnerAuthor

    Thanks for Test 3. One of the two remaining checks doesn't need a fresh account, and you can do it in two minutes.

    The bot merging a pull request from a fork. That workflow runs on pull_request_target, which GitHub never holds for approval, so your account works:

    1. In your fork, on main, edit first-commits/divya0795.py in the browser: change the message text (plain words, no links or @mentions).
    2. Open a pull request to this repo.

    Expected: Validate first commit passes, the bot comments "I'm merging your pull request now", and the pull request shows Merged by github-actions within about a minute, with no maintainer involved.

    Only the other check (what gh pr checks --watch prints for a held pull request) needs an account that has never contributed here. That path is now rare: it only affects someone who skips Lesson 02.

  8. thejesh23 commented on Nov 27, 2026

    @thejesh23
    OwnerAuthor

    #47 is merged. Thank you for testing: Tests 1 to 4 are done. The only thing left is the optional fork check in my previous comment.

  9. thejesh23 commented on Nov 27, 2026

    @thejesh23
    OwnerAuthor

    Confirmed with #56: opened from a fork, checked, and merged by the bot 13 seconds later with no maintainer involved. That completes the fork path. Thank you, @divya0795.

  10. thejesh23 commented on Nov 27, 2026

    @thejesh23
    OwnerAuthor

    Tested end to end with a brand-new account (karthikaun):

    Lesson 05 now says a new push is needed after Lesson 02 is merged (#59). That was the last open item here.

  11. thejesh23 commented on Nov 27, 2026

    @thejesh23
    OwnerAuthor

    All five tests are done, including a full run from a brand-new account, and everything found is fixed (#50, #51, #53, #59). Closing. Thank you, @divya0795.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions