From fd4714173449744ee3db85272cdbee94079ceed5 Mon Sep 17 00:00:00 2001 From: Keirthana T S Date: Wed, 16 Aug 2023 14:26:45 +0530 Subject: [PATCH 1/4] Add config file for gh-jira sync (#66) * Add config file for gh-jira sync * Add information about the feature in readme * Add ignore logic for github links --- .github/.jira_sync_config.yaml | 37 ++++++++++++++++++++++++++++++++++ .wordlist.txt | 1 + conf.py | 5 +++++ readme.rst | 16 +++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 .github/.jira_sync_config.yaml diff --git a/.github/.jira_sync_config.yaml b/.github/.jira_sync_config.yaml new file mode 100644 index 00000000..2be7bbd7 --- /dev/null +++ b/.github/.jira_sync_config.yaml @@ -0,0 +1,37 @@ +settings: + # Jira project key to create the issue in + jira_project_key: "DOCPR" + + # Dictionary mapping GitHub issue status to Jira issue status + status_mapping: + opened: Untriaged + closed: Done + + # (Optional) Jira project components that should be attached to the created issue + # Component names are case-sensitive + # components: + # - IoT + # - DACH TT + + # (Optional) GitHub labels. Only issues with one of those labels will be synchronized. + # If not specified, all issues will be synchronized + #labels: + # - bug + # - custom + + # (Optional) (Default: false) Add a new comment in GitHub with a link to Jira created issue + add_gh_comment: true + + # (Optional) (Default: true) Synchronize issue description from GitHub to Jira + sync_description: true + + # (Optional) (Default: true) Synchronize comments from GitHub to Jira + sync_comments: true + + # (Optional) (Default: None) Parent Epic key to link the issue to + epic_key: "DOCPR-6" + + # (Optional) Dictionary mapping GitHub issue labels to Jira issue types. + # If label on the issue is not in specified list, this issue will be created as a Bug + label_mapping: + enhancement: Story \ No newline at end of file diff --git a/.wordlist.txt b/.wordlist.txt index 212ce5b5..6b946c43 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -15,3 +15,4 @@ subtree txt UI yaml +Jira diff --git a/conf.py b/conf.py index fa20cf16..be11d82f 100644 --- a/conf.py +++ b/conf.py @@ -85,6 +85,11 @@ if not 'conf_py_path' in html_context and 'github_folder' in html_context: html_context['conf_py_path'] = html_context['github_folder'] +# For ignoring specific links +linkcheck_anchors_ignore_for_url = [ + r'https://github\.com/.*' +] + ############################################################ ### Styling ############################################################ diff --git a/readme.rst b/readme.rst index 228535f0..97f17eb0 100644 --- a/readme.rst +++ b/readme.rst @@ -230,6 +230,22 @@ Add custom configuration To add custom configurations for your project, see the ``Additions to default configuration`` and ``Additional configuration`` sections in the ``custom_conf.py`` file. These can be used to extend or override the common configuration, or to define additional configuration that is not covered by the common ``conf.py`` file. +(Optional) Synchronise GitHub issues to Jira +-------------------------------------------- + +If you wish to sync issues from your documentation repository on GitHub to your +Jira board, configure the `GitHub/Jira sync bot `_ +by editing the ``.github/workflows/.jira_sync_config.yaml`` file appropriately. +In addition to updating this file, you must also apply server configuration +for this feature to work. For more information, see `server configuration details `_ +for the GitHub/Jira sync bot. + +The ``.jira_sync_config.yaml`` file that is included in the starter pack +contains configuration for syncing issues from the starter pack repository to +its documentation Jira board. +Therefore, it does not work out of the box for other repositories in GitHub, +and you must update it if you want to use the synchronisation feature. + Change log ---------- From bc5a5a73601fa0aa14367b0aab26d2d0d79739ad Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Fri, 18 Aug 2023 11:51:54 +0200 Subject: [PATCH 2/4] temporarily pin Sphinx requirement Seems the latest Sphinx update has caused some issues ... 7.2.2 doesn't work with the notfound extension (see https://github.com/readthedocs/sphinx-notfound-page/issues/219 ). When restricting Sphinx to <7.2.0, RTD uses 6.2.1 though, which is incompatible with a Furo change (see https://github.com/pradyunsg/furo/discussions/693 ). Therefore, restrict Sphinx to 7.1.2 until the issues are resolved. Signed-off-by: Ruth Fuchss --- .sphinx/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sphinx/requirements.txt b/.sphinx/requirements.txt index d6f37e04..0c267c75 100644 --- a/.sphinx/requirements.txt +++ b/.sphinx/requirements.txt @@ -1,4 +1,4 @@ -sphinx +sphinx==7.1.2 sphinx-autobuild sphinx-design furo From 5d23d087d36cedfc306afcba155b6a32d8bb9e10 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Fri, 18 Aug 2023 11:52:40 +0200 Subject: [PATCH 3/4] remove pinned-requirements.txt Closes #74. Signed-off-by: Ruth Fuchss --- .sphinx/pinned-requirements.txt | 57 --------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .sphinx/pinned-requirements.txt diff --git a/.sphinx/pinned-requirements.txt b/.sphinx/pinned-requirements.txt deleted file mode 100644 index 66fc4e97..00000000 --- a/.sphinx/pinned-requirements.txt +++ /dev/null @@ -1,57 +0,0 @@ -alabaster==0.7.13 -Babel==2.12.1 -beautifulsoup4==4.11.2 -bracex==2.3.post1 -certifi==2022.12.7 -charset-normalizer==3.1.0 -colorama==0.4.6 -contourpy==1.0.7 -cycler==0.11.0 -docutils==0.19 -fonttools==4.39.0 -furo==2022.12.7 -html5lib==1.1 -idna==3.4 -imagesize==1.4.1 -importlib-metadata==6.0.0 -importlib-resources==5.12.0 -Jinja2==3.1.2 -kiwisolver==1.4.4 -livereload==2.6.3 -lxd-sphinx-extensions==0.0.6 -lxml==4.9.2 -Markdown==3.4.1 -MarkupSafe==2.1.2 -matplotlib==3.7.1 -numpy==1.24.2 -packaging==23.0 -Pillow==9.4.0 -Pygments==2.14.0 -pyparsing==3.0.9 -pyspelling==2.8.2 -python-dateutil==2.8.2 -pytz==2022.7.1 -PyYAML==6.0 -requests==2.28.2 -six==1.16.0 -snowballstemmer==2.2.0 -soupsieve==2.4 -sphinx==6.1.3 -sphinx-autobuild==2021.3.14 -sphinx-basic-ng==1.0.0b1 -sphinx-copybutton==0.5.1 -sphinx-design==0.3.0 -sphinx-reredirects==0.1.1 -sphinx-tabs==3.4.1 -sphinxcontrib-applehelp==1.0.4 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.1 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -sphinxext-opengraph==0.8.1 -tornado==6.2 -urllib3==1.26.14 -wcmatch==8.4.1 -webencodings==0.5.1 -zipp==3.15.0 From 616f340b9e4425c55b8c9bbbd97b0ee4021dc65f Mon Sep 17 00:00:00 2001 From: Artem Konev Date: Fri, 18 Aug 2023 13:58:44 +0100 Subject: [PATCH 4/4] add comment on copyright notice format to custom_conf.py Links: - --- custom_conf.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/custom_conf.py b/custom_conf.py index fcfe2bc7..e8487a0b 100644 --- a/custom_conf.py +++ b/custom_conf.py @@ -21,7 +21,20 @@ # Uncomment if your product uses release numbers # release = '1.0' -# The default value uses the current year as the copyright year +# The default value uses the current year as the copyright year. +# +# For static works, it is common to provide the year of first publication. +# Another option is to give the first year and the current year +# for documentation that is often changed, e.g. 2022–2023 (note the en-dash). +# +# A way to check a GitHub repo's creation date is to obtain a classic GitHub +# token with 'repo' permissions here: https://github.com/settings/tokens +# Next, use 'curl' and 'jq' to extract the date from the GitHub API's output: +# +# curl -H 'Authorization: token ' \ +# -H 'Accept: application/vnd.github.v3.raw' \ +# https://api.github.com/repos/canonical/ | jq '.created_at' + copyright = '%s, %s' % (datetime.date.today().year, author) ## Open Graph configuration - defines what is displayed in the website preview