GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
858 stars 359 forks source link

Configure "Edit on GitHub" link #7703

Closed jidanni closed 1 year ago

jidanni commented 1 year ago

GitHub today has a bug.

In project.rst, please replace

.. include:: explain_distunits.rst_

with

Units
-----

For map distance unit, append *unit* **d** for arc degree, **m** for arc
minute, and **s** for arc second, or **e** for meter [Default unless stated otherwise], **f**
for foot, **k** for km, **M** for statute mile, **n** for nautical mile,
and **u** for US survey foot.

because the material about -j is not applicable to project.

I would create a pull request. Alas today GitHub has a bug.

Thanks.

Also there is a grammar error: 30 degree... needs an "s".

jidanni commented 1 year ago

All I want is to change one paragraph. I don't know why I am also pulling in hundreds of other edits. All I know is I clicked "Edit on GitHub" on https://docs.generic-mapping-tools.org/dev/project.html

20230805T041522

joa-quim commented 1 year ago

Delete your fork and create a new one. I suspect that the problem is that you submitting from the master branch instead of from you local branch.

jidanni commented 1 year ago

But master is where that "Edit on GitHub" on https://docs.generic-mapping-tools.org/dev/project.html link now takes us: https://github.com/GenericMappingTools/gmt/edit/master/doc/rst/source/project.rst .

I recall it used to go to some number, but now goes to master.

Hmmm, trying the same thing on proj gives,

https://github.com/OSGeo/PROJ/edit/master/docs/source/operations/index.rst

Also master ...

See also https://github.com/OSGeo/PROJ/issues/3751 .

https://docs.readthedocs.io/en/stable/guides/edit-source-links-sphinx.html shows a version variable.

seisman commented 1 year ago

All I want is to change one paragraph. I don't know why I am also pulling in hundreds of other edits. All I know is I clicked "Edit on GitHub" on https://docs.generic-mapping-tools.org/dev/project.html

20230805T041522

It's because you're comparing your PR branch (jidanni-patch-999) with your own master branch, and your master branch is hundreds of commits behind the GMT master branch. You should change the base branch to GenericMappingTools:master when opening PRs.

jidanni commented 1 year ago

It's because you're comparing your PR branch (jidanni-patch-999) with your own master branch, and your master branch is hundreds of commits behind the GMT master branch. You should change the base branch to GenericMappingTools:master when opening PRs.

OK, I'm working on it!

So far looking for a way to change the base branch... 20230807T034816 None there.

20230807T034733

None there.

OK, I'll check settings. Hold on... Thanks.

OK reading https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request ... one moment please.

jidanni commented 1 year ago

Hold on. This is all going to fail, due to the "Protected branch" 20230807T040129

jidanni commented 1 year ago

Apparently the new rules became available, https://www.i-programmer.info/news/84-database/16484-github-repository-rules-now-generally-available.html and were applied. But it turns out such rules have certain ramifications...

PaulWessel commented 1 year ago

Master has always been a protected branch, otherwise random people could merge stuff in without review

jidanni commented 1 year ago

All I know is me, Average Joe User, doesn't see the protected stuff on e.g., https://github.com/OSGeo/PROJ 20230807T043458 I thought someone must have seen the new 20230807T043859 buttons and clicked on it, but as you say, it was protected all along...

Anyway please do test of how the Average Joe User is supposed to continue submitting pull requests given the new underlying software in effect.

The wrong solution would be to elevate my privileges, because I'm super liable to screw things up.

PaulWessel commented 1 year ago

Maybe @seisman or @maxrjones have suggestions here? No, no elevation will occur.

seisman commented 1 year ago

Anyway please do test of how the Average Joe User is supposed to continue submitting pull requests given the new underlying software in effect.

image You just need to click the "Propose changes" button then you'll be redirected to a page like:

image

Make sure that you select GenericMappingTools/master as the base branch.

joa-quim commented 1 year ago

please do test of how the Average Joe User is supposed to continue submitting pull requests

I also find that Github is quite confuse to use when one do not have commit permissions, but that is not our fault nor is it under our control.

jidanni commented 1 year ago

Ah ha, a vital step is to click "compare against forks" in the upper right: 20230808T034014 Only then will we be able to choose "GenericMappingTools/master".

20230808T034456