Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Addresses #143 (Custom directives to support the JIRA structure macro) #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 12, 2019

Conversation

cstarner
Copy link
Contributor

@cstarner cstarner commented Jul 7, 2019

Adds a jira and jira_issue directive to act as a wrapper to the JIRA
structured macro available in Confluence.

Allows for configuring sets of named JIRA servers, not providing servers
at all, and a combination of named servers and overriding their
respective values on the directives.

Provides support for both single issue links (via jira_issue) and JQL
links (via jira). Allows for specifying the parameters available to
the macro.

Allows the directives to be disabled via the 'confluence_adv_restricted_macros'
configuration value

Signed-off-by: Colin Starner colin.starner@gmail.com

@cstarner
Copy link
Contributor Author

@jdknight Is there anything else I need to do, that's preventing this from being merged? I understand the speed of OSS projects, just want to make sure I'm not blocking progress somehow

@jdknight
Copy link
Member

@cstarner, there is nothing major at this time preventing this pull request being merged. For features that I have the opportunity to merge in which introduce non-trivial changes, I usually like to take the time to setup a test environment and provide a second verification of its capabilities. For this case, I will be planning to spawn up JIRA instances and verify Confluence instances properly generated links (at least between the older supported Confluence revision and the newest).

The main delay though right now is that my next feature I was in the middle of testing was #199 which requires building a setup to verify SSO capabilities (which #234 may sneak in). When testing, it is when #229 was noticed which (IMHO) became a much more high-priority item to address. Unfortunately the lack of solution (for #229) has delayed my own efforts (disheartened) in trying to catch up of new features/maintenance. A more realistic timeline (with respect to time I can contribute to this project) would be that I will optimistically wait to see if a solution arises for #229 until sometime early November, only to find that the limitation with the new Confluence implementation are what they are, followed by a re-work of translator capabilities in the extension to support the legacy translation support a newer (and more limited) translator support (probably wrapping up somewhere near the end of November). After that, I would the continue back to testing and approving pull requests (tweaking where needed; assuming that requests are generally sane and have fulfilled at least the DCO requirement) to clean up the queue before the end of this calendar year.

Sorry for the lack of feedback though. Changes are welcome. I will go through the list of existing pull requests now (include this one), provide a quick review on the components and label them as "planned-end-of-year" for now.

@jdknight
Copy link
Member

(template-like response) Changes in this pull request look to be in good state. Delays in other features in this project will result in this feature being delayed (see this comment for more details), so the expected window for this feature is planned around end-of-year (2019). Feel free to make additional changes/etc. to this pull request before the planned window. Critical changes may occur on master before this pull request is merged in -- while you are free to help synchronize features as conflicts are detected, I do mind help correcting conflicts myself when I have the opportunity to merge this change in. If you wish to review changes I may stack on this pull request set, feel free to indicate so. When the window to merge this in this pull requests occurs and changes are needed, I can stack on change and wait for your additional approval. Otherwise, I will assume I may stack changes (if needed) which is deemed best for this extension for a quicker integration into master. Labeling this pull request as "planned-end-of-year".

A quick review of this pull request include the following:

  • CHANGES.rst should not have been modified (as per CONTRIBUTING.rst); however, I have no problem adjusting options to use proper restructuredText and lexicographical sorted the feature reference when merging in.
  • I am hesitant to start references supported directive types inside README.rst. I would feel it would be better to be located inside the Documentation instead (a page after "markup"). I will take the contents provided in this pull-requests README.rst changes, tweak formatting, Jira casing, etc. and place it in the documentation. You are free to attempt to tweak that ahead of time, but I do not mind doing this myself.
  • This extension does not stack (group) imports on single lines (for maintenance reasons).
  • Directives like JIRABaseDirective may be replaced with a style such as JiraBaseDirective.
  • Expected output can be tabbed content for easy-of-view as the output verification has relaxed whitespace checking.
  • confluence_jira_servers should not be initialized in the global configuration call (prepareConfiguration).

