From 36d086dafe49f2b02f149699957813e01a5a14be Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:05:31 +0300 Subject: [PATCH] Use Sphinx guilabel role for buttons --- core-developers/committing.rst | 2 +- developer-workflow/communication-channels.rst | 27 +++++++++++-------- getting-started/git-boot-camp.rst | 20 +++++++------- getting-started/pull-request-lifecycle.rst | 6 ++--- triage/github-bpo-faq.rst | 8 +++--- triage/issue-tracker.rst | 2 +- 6 files changed, 35 insertions(+), 30 deletions(-) diff --git a/core-developers/committing.rst b/core-developers/committing.rst index e438d39fa4..cf859ab9f7 100644 --- a/core-developers/committing.rst +++ b/core-developers/committing.rst @@ -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 diff --git a/developer-workflow/communication-channels.rst b/developer-workflow/communication-channels.rst index 5118da916d..60ba90339b 100644 --- a/developer-workflow/communication-channels.rst +++ b/developer-workflow/communication-channels.rst @@ -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 `_ compiled by `Carol Willing `_ gives you @@ -110,15 +110,18 @@ 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 `_. 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 `_, `@moderators `_, or `@admins `_ groups in a message. @@ -126,7 +129,8 @@ dots under the message and then on the ⚐ icon. You can also mention the 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 @@ -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. @@ -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. @@ -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 `__. Setting expectations for open source participation diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index c857f688e7..f28ebefbce 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -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//cpython``. @@ -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. @@ -319,7 +319,7 @@ Creating a pull request 5. Select the head repository: ``/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: ``. @@ -486,14 +486,14 @@ can be merged. See :ref:`"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. @@ -526,7 +526,7 @@ PR life cycle, while being irrelevant to the final change. `How to Write a Git Commit Message `_ 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 ----------------------------- @@ -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. diff --git a/getting-started/pull-request-lifecycle.rst b/getting-started/pull-request-lifecycle.rst index 42b3412816..07416aec15 100644 --- a/getting-started/pull-request-lifecycle.rst +++ b/getting-started/pull-request-lifecycle.rst @@ -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 diff --git a/triage/github-bpo-faq.rst b/triage/github-bpo-faq.rst index 1385be052a..8c21a17fea 100644 --- a/triage/github-bpo-faq.rst +++ b/triage/github-bpo-faq.rst @@ -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 diff --git a/triage/issue-tracker.rst b/triage/issue-tracker.rst index c139f5d361..a38e8d9e01 100644 --- a/triage/issue-tracker.rst +++ b/triage/issue-tracker.rst @@ -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.