Skip to content

Commit

Permalink
Use Sphinx guilabel role for buttons (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Sep 10, 2024
1 parent ee5a793 commit 89254a9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 30 deletions.
2 changes: 1 addition & 1 deletion core-developers/committing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ can apply labels to GitHub pull requests).
Reverting a merged pull request
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To revert a merged pull request, press the ``Revert`` button at the
To revert a merged pull request, press the :guilabel:`Revert` button at the
bottom of the pull request. That will bring up the page to create a
new pull request where the commit can be reverted. It will also create
a new branch on the main CPython repository. Delete the branch once
Expand Down
27 changes: 16 additions & 11 deletions developer-workflow/communication-channels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ Tutorials for new users

To start a topic or participate in any discussions in the forum, sign up and
create an account using an email address or GitHub account. You can do so by
clicking the "Sign Up" button on the top right hand corner of the `Discourse`_
main page.
clicking the :guilabel:`Sign Up` button on the top right hand corner of the
`Discourse`_ main page.

The Python Discourse `Quick Start <https://discuss.python.org/t/python-discourse-quick-start/116>`_
compiled by `Carol Willing <https://discuss.python.org/u/willingc/>`_ gives you
Expand All @@ -110,23 +110,27 @@ These tutorials can be activated by replying to a welcome message from "discours
Greetings!" received under Notifications and Messages in your user account.

* Click on your personal account found on the top right hand corner of the page.
* The dropdown menu will show four different icons: πŸ”” (Notifications),
πŸ”– (Bookmarks), βœ‰οΈ (Messages), and πŸ‘€ (Preferences).
* The dropdown menu will show four different icons:
:guilabel:`πŸ””` (Notifications),
:guilabel:`πŸ”–` (Bookmarks),
:guilabel:`βœ‰οΈ` (Messages), and
:guilabel:`πŸ‘€` (Preferences).
* Select either Notifications or Messages.
* Open the "Greetings!" message sent by Discobot to start the tutorial.

Ensure that you read through the `Python Code of Conduct <https://discuss.python.org/faq>`_.
We are to be open, considerate and respectful to all users in the community.
You can report messages that don't respect the CoC by clicking on the three
dots under the message and then on the ⚐ icon. You can also mention the
dots under the message and then on the :guilabel:`⚐` icon. You can also mention the
`@staff <https://discuss.python.org/groups/staff>`_,
`@moderators <https://discuss.python.org/groups/moderators>`_, or
`@admins <https://discuss.python.org/groups/admins>`_ groups in a message.



Reading topics
-----------------
--------------

Click a topic title and read down the list of replies in chronological order,
following links or previewing replies and quotes as you go. Use your mouse to
scroll the screen, or use the timeline scroll bar on the right which also shows
Expand All @@ -142,10 +146,11 @@ Following categories (category notifications)

Notifications can be set for individual categories and topics. To change any of these
defaults, you can either go to your user preferences, or visit the category
page, and use the notification button πŸ”” above the topic list,
on the top right hand corner of the category page beside the "+ New Topic" button.
page, and use the notification button :guilabel:`πŸ””` above the topic list,
on the top right hand corner of the category page beside the
:guilabel:`+ New Topic` button.

Clicking on the Notification control πŸ”” will show a drop-down panel with 5
Clicking on the notification control :guilabel:`πŸ””` will show a drop-down panel with 5
different options: Watching, Tracking, Watching First Post, Normal, and Muted.
All categories are set by default in Normal mode where you will only be notified
if someone mentions your @name or replies to you.
Expand All @@ -154,7 +159,7 @@ Following individual threads (topic notifications)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To follow any individual topics or threads, you can adjust your notifications
through the notification button πŸ”” found on the right of the topic at the end
through the notification button :guilabel:`πŸ””` found on the right of the topic at the end
of the timeline. You can also do so at the bottom of each topic.
Select "Watching" and you will be notified when there is any new updated reply
from that particular thread.
Expand Down Expand Up @@ -235,7 +240,7 @@ Blogs

Several core developers are active bloggers and discuss Python's development
that way. You can find their blogs (and various other developers who use Python)
at https://planetpython.org/.
at `Planet Python <https://planetpython.org/>`__.


Setting expectations for open source participation
Expand Down
20 changes: 10 additions & 10 deletions getting-started/git-boot-camp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ You will only need to do this once.

1. Go to https://github.com/python/cpython.

2. Press ``Fork`` located near the top right of the page.
2. Press :guilabel:`Fork` located near the top right of the page.

