astropy / astropy/sphinx-astropy

The edit_on_github extension should only work for master/main

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
7
Forks
19
Avg merge
5h 41m
Merged PRs (30d)
1

Description

*Originally reported by @bsipocz in https://github.com/astropy/astropy-helpers/issues/316*

When people are opening PRs using the edit_on_github feature it most usually causes a bigger mess than it solves as most usually they open the PR against the wrong branch (see the latest issue here against "stable": astropy/astropy#6172)

I suggest to try to disable it for anything but the "latest" rtd version. I think the other option of making it point always to the master version will be more confusing, as the page may have changed significantly since the given version one tries to edit.

The other workaround could be to train astrobot to pick up all PRs that are not against master and comment on them prior merge.

Having a closer look, it seems to be that pointing the edit_on_github link always to master is easy and only needs the modification in docs/conf.py in the astropy repo. The question is whether that is a good approach (I think yes, it's definitely better than dealing with the incorrect base branch in PRs).

cc @eteq @astrofrog

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the edit_on_github extension and the docs/conf.py configuration mentioned in the issue. Confirm how links are generated for non-latest Read the Docs versions, then verify that the completed change prevents those versions from creating links targeting the wrong base branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.