jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1347533?usp=email )

Change subject: docs: use Markdown for GitHub community standards
......................................................................

docs: use Markdown for GitHub community standards

Convert the code of conduct and security policy from reStructuredText to
Markdown so they are recognized by GitHub's community standards.

Use MyST to include the Markdown files in the Sphinx documentation and add
myst-parser as a documentation dependency.

Update other documentation files to reflect these changes.

Change-Id: Ib015fe98b8adb034745ec71083acc9b56d1c9730
---
A CODE_OF_CONDUCT.md
D CODE_OF_CONDUCT.rst
M CONTENT.rst
M MANIFEST.in
M README.rst
A SECURITY.md
D docs/SECURITY.rst
M docs/codeofconduct.rst
M docs/conf.py
M docs/index.rst
M docs/requirements.txt
M tests/setup_tests.py
12 files changed, 57 insertions(+), 43 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..8734bd7
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+# Code of Conduct
+
+The development of this software is covered by a
+[MediaWiki Code of 
Conduct](https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct).
diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst
deleted file mode 100644
index bff0cfc..0000000
--- a/CODE_OF_CONDUCT.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-Code of Conduct
-===============
-
-The development of this software is covered by a `MediaWiki Code of Conduct
-<https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct>`_.
diff --git a/CONTENT.rst b/CONTENT.rst
index e84a706..dc32c09 100644
--- a/CONTENT.rst
+++ b/CONTENT.rst
@@ -6,7 +6,7 @@
     
+===========================+===========================================================+
     | AUTHORS.rst               | List of major contributors to this module    
             |
     
+---------------------------+-----------------------------------------------------------+
-    | CODE_OF_CONDUCT.rst       | Code of conduct reference                    
             |
+    | CODE_OF_CONDUCT.md        | Code of conduct reference                    
             |
     
+---------------------------+-----------------------------------------------------------+
     | conftest.py               | Local per-directory plugin for pytest-mypy   
             |
     
+---------------------------+-----------------------------------------------------------+
@@ -36,6 +36,8 @@
     
+---------------------------+-----------------------------------------------------------+
     | ROADMAP.rst               | PyPI version roadmap file                    
             |
     
+---------------------------+-----------------------------------------------------------+
+    | SECURITY.md               | Pywikibot Security Policy                    
             |
+    
+---------------------------+-----------------------------------------------------------+
     | setup.py                  | Installer script for Pywikibot framework     
             |
     
+---------------------------+-----------------------------------------------------------+
     | tox.ini                   | Tests config file                            
             |
diff --git a/MANIFEST.in b/MANIFEST.in
index f5f1dd4..2c1b72f 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,2 @@
 graft pywikibot/scripts/i18n/pywikibot
-include CODE_OF_CONDUCT.rst
 include ROADMAP.rst
diff --git a/README.rst b/README.rst
index c885b8a..c8d6ab9 100644
--- a/README.rst
+++ b/README.rst
@@ -152,4 +152,8 @@
 `learn <https://www.mediawiki.org/wiki/Developer_account>`_ how to get
 started.

