@phpsandbox/sdk 0.0.57 → 0.0.58

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/README.md CHANGED
@@ -202,13 +202,18 @@ console.log(installed.map((pkg) => pkg.name));
202
202
  ```ts
203
203
  await notebook.git.checkpoint('Jane Doe <jane@example.com>', 'Initial checkpoint');
204
204
 
205
- await notebook.git.sync(
206
- 'https://github.com/acme/my-repo.git',
207
- 'Jane Doe <jane@example.com>',
208
- 'main',
209
- process.env.GITHUB_TOKEN,
210
- 'pull'
211
- );
205
+ await notebook.secrets.set('GITHUB_TOKEN', {
206
+ value: process.env.GITHUB_TOKEN!,
207
+ type: 'credential',
208
+ });
209
+
210
+ await notebook.git.sync({
211
+ provider: 'github',
212
+ repository: 'acme/my-repo',
213
+ author: 'Jane Doe <jane@example.com>',
214
+ branch: 'main',
215
+ credential: { secret: 'GITHUB_TOKEN' },
216
+ });
212
217
 
213
218
  const history = await notebook.git.log('main');
214
219
  console.log(history[0]);