Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2021-12-15 01:51:26 -08:00
parent 800ce9ccdf
commit ce8338cc3e
2 changed files with 26 additions and 2 deletions

View File

@ -38,5 +38,29 @@ jobs:
- name: Generate the docs
shell: bash
run: |
pydoc3 -w kittycad
poetry run python -m pydoc -w \
kittycad \
kittycad.api \
kittycad.models \
kittycad.types \
kittycad.client
mkdir -p docs/html
mv *.html docs/html/
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
- name: Commit changes, if any
if: steps.git-check.outputs.modified == 'true'
run: |
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git commit -am "I HAVE GENERATED YOUR NEW DOCS!" || true
git fetch origin
git rebase origin/${{github.ref_name }} || true
git push origin ${{github.ref_name }}

View File

@ -41,7 +41,7 @@ class Client:
class AuthenticatedClient(Client):
"""A Client which has been authenticated for use on secured endpoints"""
token: str
token: str = attr.ib(kw_only=True)
def get_headers(self) -> Dict[str, str]:
"""Get headers to be used in authenticated endpoints"""