cstarner and others added 10 commits November 11, 2019 19:54
Adds a jira and jira_issue directive to act as a wrapper to the JIRA
structured macro available in Confluence.

Allows for configuring sets of named JIRA servers, not providing servers
at all, and a combination of named servers and overriding their
respective values on the directives.

Provides support for both single issue links (via jira_issue) and JQL
links (via jira). Allows for specifying the parameters available to
the macro.

Allows the directives to be disabled via the 'confluence_adv_restricted_macros'
configuration value

Signed-off-by: Colin Starner <colin.starner@gmail.com>
Dropping an unused `true_false` function introduced by the initial
implementation for JIRA directive support.

Signed-off-by: James Knight <james.d.knight@live.com>
Moving the `is_node_registered` function into the `ConfluenceUtil`
utility class to help minimize implementation inside "__init__.py".

This change also properly reflects the copyright from the use of the
interim ported over call `is_node_registered` from Sphinx.

Signed-off-by: James Knight <james.d.knight@live.com>
Re-work the initial implementation for JIRA nodes with the following
notables:

- Remove the need for depart calls as JIRA nodes are leaf nodes.
- Use method assignments to minimize implementation.
- Create a (comment) "category" to visually separate JIRA logic from
  autodoc implementation.

Signed-off-by: James Knight <james.d.knight@live.com>
This commit focuses on moving the recently added JIRA-related nodes into
a new implementation file "nodes.py" -- to help separate node-logic from
directive-logic.

In addition to moving the node implementation into a new source object,
the implementation has been tweaked to use instance attributes instead
of class attributes.

Signed-off-by: James Knight <james.d.knight@live.com>
This commit reworks the initial set of JIRA support into Confluence
builder in attempt to cleanup directive options for consistency and
provide more detailed feedback to users for various warning scenarios.

Notables with this change include:
- Adjust directive options to be kebab casing instead of snake casing,
   following other directive options defined in reStructuredText.
- Adding explicit option sets for both JIRA directive types to ensure
   warnings are generating when using improper options in specific
   direction types.
- Adding various error-handling scenarios when a user provides (or does
   not and should provide) server-related options.
- Adjusts the option "server name" to "server" as the primary key to
   reference when pulling from the configuration configuration entry.
- Adjusting the specific ordering of parameters (for test assistance)
   into the translator implementation.

Signed-off-by: James Knight <james.d.knight@live.com>
Adjusting unit tests building a Sphinx application to treat warning
events from processing as errors. This is primarily to help in future
code which wants to verify `SphinxWarning` exceptions are thrown in
select cases.

There may be a future case where this may cause issues where warnings
may be permitted for a test but still wishes to pass. In this event,
adjustments should be made to allow a unit test to explicitly tweak
whether or not this flag is set (or unset) for the given test.

Signed-off-by: James Knight <james.d.knight@live.com>
Moving JIRA-related tests into its own base test. Testing is also
further expanded to test various warning scenarios a user may encounter
when providing (or not providing) select values for directive options.

Signed-off-by: James Knight <james.d.knight@live.com>
This commit cleans up some recently added JIRA directive documentation.
A new document "directives" has been added to outline specific
directives supported by this extension (content copied from README.rst
and tweaked). This commit also sorts the `confluence_jira_servers`
configuration key in the configuration document to follow
lexicographical order.

Signed-off-by: James Knight <james.d.knight@live.com>
Directive documentation will be specifically provided in the
documentation's new directive document. Removing the content from the
main README.rst document and reference the new location for this
information.

Signed-off-by: James Knight <james.d.knight@live.com>
@jdknight jdknight merged commit af562b0 into sphinx-contrib:master Nov 12, 2019
@jdknight
Copy link
Member

@cstarner, here we go! Merging into master; will be available in next stable release. Thanks for the feature submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something that can better improve this extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.