You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh api --method POST /organizations/stacksjs/github-apps/manifests \
58
-
--field manifest="$(cat app-manifest.json)" \
59
-
--jq '.html_url'| xargs open
81
+
# Open the URL in the browser for the stacksjs organization
82
+
open "https://github.com/organizations/stacksjs/settings/apps/new"2>/dev/null || xdg-open "https://github.com/organizations/stacksjs/settings/apps/new"2>/dev/null ||echo"Please open this URL in your browser: https://github.com/organizations/stacksjs/settings/apps/new"
60
83
61
84
echo
62
-
echo"4. After completing the steps above, please enter the App ID: "
85
+
echo"3. After clicking 'Create GitHub App':"
86
+
echo" a. You'll be redirected to the App settings page"
87
+
echo" b. Note your App ID (shown at the top)"
88
+
echo" c. Generate a private key by clicking 'Generate a private key'"
89
+
echo" d. Save the downloaded .pem file"
90
+
echo
91
+
92
+
echo"4. Please enter the App ID from the settings page: "
63
93
read APP_ID
64
94
95
+
if [ -z"$APP_ID" ];then
96
+
echo"Error: No App ID provided"
97
+
exit 1
98
+
fi
99
+
65
100
echo
66
-
echo"5. Please paste the path to the downloaded .pem private key file: "
101
+
echo"5. Please enter the path to the downloaded .pem private key file: "
67
102
read PEM_PATH
68
103
69
104
if [ !-f"$PEM_PATH" ];then
70
105
echo"Error: Private key file not found at $PEM_PATH"
71
106
exit 1
72
107
fi
73
108
74
-
PRIVATE_KEY=$(cat "$PEM_PATH")
109
+
PEM_KEY=$(cat "$PEM_PATH")
110
+
111
+
echo"6. Successfully registered GitHub App with ID: $APP_ID"
75
112
76
113
# Create GitHub repository secrets
77
-
echo
78
-
echo"6. Creating GitHub repository secrets..."
114
+
echo"7. Creating GitHub repository secrets..."
79
115
80
116
# Create secrets in the repository
81
117
echo"Creating GH_APP_ID secret..."
82
118
gh secret set GH_APP_ID -b"$APP_ID" -R stacksjs/stacks
83
119
84
120
echo"Creating GH_APP_PRIVATE_KEY secret..."
85
-
gh secret set GH_APP_PRIVATE_KEY -b"$PRIVATE_KEY" -R stacksjs/stacks
121
+
gh secret set GH_APP_PRIVATE_KEY -b"$PEM_KEY" -R stacksjs/stacks
86
122
87
123
echo
88
-
echo"7. Installation:"
89
-
echo" - If you haven't already, install the app to your organization"
90
-
echo" - Navigate to the GitHub App page and click 'Install App'"
91
-
echo" - Choose 'Only select repositories' and select 'stacksjs/stacks'"
124
+
echo"8. Installation:"
125
+
echo" - On the App settings page, click 'Install App' in the sidebar"
126
+
echo" - You should see the stacksjs organization listed"
127
+
echo" - Click 'Install' next to stacksjs"
128
+
echo" - On the next page, choose 'All repositories' or 'Only select repositories'"
129
+
echo" - If 'Only select repositories', make sure to select 'stacks'"
130
+
echo" - Click 'Install'"
92
131
echo
93
132
94
133
echo"Setup completed successfully!"
95
-
echo
96
-
echo"You can now run your GitHub Actions workflow, which will automatically"
97
-
echo"create and manage the homebrew tap repository."
0 commit comments