Skip to content

Commit

Permalink
attempt to remove newline characters
Browse files Browse the repository at this point in the history
  • Loading branch information
amenocal committed Mar 29, 2024
1 parent a691b1e commit 5d0a141
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gh-repo-stats
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,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'); do
for REPO_DATA in $(echo -n "${REPOS}" | jq -r '.[] | @base64' | tr -d '\n'); do
_jq() {
echo -n "${REPO_DATA}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -993,7 +993,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'); do
for ISSUE in $(echo -n "${ISSUES}" | jq -r '.[] | @base64' | td -d '\n'); do
_issue_jq() {
echo -n "${ISSUE}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -1112,7 +1112,7 @@ AnalyzePullRequests() {
PR_NEXT_PAGE=$(_pr_repo_jq '.pullRequests.pageInfo.endCursor')
echo "decoding PRS"
echo "${PRS}"
for PR in $(echo -n "${PRS}" | jq -r '.[] | @base64'); do
for PR in $(echo -n "${PRS}" | jq -r '.[] | @base64' | tr -d '\n'); do
_pr_jq() {
echo -n "${PR}" | base64 --decode | jq -r "${1}"
}
Expand Down Expand Up @@ -1242,7 +1242,7 @@ GetNextPullRequests() {
echo "${ERROR_MESSAGE}" | jq '.'
fi
echo "decoding PR_REPO"
echo "${/PR_REPO}"
echo "${PR_REPO}"
PR_REPO=$(echo -n "${PR_DATA}" | jq -r '.data.repository | @base64')

AnalyzePullRequests "${PR_REPO}"
Expand Down

0 comments on commit 5d0a141

Please sign in to comment.