-.. include:: CODE_OF_CONDUCT.rst
+Code of Conduct
+===============
+
+The development of this software is covered by a `MediaWiki Code of Conduct
+<https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct>`_.
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..3a323fc
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,28 @@
+# Pywikibot Security Policy
+
+## Reporting a Vulnerability
+
+To report a security vulnerability in Pywikibot, please contact the 
maintainers via
+[Phabricator 
task](https://phabricator.wikimedia.org/maniphest/task/edit/form/75/)
+or via email at **[email protected]**. We will acknowledge receipt of your
+report within 2 business days and aim to provide a resolution within 30 days,
+depending on the severity of the issue.
+
+## Security Updates
+
+Pywikibot supports security updates for the latest stable release. Older 
versions may not receive
+security updates. Security updates will be made available through PyPI, the 
nightlies dump, the
+Gerrit repository and the GitHub mirror. Users are advised to upgrade to the 
latest version to
+mitigate potential vulnerabilities.
+
+## Disclosure Policy
+
+We follow a responsible disclosure process. After a vulnerability is fixed, we 
will publish a
+security advisory detailing the issue and the steps taken to resolve it. The 
advisory will be
+available on the GitHub repository and communicated to users through the 
mailing list.
+
+## Security Resources
+
+- [GitHub Security 
Advisories](https://docs.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory)
+- [PyPI Security](https://pypi.org/security/)
+- [MediaWiki Security for 
Developers](https://www.mediawiki.org/wiki/Security_for_developers)
diff --git a/docs/SECURITY.rst b/docs/SECURITY.rst
deleted file mode 100644
index 221ba18..0000000
--- a/docs/SECURITY.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-*************************
-Pywikibot Security Policy
-*************************
-
-Reporting a Vulnerability
-=========================
-To report a security vulnerability in Pywikibot, please contact the 
maintainers via `Phabricator
-task <https://phabricator.wikimedia.org/maniphest/task/edit/form/75/>`_ or via 
email at
-**[email protected]**. We will acknowledge receipt of your report within 
2 business days
-and aim to provide a resolution within 30 days, depending on the severity of 
the issue.
-
-Security Updates
-================
-Pywikibot supports security updates for the latest stable release. Older 
versions may not receive
-security updates. Security updates will be made available through PyPI, the 
nightlies dump, the
-gerrit repository and the GitHub mirror. Users are advised to upgrade to the 
latest version to
-mitigate potential vulnerabilities.
-
-Disclosure Policy
-=================
-We follow a responsible disclosure process. After a vulnerability is fixed, we 
will publish a
-security advisory detailing the issue and the steps taken to resolve it. The 
advisory will be
-available on the GitHub repository and communicated to users through the 
mailing list.
-
-Security Resources
-==================
-- GitHub Security Advisories: 
https://docs.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory
-- PyPI Security: https://pypi.org/security/
-- MediaWiki Security for Developers: 
https://www.mediawiki.org/wiki/Security_for_developers
diff --git a/docs/codeofconduct.rst b/docs/codeofconduct.rst
index 96e0ba2..43478f4 100644
--- a/docs/codeofconduct.rst
+++ b/docs/codeofconduct.rst
@@ -1 +1,2 @@
-.. include:: ../CODE_OF_CONDUCT.rst
+.. include:: ../CODE_OF_CONDUCT.md
+   :parser: myst_parser.sphinx_
diff --git a/docs/conf.py b/docs/conf.py
index 840c406..f16884d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -53,6 +53,7 @@
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
 extensions = [
+    'myst_parser',
     'sphinx.ext.autodoc',
     'sphinx.ext.autosectionlabel',
     'sphinx.ext.autosummary',
diff --git a/docs/index.rst b/docs/index.rst
index 96afb18..2ea12d0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -56,7 +56,7 @@
    global_options
    faq
    getting_help
-   SECURITY
+   security

 .. toctree::
    :maxdepth: 1
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 390e43d..fcc8390 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -2,8 +2,9 @@
 # ../requirements.txt is also needed.
 # Note: Python 3.11 is required for sphinx 8.2+
 sphinx >= 9.1.0
-rstcheck >=6.3.0
-sphinxext-opengraph >= 0.13.0
 sphinx-copybutton >= 0.5.2
 sphinx-tabs >= 3.5.0
+sphinxext-opengraph >= 0.13.0
 furo == 2025.12.19
+myst-parser >= 5.1.0
+rstcheck >=6.3.0
diff --git a/tests/setup_tests.py b/tests/setup_tests.py
index 1e60bbc..38db87d 100755
--- a/tests/setup_tests.py
+++ b/tests/setup_tests.py
@@ -7,6 +7,7 @@
 """Test setup.py."""
 from __future__ import annotations

+import re
 import sys
 import unittest
 from unittest.mock import patch
@@ -85,8 +86,15 @@
     def test_read_desc(self) -> None:
         """Test :func:`setup.read_desc` function."""
         desc = setup.read_desc('README.rst')
-        coc = setup.read_desc('CODE_OF_CONDUCT.rst')
-        self.assertIn(coc, desc)
+        road = setup.read_desc('ROADMAP.rst')
+        # read_desc() removes Sphinx roles.
+        # Test text before the first and after the last occurrence.
+        matches = list(re.finditer(r':[a-z]+:`[^`]+`', road, flags=re.DOTALL))
+        self.assertIsNotNone(matches)
+        first = matches[0].start()
+        last = matches[-1].end()
+        self.assertIn(road[:first], desc)
+        self.assertIn(road[last:], desc)

     def test_get_pywikibot_packages(self) -> None:
         """Test :func:`setup.get_packages` function for pywikibot."""

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1347533?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib015fe98b8adb034745ec71083acc9b56d1c9730
Gerrit-Change-Number: 1347533
Gerrit-PatchSet: 7
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to