MCPcopy Create free account
hub / github.com/firebase/firebase-tools / createNote

Function createNote

src/crashlytics/notes.ts:17–39  ·  view source on GitHub ↗
(appId: string, issueId: string, note: string)

Source from the content-addressed store, hash-verified

15 * @return the created Note
16 */
17export async function createNote(appId: string, issueId: string, note: string): Promise<Note> {
18 const requestProjectNumber = parseProjectNumber(appId);
19 logger.debug(
20 `[crashlytics] createNote called with appId: ${appId}, issueId: ${issueId}, note: ${note}`,
21 );
22 try {
23 const response = await CRASHLYTICS_API_CLIENT.request<NoteRequest, Note>({
24 method: "POST",
25 headers: {
26 "Content-Type": "application/json",
27 },
28 path: `/projects/${requestProjectNumber}/apps/${appId}/issues/${issueId}/notes`,
29 body: { body: note },
30 timeout: TIMEOUT,
31 });
32
33 return response.body;
34 } catch (err: unknown) {
35 throw new FirebaseError(`Failed to create note for issue ${issueId}, app ${appId}`, {
36 original: getError(err),
37 });
38 }
39}
40
41/**
42 * Delete a Crashlytics note from an issue.

Callers 2

notes.spec.tsFile · 0.90
notes.tsFile · 0.90

Calls 2

parseProjectNumberFunction · 0.90
getErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…