Skip to content

Commit

Permalink
Refactor code #66
Browse files Browse the repository at this point in the history
Refactor code
  • Loading branch information
betogaona7 authored Oct 1, 2023
2 parents 7ede300 + 0716b58 commit b44e34b
Show file tree
Hide file tree
Showing 8 changed files with 364 additions and 223 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# devtale

Every software product depends on some legacy, undocumented code repositories, whose authors left the company years ago.
Every software product depends on some legacy, undocumented code repositories, whose authors left the company years ago.

Who isn't afraid to make a change, if the code is unreadable?

Expand Down Expand Up @@ -60,6 +60,7 @@ jobs:
path: ${{ github.workspace }}
recursive: true
target_branch: main
save_tales: false
```

The `recursive` option allows you to document the entire repository. Alternatively, you can specify a specific path to document a single file or folder and set `recursive` to `false`. The workflow action will automatically create the `devtale/documentation` branch and push a new pull request for your review towards the `target_branch`, including the added documentation.
Expand Down
26 changes: 17 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ branding:

inputs:
openai_api_key:
description: "Your OpenAI API key"
description: "Your OpenAI API key."
required: true
path:
description: "Path to your repository, folder, or file."
required: true
recursive:
description: "True if you want to document the full repository. Otherwise False"
description: "True if you want to document the full repository. Otherwise False."
required: false
default: false
target_branch:
description: "Branch name for the documentation pull request."
description: "Base branch name to which the documentation pull request should point."
required: true
save_tales:
description: "True if you want to keep the tale files. Otherwise False to remove them."
required: false
default: false

runs:
using: "composite"
Expand Down Expand Up @@ -48,12 +52,16 @@ runs:

- name: Clean Documentation Files
run: |
rm -f *.py.json
rm -f *.php.json
rm -f *.go.json
rm -f *.js.json
rm -f *folder_level.json
rm -f *root_level.json
if ! ${{ inputs.save_tales }}; then
rm -f *.py.json
rm -f *.php.json
rm -f *.go.json
rm -f *.js.json
rm -f *.ts.json
rm -f *.tsx.json
rm -f *folder_level.json
rm -f *root_level.json
fi
shell: bash

- name: Push PR
Expand Down
Loading

0 comments on commit b44e34b

Please sign in to comment.