Do not hardcode GitHub URLs and branch-to-repo mappings; resolve them from Phabricator
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 570
- Forks
- 351
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 65
Description
agents/build-repair/hackbot_agents/build_repair/resolve.py and agents/test-repair/hackbot_agents/test_repair/resolve.py each independently hardcode an identical branch-to-repo-path map (autoland, mozilla-central, try, etc.) plus Taskcluster/Lando/hg URLs, and agents/test-repair/hackbot_agents/test_repair/notify.py hardcodes a GitHub commit URL template. Every agent's hackbot.toml also hardcodes repo_url.
Look these up from Phabricator's own repository configuration instead (see for example https://phabricator-dev.allizom.org/source/ff-test-autoland-dev/manage/uris/), so branch names always match what is actually configured on Phabricator rather than a second hardcoded copy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the duplicated mappings and URLs in agents/build-repair/hackbot_agents/build_repair/resolve.py, agents/test-repair/hackbot_agents/test_repair/resolve.py, and agents/test-repair/hackbot_agents/test_repair/notify.py, along with each agent's hackbot.toml. Read the referenced Phabricator repository URI configuration first. Done means these values are resolved from Phabricator rather than maintained as duplicate hardcoded mappings or templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, python
- Domain
- devtools, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100