talkiq / confluence-wiki-sync

https://github.com/marketplace/actions/confluence-docs-sync
Other
11 stars 3 forks source link

Add optional param for default branch #71

Closed KevinGDialpad closed 3 weeks ago

KevinGDialpad commented 3 weeks ago

We currently always use f'https://github.com/{github_repo}/blob/HEAD/' as the URL root, which result slightly awkward-looking URLs.

We could add an optional default-branch param and then have

  default-branch:
    description: ...
    required: false
    default: 'HEAD'

(need to keep HEAD as the default for backward compatibility)

    git_ref = os.environ['INPUT_DEFAULT-BRANCH']
    url_root_for_file = f'https://github.com/{github_repo}/blob/{git_ref}/'