Skip to content
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

Feature/57 prepare action inputs for several regimes #72

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6907482
Action yaml enabling more regimes.
MobiTikula Nov 26, 2024
a78f48d
New project structure supporting multiple regimes.
MobiTikula Nov 26, 2024
bdf03e2
Logic to implement use of regimes.
MobiTikula Nov 26, 2024
fe4ffb8
Test coverage added for new logic with new project folder structure.
MobiTikula Nov 26, 2024
35502e7
Logic for correct enabling LivDoc regime mining.
MobiTikula Nov 28, 2024
bc91438
Implementing the tests for the new logic.
MobiTikula Nov 28, 2024
4f7e74b
Updated documentation for new project structure preparing for better …
MobiTikula Nov 28, 2024
7bbb1c5
Removing feature for enabling to user to choose their own output_path.
MobiTikula Dec 2, 2024
1be806c
Updating tests for new logic disabling user to choose their own outpu…
MobiTikula Dec 2, 2024
22593b3
Implementing GH comments for the liv-doc README.md.
MobiTikula Dec 3, 2024
b09c30f
Try to fix github workflow bug.
MobiTikula Dec 3, 2024
46f1bf1
Implementing GH comments mainly for the project README.md.
MobiTikula Dec 3, 2024
8ad6a0f
Implementing GH comments mainly for the project README.md.
MobiTikula Dec 3, 2024
fdd3591
Improving DEBUG logging.
MobiTikula Dec 3, 2024
ae71977
Test fix.
MobiTikula Dec 3, 2024
579f19a
Implementing review comments.
MobiTikula Dec 4, 2024
107bd99
Implementing review comments.
MobiTikula Dec 4, 2024
165ad6f
Implementing README TODOs.
MobiTikula Dec 9, 2024
2d44555
Revert "Implementing README TODOs."
MobiTikula Dec 9, 2024
62efb91
Implementing README comment.
MobiTikula Dec 9, 2024
5cde52f
Fixing the bug.
MobiTikula Dec 9, 2024
031ceb1
Fixing the bug.
MobiTikula Dec 9, 2024
ec7c677
Fixing the bug.
MobiTikula Dec 9, 2024
abc92fc
Fixing the bug.
MobiTikula Dec 9, 2024
abd38b7
Fixing the bug.
MobiTikula Dec 12, 2024
5b49ac4
Fixing the bug.
MobiTikula Dec 12, 2024
d3dc120
Fixing the bug.
MobiTikula Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/static_analysis_and_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Set PYTHONPATH environment variable
run: echo "PYTHONPATH=${GITHUB_WORKSPACE}/living_documentation_generator/living_documentation_generator" >> $GITHUB_ENV

- name: Check code coverage with Pytest
run: pytest --cov=. -v tests/ --cov-fail-under=80
443 changes: 115 additions & 328 deletions README.md

Large diffs are not rendered by default.

61 changes: 40 additions & 21 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
name: 'Living Documentation Generator'
description: 'Generates living documentation from current state of user defined GitHub repositories.'
inputs:
GITHUB_TOKEN:
# Base action inputs
GITHUB-TOKEN:
description: 'GitHub token for authentication.'
required: true
repositories:
description: 'JSON string defining the repositories to be included in the documentation generation.'
liv-doc-regime:
description: 'Enable or disable the LivDoc regime.'
required: true
project-state-mining:
description: 'Enable or disable mining of project state data.'
required: false
default: 'false'
verbose-logging:
description: 'Enable or disable verbose logging.'
required: false
default: 'false'
output-path:
description: 'Path to the generated living documentation files.'

# LivDoc-regime action inputs
liv-doc-repositories:
description: 'JSON string defining the repositories to be included in the documentation generation.'
required: false
default: './output'
structured-output:
default: '[]'
liv-doc-project-state-mining:
description: 'Enable or disable mining of project state data.'
required: false
default: 'false'
liv-doc-structured-output:
description: 'Enable or disable structured output.'
required: false
default: 'false'
group-output-by-topics:
liv-doc-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:
miroslavpojer marked this conversation as resolved.
Show resolved Hide resolved
description: 'Path to the generated living documentation files'
description: 'Path to the generated living documentation files.'
value: ${{ steps.liv-doc-generator.outputs.output-path }}

branding:
Expand All @@ -51,16 +54,32 @@ runs:
export PYTHONPATH="${PYTHONPATH}:${ACTION_ROOT}/living-doc-generator"
shell: bash

- name: Call Living Documentation Generator
- name: Prepare environment based on mining regimes
run: |
# Set base env variables common for all regimes
echo "INPUT_GITHUB_TOKEN=${{ env.GITHUB-TOKEN }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_REGIME=${{ inputs.liv-doc-regime }}" >> $GITHUB_ENV
echo "INPUT_VERBOSE_LOGGING=${{ inputs.verbose-logging }}" >> $GITHUB_ENV

# Add LivDoc-specific env variables if the regime is enabled
if [[ "${{ inputs.liv-doc-regime }}" == "true" ]]; then
echo "INPUT_LIV_DOC_REPOSITORIES=$(echo '${{ inputs.liv-doc-repositories }}' | jq -c .)" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_PROJECT_STATE_MINING=${{ inputs.liv-doc-project-state-mining }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_STRUCTURED_OUTPUT=${{ inputs.liv-doc-structured-output }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_GROUP_OUTPUT_BY_TOPICS=${{ inputs.liv-doc-group-output-by-topics }}" >> $GITHUB_ENV
fi
shell: bash

- name: Run Living Documentation Generator
id: liv-doc-generator
env:
INPUT_GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
INPUT_REPOSITORIES: ${{ inputs.repositories }}
INPUT_PROJECT_STATE_MINING: ${{ inputs.project-state-mining }}
INPUT_VERBOSE_LOGGING: ${{ inputs.verbose-logging }}
INPUT_OUTPUT_PATH: ${{ inputs.output-path }}
INPUT_STRUCTURED_OUTPUT: ${{ inputs.structured-output }}

INPUT_GITHUB_TOKEN: ${{ env.INPUT_GITHUB_TOKEN }}
INPUT_LIV_DOC_REGIME: ${{ env.INPUT_LIV_DOC_REGIME }}
INPUT_VERBOSE_LOGGING: ${{ env.INPUT_VERBOSE_LOGGING }}
INPUT_LIV_DOC_REPOSITORIES: ${{ env.INPUT_LIV_DOC_REPOSITORIES }}
INPUT_LIV_DOC_PROJECT_STATE_MINING: ${{ env.INPUT_LIV_DOC_PROJECT_STATE_MINING }}
INPUT_LIV_DOC_STRUCTURED_OUTPUT: ${{ env.INPUT_LIV_DOC_STRUCTURED_OUTPUT }}
INPUT_LIV_DOC_GROUP_OUTPUT_BY_TOPICS: ${{ env.INPUT_LIV_DOC_GROUP_OUTPUT_BY_TOPICS }}
run: |
python ${{ github.action_path }}/main.py
shell: bash
Binary file modified img/vision.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading