gh-setup-git-identity 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # gh-setup-git-identity
2
2
 
3
+ ## 0.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 72d4185: Improve output formatting with better organization and verification commands
8
+
9
+ - Added blank lines between major sections for better visual grouping
10
+ - Applied consistent indentation (2 spaces) to detail lines under section headers
11
+ - Added helpful verification commands suggestion at the end of output
12
+ - Updated README.md to reflect the new output format
13
+ - Makes output more readable and professional while providing actionable next steps
14
+
3
15
  ## 0.4.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -117,20 +117,23 @@ printf "y" | gh auth login -h github.com -s repo,workflow,user,read:org,gist --g
117
117
 
118
118
  ```
119
119
  Fetching GitHub user information...
120
- GitHub user: your-username
121
- GitHub email: your-email@example.com
120
+ GitHub user: your-username
121
+ GitHub email: your-email@example.com
122
122
 
123
123
  Configuring git (global)...
124
- Git identity configured successfully!
124
+ Git identity configured successfully!
125
125
 
126
- Git configured:
127
-
128
- user.name: your-username
129
- user.email: your-email@example.com
130
-
131
- Scope: global (--global)
126
+ Git configured:
127
+ user.name: your-username
128
+ user.email: your-email@example.com
129
+ Scope: global (--global)
132
130
 
133
131
  Git identity setup complete!
132
+
133
+ You can verify your configuration with:
134
+ gh auth status
135
+ git config --global user.name
136
+ git config --global user.email
134
137
  ```
135
138
 
136
139
  ## Library Usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gh-setup-git-identity",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "A tool to setup git identity based on current gh user",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/cli.js CHANGED
@@ -100,14 +100,19 @@ async function main() {
100
100
 
101
101
  // Display results
102
102
  console.log('');
103
- console.log(`${options.dryRun ? '[DRY MODE] Would configure' : 'Git configured'}:`);
104
- console.log(` user.name: ${result.username}`);
105
- console.log(` user.email: ${result.email}`);
106
- console.log(`Scope: ${scope === 'global' ? 'global (--global)' : 'local (--local)'}`);
107
- console.log('');
103
+ console.log(` ${options.dryRun ? '[DRY MODE] Would configure' : 'Git configured'}:`);
104
+ console.log(` user.name: ${result.username}`);
105
+ console.log(` user.email: ${result.email}`);
106
+ console.log(` Scope: ${scope === 'global' ? 'global (--global)' : 'local (--local)'}`);
108
107
 
109
108
  if (!options.dryRun) {
109
+ console.log('');
110
110
  console.log('Git identity setup complete!');
111
+ console.log('');
112
+ console.log('You can verify your configuration with:');
113
+ console.log(' gh auth status');
114
+ console.log(` git config ${scope === 'global' ? '--global' : '--local'} user.name`);
115
+ console.log(` git config ${scope === 'global' ? '--global' : '--local'} user.email`);
111
116
  }
112
117
 
113
118
  process.exit(0);
package/src/index.js CHANGED
@@ -141,7 +141,7 @@ export async function runGhAuthLogin(options = {}) {
141
141
  return false;
142
142
  }
143
143
 
144
- log(() => 'GitHub CLI authentication successful!');
144
+ log(() => '\nGitHub CLI authentication successful!');
145
145
  return true;
146
146
  }
147
147
 
@@ -323,13 +323,13 @@ export async function setupGitIdentity(options = {}) {
323
323
 
324
324
  const log = createDefaultLogger({ verbose, logger });
325
325
 
326
- log(() => 'Fetching GitHub user information...');
326
+ log(() => '\nFetching GitHub user information...');
327
327
 
328
328
  // Get GitHub user info
329
329
  const { username, email } = await getGitHubUserInfo({ verbose, logger });
330
330
 
331
- log(() => `GitHub user: ${username}`);
332
- log(() => `GitHub email: ${email}`);
331
+ log(() => ` GitHub user: ${username}`);
332
+ log(() => ` GitHub email: ${email}`);
333
333
 
334
334
  if (dryRun) {
335
335
  log(() => 'DRY MODE: Would configure the following:');
@@ -339,12 +339,12 @@ export async function setupGitIdentity(options = {}) {
339
339
  }
340
340
 
341
341
  // Set git config
342
- log(() => `Configuring git (${scope})...`);
342
+ log(() => `\nConfiguring git (${scope})...`);
343
343
 
344
344
  await setGitConfig('user.name', username, { scope, verbose, logger });
345
345
  await setGitConfig('user.email', email, { scope, verbose, logger });
346
346
 
347
- log(() => 'Git identity configured successfully!');
347
+ log(() => ' Git identity configured successfully!');
348
348
 
349
349
  return { username, email };
350
350
  }