3. Uncheck the "Copy the ``main`` branch only" button.
3. Uncheck "Copy the ``main`` branch only".

4. Press the ``Create fork`` button.
4. Press the :guilabel:`Create fork` button.

5. Your forked CPython repository will be created at ``https://github.com/<username>/cpython``.

Expand Down Expand Up @@ -310,7 +310,7 @@ Creating a pull request

1. Go to https://github.com/python/cpython.

2. Press the ``New pull request`` button.
2. Press the :guilabel:`New pull request` button.

3. Click the ``compare across forks`` link.

Expand All @@ -319,7 +319,7 @@ Creating a pull request
5. Select the head repository: ``<username>/cpython`` and head branch: the branch
containing your changes.

6. Press the ``Create pull request`` button.
6. Press the :guilabel:`Create pull request` button.

You should include the issue number in the title of the PR,
in the format ``gh-NNNNN: <PR Title>``.
Expand Down Expand Up @@ -486,14 +486,14 @@ can be merged. See :ref:`"Keeping CI green" <keeping-ci-green>` for some
simple things you can do to help the checks turn green.

At any point, a core developer can schedule an automatic merge of the change
by clicking the gray ``Enable auto-merge (squash)`` button. You will find
by clicking the gray :guilabel:`Enable auto-merge (squash)` button. You will find
it at the bottom of the pull request page. The auto-merge will only
happen if all the required checks pass, but the PR does not need to have been
approved for a successful auto-merge to take place.

If all required checks are already finished on a PR you're reviewing,
in place of the gray ``Enable auto-merge`` button you will find a green
``Squash and merge`` button.
in place of the gray :guilabel:`Enable auto-merge` button you will find a green
:guilabel:`Squash and merge` button.

In either case, adjust and clean up the commit message.

Expand Down Expand Up @@ -526,7 +526,7 @@ PR life cycle, while being irrelevant to the final change.
`How to Write a Git Commit Message <https://cbea.ms/git-commit/>`_
is a nice article describing how to write a good commit message.

Finally, press the ``Confirm squash and merge`` button.
Finally, press the :guilabel:`Confirm squash and merge` button.

Cancelling an automatic merge
-----------------------------
Expand All @@ -535,7 +535,7 @@ If you notice a problem with a pull request that was accepted and where
auto-merge was enabled, you can still cancel the workflow before GitHub
automatically merges the change.

Press the gray "Disable auto-merge" button on the bottom of the
Press the gray :guilabel:`Disable auto-merge` button on the bottom of the
pull request page to disable automatic merging entirely. This is the
recommended approach.

Expand Down
6 changes: 3 additions & 3 deletions getting-started/pull-request-lifecycle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ will merge in the latest changes from the base branch into the PR.

If this still doesn't help with the failure on the PR, you can try
to re-run that particular failed check. Go to the red GitHub Action job,
click on the "Re-run jobs" button on the top right, and select
"Re-run failed jobs". The button will only be present when all other jobs
finished running.
click on the :guilabel:`Re-run jobs` button on the top right, and select
:guilabel:`Re-run failed jobs`. The button will only be present when all other
jobs finished running.

Re-running failed jobs shouldn't be your first instinct but it is occasionally
helpful because distributed systems can have intermittent failures, and
Expand Down
8 changes: 4 additions & 4 deletions triage/github-bpo-faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ Where is the "nosy list"?
Subscribe another person to the issue by tagging them in the comment with
``@username``.

If you want to subscribe yourself to an issue, click the *πŸ”” Subscribe*
button in the sidebar.
If you want to subscribe yourself to an issue, click the
:guilabel:`πŸ”” Subscribe` button in the sidebar.

Similarly, if you were tagged by somebody else but
decided this issue is not for you, you might click the *πŸ”• Unsubscribe*
button in the sidebar.
decided this issue is not for you, you might click the
:guilabel:`πŸ”• Unsubscribe` button in the sidebar.

There is no exact equivalent of the "nosy list" feature, so to preserve
this information during the transfer, we list the previous members of
Expand Down
2 changes: 1 addition & 1 deletion triage/issue-tracker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Reporting an issue
------------------

If the problem you're reporting is not already in the `issue tracker`_, you
can report it using the green "New issue" button on the right of the search
can report it using the green :guilabel:`New issue` button on the right of the search
box above the list of bugs. If you're not already signed in to GitHub, it
will ask you to do so now.

Expand Down

0 comments on commit 89254a9

Please sign in to comment.