Skip to content

Commit

Permalink
Feature/52 introduce topics (#63)
Browse files Browse the repository at this point in the history
* Introducing `TOPIC` term as a replacement for `LABEL`.
* Introducing new action input `GROUP_OUTPUT_BY_TOPICS`.
  • Loading branch information
MobiTikula authored Nov 14, 2024
1 parent 19187cf commit fdb2f09
Show file tree
Hide file tree
Showing 12 changed files with 448 additions and 105 deletions.
64 changes: 53 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [Data Mining from GitHub Projects](#data-mining-from-github-projects)
- [Living Documentation Page Generation](#living-documentation-page-generation)
- [Structured Output](#structured-output)
- [Output Grouped by Topics](#output-grouped-by-topics)
- [Contribution Guidelines](#contribution-guidelines)
- [License Information](#license-information)
- [Contact or Support Information](#contact-or-support-information)
Expand Down Expand Up @@ -114,12 +115,15 @@ See the full example of action step definition (in example are used non-default

# project state mining feature de/activation
project-state-mining: true

# project verbose (debug) logging feature de/activation
verbose-logging: true

# structured output feature de/activation
structured-output: true

# group output by topics feature de/activation
group-output-by-topics: true

# project verbose (debug) logging feature de/activation
verbose-logging: true
```
## Action Configuration
Expand Down Expand Up @@ -214,22 +218,31 @@ Configure the action by customizing the following parameters based on your needs
project-state-mining: true
```

- **verbose-logging** (optional, `default: false`)
- **Description**: Enables or disables verbose (debug) logging.
- **structured-output** (optional, `default: false`)
- **Description**: Enables or disables structured output.
- **Usage**: Set to true to activate.
- **Example**:
```yaml
with:
verbose-logging: true
structured-output: true
```
- **structured-output** (optional, `default: false`)
- **Description**: Enables or disables structured output.

- **group-output-by-topics** (optional, `default: false`)
- **Description**: Enable or disable grouping tickets by topics in the summary index.md file.
- **Usage**: Set to true to activate.
- **Example**:
```yaml
with:
structured-output: true
group-output-by-topics: true
```

- **verbose-logging** (optional, `default: false`)
- **Description**: Enables or disables verbose (debug) logging.
- **Usage**: Set to true to activate.
- **Example**:
```yaml
with:
verbose-logging: true
```

## Action Outputs
Expand Down Expand Up @@ -321,7 +334,7 @@ To enhance clarity, the following label groups define and categorize each Docume
- **Topic**:
- **{Name}Topic:** Designates the main focus area or theme relevant to the ticket, assigned by the editor for consistency across related documentation.
- Examples: `ReportingTopic`, `UserManagementTopic`, `SecurityTopic`.
- **noTopic:** Indicates that the ticket does not align with a specific topic, based on the editor's discretion.
- **NoTopic:** Indicates that the ticket does not align with a specific topic, based on the editor's discretion.
- **Type**:
- **DocumentedUserStory:** Describes a user-centric functionality or process, highlighting its purpose and value.
- Encompasses multiple features, capturing the broader goal from a user perspective.
Expand Down Expand Up @@ -394,6 +407,8 @@ export INPUT_REPOSITORIES='[
]'
export INPUT_OUTPUT_PATH="/output/directory/path
export INPUT_PROJECT_STATE_MINING="true"
export INPUT_STRUCTURED_OUTPUT="true"
export INPUT_GROUP_OUTPUT_BY_TOPICS="true"
export INPUT_VERBOSE_LOGGING="true"
```
Expand Down Expand Up @@ -601,13 +616,40 @@ This feature allows you to generate structured output for the living documentati
|-- issue md page 1
|-- issue md page 2
|-- _index.md
|-- _index.md
|- org 2
|--repo 1
|-- issue md page 1
|-- _index.md
|--repo 2
...
|-- _index.md
|- _index.md
```

### Output Grouped by Topics

The feature allows you to generate grouped output by topics. This feature is useful when you want to group tickets by specific topics or themes.

To gain a better understanding of the term "Topic", refer to the [Labels](#labels) section.

- **Default Behavior**: By default, the action generates all the documentation in a single directory.
- **Non-default Example**: Use the grouped output feature to organize the generated documentation by topics.
- `group-output-by-topics: true` activates the grouped output feature.
```
output
|- topic 1
|-- issue md page 1
|-- issue md page 2
|-- _index.md
|- topic 2
|-- issue md page 1
|-- _index.md
|- _index.md
```

---

## Contribution Guidelines

We welcome contributions to the Living Documentation Generator! Whether you're fixing bugs, improving documentation, or proposing new features, your help is appreciated.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
description: 'Enable or disable structured output.'
required: false
default: 'false'
group-output-by-topics:
description: 'Enable or disable grouping tickets by topics in the summary index.md file.'
required: false
default: 'false'
outputs:
output-path:
description: 'Path to the generated living documentation files'
Expand Down
11 changes: 10 additions & 1 deletion living_documentation_generator/action_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
GITHUB_TOKEN,
PROJECT_STATE_MINING,
REPOSITORIES,
OUTPUT_PATH,
GROUP_OUTPUT_BY_TOPICS,
STRUCTURED_OUTPUT,
OUTPUT_PATH,
DEFAULT_OUTPUT_PATH,
)

Expand Down Expand Up @@ -60,6 +61,14 @@ def get_is_project_state_mining_enabled() -> bool:
"""
return get_action_input(PROJECT_STATE_MINING, "false").lower() == "true"

@staticmethod
def get_is_grouping_by_topics_enabled() -> bool:
"""
Getter of the switch, that will group the tickets in the index.md file by topics.
@return: True if grouping by topics is enabled, False otherwise.
"""
return get_action_input(GROUP_OUTPUT_BY_TOPICS, "false").lower() == "true"

@staticmethod
def get_is_structured_output_enabled() -> bool:
"""
Expand Down
Loading

0 comments on commit fdb2f09

Please sign in to comment.