Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 `/`.
- Loading branch information