mozilla / mozilla/bugbug

Move checkout_revision() onto HackbotContext or fold it into prepare_repo()

Open Beginner friendly
#6,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

hackbot
Dominant language
Python
Stars
570
Forks
351
Avg merge
2d 13h
Merged PRs (30d)
65

Description

checkout_revision() in libs/hackbot-runtime/hackbot_runtime/revision.py takes ctx as its first argument and only calls ctx.prepare_repo(). Since it operates entirely on the context, make it a method on HackbotContext (or merge it into prepare_repo()) for a cleaner API.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libs/hackbot-runtime/hackbot_runtime/revision.py at checkout_revision() and inspect its callers and HackbotContext.prepare_repo(). Decide whether the operation belongs as a HackbotContext method or should be folded into prepare_repo(), then verify that callers use the cleaner API while repository preparation behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.