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
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+35
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,38 @@ Thank you for considering to contribute to `github-project` 💖
4
4
5
5
Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
6
6
By participating you agree to abide by its terms.
7
+
8
+
## Ways to contribute
9
+
10
+
-**Reporting bugs** - if you find a bug, please [report it](https://github.com/copilot-extensions/preview-sdk.js/issues/new)!
11
+
-**Suggesting features** - if you have an idea for a new feature, please [suggest it](https://github.com/copilot-extensions/preview-sdk.js/issues/new)!
12
+
-**Contribute dreamcode** - like dreaming big? Same! Send a pull request with your beautiful API design that is so good, we just _have_ to make it real: [dreamcode.md](https://github.com/copilot-extensions/preview-sdk.js/blob/main/dreamcode.md)!
13
+
-**Contribute code** - Yes! Please! We might even have [issues that are ready to be worked on](https://github.com/copilot-extensions/preview-sdk.js/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22pull%20request%20welcome%22)!
14
+
15
+
## Development
16
+
17
+
### Prerequisites
18
+
19
+
-[Node.js](https://nodejs.org/) (v22.x)
20
+
21
+
We currently depend on Node 22+ for local development as we use new test APIs such as [snapshot testing](https://nodejs.org/api/test.html#snapshot-testing)! At some point we might move to a different test runner, but this works great to move fast in early aplha days.
22
+
23
+
### Setup
24
+
25
+
Use a codespace and you are all set: https://github.com/copilot-extensions/preview-sdk.js/codespaces.
26
+
27
+
Or, if you prefer to develop locally:
28
+
29
+
```
30
+
gh repo clone copilot-extensions/preview-sdk.js
31
+
cd preview-sdk.js
32
+
npm install
33
+
```
34
+
35
+
### Running tests
36
+
37
+
```
38
+
npm test
39
+
```
40
+
41
+
As part of the tests, we test types for our public APIs (`npm run test:types`) and our code (`npm run test:tsc`). Run `npm run` to see all available scripts.
Releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release).
6
+
The following commit message conventions determine which version is released:
7
+
8
+
1.`fix: ...` or `fix(scope name): ...` prefix in subject: bumps fix version, e.g. `1.2.3` → `1.2.4`
9
+
2.`feat: ...` or `feat(scope name): ...` prefix in subject: bumps feature version, e.g. `1.2.3` → `1.3.0`
10
+
3.`BREAKING CHANGE:` in body: bumps breaking version, e.g. `1.2.3` → `2.0.0`
11
+
12
+
Only one version number is bumped at a time, the highest version change trumps the others.
13
+
Besides, publishing a new version to npm, semantic-release also creates a git tag and release
14
+
on GitHub, generates changelogs from the commit messages and puts them into the release notes.
15
+
16
+
If the pull request looks good but does not follow the commit conventions, update the pull request title and use the <kbd>Squash & merge</kbd> button, at which point you can set a custom commit message.
Verify the request payload using the provided signature and key ID. The method will request the public key from GitHub's API for the given keyId and then verify the payload.
Fetches public keys for verifying copilot extension requests [from GitHub's API](https://api.github.com/meta/public_keys/copilot_api)
52
70
and returns them as an array. The request can be made without authentication, with a token, or with a custom [octokit request](https://github.com/octokit/request.js) instance.
All `create*Event()` methods return an object with a `.toString()` method, which is called automatically when a string is expected. Unfortunately that's not the case for `response.write()`, you need to call `.toString()` explicitly.
103
+
104
+
#### `createAckEvent()`
105
+
106
+
Acknowledge the request so that the chat UI can tell the user that the agent started generating a response.
While implementing the lower-level functionality, we also dream big: what would our dream SDK for Coplitot extensions look like? Please have a look and share your thoughts and ideas:
0 commit comments