Skip to content

Commit

Permalink
now removing tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
amenocal committed Mar 29, 2024
1 parent 8ecdb1e commit 730e6d9
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions gh-repo-stats
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ ParseRepos() {
REPOS=$(echo "${PARSE_DATA}" | jq -r '.data.organization.repositories.nodes')
echo "decoding repos"
echo "${REPOS}"
for REPO_DATA in $(echo -n "${REPOS}" | jq -r '.[] | @base64' | tr -d '\n'); do
for REPO_DATA in $(echo -n "${REPOS}" | jq -r '.[] | @base64' | tr -d '\n' | tr -d ' \t'); do
_jq() {
echo -n "${REPO_DATA}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -856,8 +856,6 @@ ParseRepoData() {
# Pull in the repos data block
REPO_DATA=$1
# Convert the format to JSON
echo "decoding repo data"
echo "${REPO_DATA}"
_jq() {
echo -n "${REPO_DATA}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -980,8 +978,6 @@ ParseRepoData() {
#### Function AnalyzeIssues ####################################################
AnalyzeIssues() {
THIS_REPO=$1
echo "decoding AnalyzeIssues THIS_REPO"
echo "${THIS_REPO}"
_pr_issue_jq() {
echo -n "${THIS_REPO}" | base64 --decode | jq -r "${1}"
}
Expand All @@ -999,7 +995,7 @@ AnalyzeIssues() {
ISSUE_NEXT_PAGE=$(_pr_issue_jq '.issues.pageInfo.endCursor')
echo "decoding ISSUES"
echo "${ISSUES}"
for ISSUE in $(echo -n "${ISSUES}" | jq -r '.[] | @base64' | tr -d '\n'); do
for ISSUE in $(echo -n "${ISSUES}" | jq -r '.[] | @base64' | tr -d '\n' | tr -d ' \t'); do
_issue_jq() {
echo -n "${ISSUE}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -1097,8 +1093,6 @@ GetNextIssues() {
#### Function AnalyzePullRequests ##############################################
AnalyzePullRequests() {
PR_REPO=$1
echo "decoding AnalyzePullRequests PR_REPO"
echo "${PR_REPO}"
_pr_repo_jq() {
echo -n "${PR_REPO}" | base64 --decode | jq -r "${1}"
}
Expand All @@ -1117,8 +1111,8 @@ AnalyzePullRequests() {
##############################
PR_NEXT_PAGE=$(_pr_repo_jq '.pullRequests.pageInfo.endCursor')
echo "decoding PRS"
echo "${PRS}"
for PR in $(echo -n "${PRS}" | jq -r '.[] | @base64' | tr -d '\n'); do
echo "PR"
for PR in $(echo -n "${PRS}" | jq -r '.[] | @base64' | tr -d '\n' | tr -d ' \t'); do
_pr_jq() {
echo -n "${PR}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -1247,8 +1241,6 @@ GetNextPullRequests() {
echo "ERROR --- Errors occurred while retrieving pull requests for repo: ${REPO_NAME}"
echo "${ERROR_MESSAGE}" | jq '.'
fi
echo "decoding PR_REPO"
echo "${PR_REPO}"
PR_REPO=$(echo -n "${PR_DATA}" | jq -r '.data.repository | @base64')

AnalyzePullRequests "${PR_REPO}"
Expand All @@ -1258,8 +1250,6 @@ GetNextPullRequests() {
#### Function AnalyzeReviews ###################################################
AnalyzeReviews() {
REVIEW_PR=$1
echo "decoding AnalyzeReviews REVIEW_PR"
echo "${REVIEW_PR}"
_review_jq() {
echo -n "${REVIEW_PR}" | base64 --decode | jq -r "${1}"
}
Expand All @@ -1278,8 +1268,6 @@ AnalyzeReviews() {
PR_NUMBER=$(_review_jq '.number')

Debug "Analyzing Pull Request Reviews for: ${REPO_NAME} PR: ${PR_NUMBER}"
echo "decoding REVIEWS"
echo "${REVIEWS}"
for REVIEW in $(echo -n "${REVIEWS}" | jq -r '.[] | @base64'); do
_pr_jq() {
echo -n "${REVIEW}" | base64 --decode | jq -r "${1}"
Expand Down Expand Up @@ -1386,8 +1374,6 @@ GetNextReviews() {
#####################
# Get the Review PR #
#####################
echo "decoding REVIEW_PR"
echo "${REVIEW_PR}"
REVIEW_PR=$(echo -n "${REVIEW_DATA}" | jq -r '.data.repository.pullRequest | @base64')

######################
Expand Down Expand Up @@ -1445,8 +1431,6 @@ GetTeams() {
# Get the Current End Cursor #
##############################
TEAM_NEXT_PAGE=$(echo "${TEAM_DATA}" | jq -r '.data.organization.teams.pageInfo.endCursor')
echo "decoding teams"
echo "${TEAMS}"
for TEAM in $(echo -n "${TEAMS}" | jq -r '.[] | @base64'); do
_team_jq() {
echo -n "${TEAM}" | base64 --decode | jq -r "${1}"
Expand Down

0 comments on commit 730e6d9

Please sign in to comment.