Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/get_github_app_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def generate_installation_token():
print("Error: No installations found for this GitHub App", file=sys.stderr)
sys.exit(1)

# Create installation token
installation_id = installations[0]['id']

# Create installation token
url = f"https://api.github.com/app/installations/{installation_id}/access_tokens"
response = requests.post(url, headers=headers)
response.raise_for_status()
Expand Down
8 changes: 5 additions & 3 deletions tests/test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,11 @@ echo >&2 "2. Creating remote GitHub repository: $REPO_FULL_NAME"
log_cmd gh repo create "$REPO_FULL_NAME" --description "Temporary E2E test repo for update-pr-stack action" --public
echo >&2 "Successfully created $REPO_FULL_NAME"

# Enable GitHub Actions on the new repository (may be disabled by default in CI environments)
echo >&2 "Enabling GitHub Actions on the repository..."
log_cmd gh api -X PUT "/repos/$REPO_FULL_NAME/actions/permissions" --input - <<< '{"enabled":true,"allowed_actions":"all"}'
# Log default GitHub Actions permissions (repo inherits org/user defaults)
Comment thread
Phlogistique marked this conversation as resolved.
echo >&2 "Checking repository Actions permissions..."
if ! log_cmd gh api "/repos/$REPO_FULL_NAME/actions/permissions"; then
echo >&2 "Warning: unable to read Actions permissions for $REPO_FULL_NAME"
fi

# 3. Push initial state
echo >&2 "3. Pushing initial state to remote..."
Expand Down