Skip to content

Commit

Permalink
debug 3
Browse files Browse the repository at this point in the history
  • Loading branch information
amenocal committed Mar 29, 2024
1 parent ee3f0ca commit a2458f9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gh-repo-stats
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ ParseRepos() {
echo "REPOS after base64 encoding: ${ENCODED_REPOS}"
for REPO_DATA in $(echo -n "${REPOS}" | jq -r '.[] | @base64'); do
_jq() {
echo "decoding REPO_DATA in Parse Repos"
echo -n "${REPO_DATA}" | base64 --decode | jq -r "${1}"
echo "decoding repos"
}

OWNER=$(_jq '.owner.login' | tr '[:upper:]' '[:lower:]')
Expand Down Expand Up @@ -858,6 +858,7 @@ ParseRepoData() {
REPO_DATA=$1
# Convert the format to JSON
_jq() {
echo "decoding REPO_DATA in ParseRepoData"
echo -n "${REPO_DATA}" | base64 --decode | jq -r "${1}"
}

Expand Down Expand Up @@ -980,6 +981,7 @@ ParseRepoData() {
AnalyzeIssues() {
THIS_REPO=$1
_pr_issue_jq() {
echo "decoding THIS_REPO"
echo -n "${THIS_REPO}" | base64 --decode | jq -r "${1}"
}

Expand All @@ -997,8 +999,8 @@ AnalyzeIssues() {
echo "${ISSUES}"
for ISSUE in $(echo -n "${ISSUES}" | jq -r '.[] | @base64'); do
_issue_jq() {
echo "Decoding ISSUE: ${ISSUE}"
echo -n "${ISSUE}" | base64 --decode | jq -r "${1}"
echo "decoding ISSUES"
}

EVENT_CT=$(_issue_jq '.timeline.totalCount')
Expand Down Expand Up @@ -1095,6 +1097,7 @@ GetNextIssues() {
AnalyzePullRequests() {
PR_REPO=$1
_pr_repo_jq() {
echo "decoding PR_REPO"
echo -n "${PR_REPO}" | base64 --decode | jq -r "${1}"
}

Expand All @@ -1113,8 +1116,8 @@ AnalyzePullRequests() {
PR_NEXT_PAGE=$(_pr_repo_jq '.pullRequests.pageInfo.endCursor')
for PR in $(echo -n "${PRS}" | jq -r '.[] | @base64'); do
_pr_jq() {
echo "Decoding PRS"
echo -n "${PR}" | base64 --decode | jq -r "${1}"
echo "decoding PRS"
}

PR_NUMBER=$(_pr_jq '.number')
Expand Down Expand Up @@ -1251,6 +1254,7 @@ GetNextPullRequests() {
AnalyzeReviews() {
REVIEW_PR=$1
_review_jq() {
echo "decoding REVIEW_PR"
echo -n "${REVIEW_PR}" | base64 --decode | jq -r "${1}"
}

Expand All @@ -1270,6 +1274,7 @@ AnalyzeReviews() {
Debug "Analyzing Pull Request Reviews for: ${REPO_NAME} PR: ${PR_NUMBER}"
for REVIEW in $(echo -n "${REVIEWS}" | jq -r '.[] | @base64'); do
_pr_jq() {
echo "decoding REVIEW"
echo -n "${REVIEW}" | base64 --decode | jq -r "${1}"
}

Expand Down Expand Up @@ -1433,6 +1438,7 @@ GetTeams() {
TEAM_NEXT_PAGE=$(echo "${TEAM_DATA}" | jq -r '.data.organization.teams.pageInfo.endCursor')
for TEAM in $(echo -n "${TEAMS}" | jq -r '.[] | @base64'); do
_team_jq() {
echo "decoding TEAM"
echo -n "${TEAM}" | base64 --decode | jq -r "${1}"
}

Expand Down

0 comments on commit a2458f9

Please sign in to comment.