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

Fix extracting of org from org/repo name in workflow generating docs #44

Merged
merged 1 commit into from
Jun 20, 2023

Commits on Jun 20, 2023

  1. Fix extracting of org from org/repo name in workflow generating docs

    Previously we've used `dest_org=${${{ inputs.destinationRepo }}%%/*}` which was
    removing the longest part (separated by `/`) from the input. This wasn't what we
    wanted in cases where the org name is longer than the repo name.
    We're now changing the approach and we're using `dest_org=$(echo
    ${{ inputs.destinationRepo }} | cut -d'/' -f1)` command now. The `cut` command
    is used to extract sections from lines of files or strings. In this case, we're
    using it to split the ${{ inputs.destinationRepo }} string on the `/` delimiter
    and then selecting the first field (`-f1`) before the delimiter.
    By using this approach, it doesn't matter if the first or second part is longer;
    it will always extract the first part of the variable containing `/`.
    michalinacienciala committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    84cf2fc View commit details
    Browse the repository at this point in the history