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

github-repository-traffic/parse.repository.data.sh - repositories with '.' in name fail #46

Closed
BradleyA opened this issue Apr 11, 2020 · 1 comment
Assignees
Labels
bug Something isn't working, an incident requiring resources for assessment and resolution.

Comments

@BradleyA
Copy link
Owner

BradleyA commented Apr 11, 2020

Describe the incident:
github-repository-traffic/parse.repository.data.sh - repositories with '.' in name fail

To reproduce the incident:
Steps to reproduce the behavior:

->  run parse.repository.data.sh script on a repository with a '.' as a character in the repository name (Start-registry-v2-script.1.0). 
->  The script truncates the repository name from the '.' on, which causes the following 'cd' command to fail. **No such file or directory** 

Actual results:

->  REPOSITORY >Start-registry-v2-script<

Expected results:
A clear and concise description of what you expected to happen.

-> REPOSITORY >Start-registry-v2-script.1.0<

Version:

  • OS Ubuntu 16.04.6
  • Command: github-repository/parse.repository.data.sh
@BradleyA BradleyA added the bug Something isn't working, an incident requiring resources for assessment and resolution. label Apr 11, 2020
@BradleyA BradleyA self-assigned this Apr 11, 2020
@BradleyA
Copy link
Owner Author

Changed this

#    define GITHUB_OWNER and REPOSITORY
GITHUB_OWNER=$(echo "${1}" | cut -d. -f 1)
#    REPOSITORY=$(echo "${1}" | sed -e 's/${GITHUB_OWNER}//')
REPOSITORY=$(echo "${1}" | cut -d. -f 2)

To this

#    Define GITHUB_OWNER and REPOSITORY from $1
GITHUB_OWNER=$(echo "${1}" | cut -d. -f 1)
REPOSITORY=${1%.*}    #    works in bash 3.2.25 or later
REPOSITORY=${REPOSITORY#*.}    #    works in bash 3.2.25 or later

@BradleyA BradleyA added this to Investigating in github-repository-traffic - R&D via automation May 24, 2020
@BradleyA BradleyA moved this from Investigating to Completed in github-repository-traffic - R&D May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, an incident requiring resources for assessment and resolution.
Projects
Development

No branches or pull requests

1 participant