Skip to content

Commit

Permalink
make fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gomez385 committed Oct 1, 2024
1 parent ac30e94 commit 25ba273
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Setup GITHUB Credentials
id: github_credentials
run: |
python encode_jwt.py "$GITHUB_APP_PEM_FILE" "$GITHUB_APP_INSTALLATION_ID" "$GITHUB_BASE_URL" #>> $GITHUB_ENV
export GITHUB_TOKEN=$(python encode_jwt.py "$GITHUB_APP_PEM_FILE" "$GITHUB_APP_INSTALLATION_ID" "$GITHUB_BASE_URL")
- name: Terraform Init
id: init
Expand Down
5 changes: 0 additions & 5 deletions encode_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
parser.add_argument('enterprise_url', type=str, help='GitHub Enterprise API URL (e.g., https://github.e.it.census.gov)')
args = parser.parse_args()

print(args.private_key)
print(args.installation_id)
print(args.enterprise_url)
# Load the PEM private key
private_key = load_pem_private_key(args.private_key.encode(), password=None)

Expand Down Expand Up @@ -68,8 +65,6 @@
"Accept": "application/vnd.github+json"
}

print(jwt_token)

# Make the request to the GitHub Enterprise API to get the installation access token
url = f"{args.enterprise_url}api/v3/app/installations/{args.installation_id}/access_tokens"
response = requests.post(url, headers=headers)
Expand Down

0 comments on commit 25ba273

Please sign in to comment.