Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions-bot committed Feb 2, 2024
1 parent 31a92dd commit b7db837
Show file tree
Hide file tree
Showing 9 changed files with 141 additions and 18 deletions.
2 changes: 1 addition & 1 deletion assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions functions/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
<h1>Function default</h1></div>
<section class="tsd-panel">
<ul class="tsd-signatures">
<li class="tsd-signature tsd-anchor-link" id="default"><span class="tsd-kind-call-signature">default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">repo</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">path</span>, <span class="tsd-kind-parameter">ref</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GithubFile.html" class="tsd-signature-type tsd-kind-type-alias">GithubFile</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">&gt;</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
<li class="tsd-signature tsd-anchor-link" id="default"><span class="tsd-kind-call-signature">default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">repo</span>, <span class="tsd-kind-parameter">file</span>, <span class="tsd-kind-parameter">path</span>, <span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GithubFile.html" class="tsd-signature-type tsd-kind-type-alias">GithubFile</a><span class="tsd-signature-symbol"> | </span><a href="../types/GithubFolder.html" class="tsd-signature-type tsd-kind-type-alias">GithubFolder</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">&gt;</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Upserts a file on a GitHub repository using GitHub HTTP API. This function performs two HTTP requests:</p>
<div class="tsd-comment tsd-typography"><p>Upserts a file or folder on a GitHub repository using GitHub HTTP API. This function performs two HTTP requests:</p>
<ul>
<li>(GET) one to fetch the file on the location to be uploaded, to grab the old file (if one exists before) checksum</li>
<li>(PUT) and one to upload the new file, letting GitHub know that it&#39;s an update by passing the old file checksum.</li>
</ul>
<p><strong>Note</strong>: If a folder is to be upserted, the number of requests is multiplied by the number of files and child folders!</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -33,22 +34,21 @@ <h5><span class="tsd-kind-parameter">repo</span>: <a href="../types/GitHubReposi
<div class="tsd-comment tsd-typography"><p>A <a href="../types/GitHubRepository.html" class="tsd-kind-type-alias">GitHubRepository</a> model that identifies the repository file will be upserted.</p>
</div></li>
<li>
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type ">Uint8Array</span></h5>
<div class="tsd-comment tsd-typography"><p>The file content to be upserted, encoded at the byte level.</p>
<h5><span class="tsd-kind-parameter">file</span>: <a href="../types/Folder.html" class="tsd-signature-type tsd-kind-type-alias">Folder</a><span class="tsd-signature-symbol"> | </span><a href="../types/File.html" class="tsd-signature-type tsd-kind-type-alias">File</a></h5>
<div class="tsd-comment tsd-typography"><p>The file or folder to be upserted.</p>
</div></li>
<li>
<h5><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>The absolute path that locates the file in the repository.</p>
<div class="tsd-comment tsd-typography"><p>The absolute path that locates the file in the repository. If a folder is to be upserted, then the path indicates the root
directory where the folder will be inserted.</p>
</div></li>
<li>
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">ref</span>: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>An (optional) git commit ref/branch in which the file should be upserted.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GithubFile.html" class="tsd-signature-type tsd-kind-type-alias">GithubFile</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">&gt;</span></h4><p>A <a href="../types/GithubFile.html" class="tsd-kind-type-alias">GithubFile</a> model that identifies the file within GitHub API, or a Response instance
<h5><span class="tsd-kind-parameter">__namedParameters</span>: <span class="tsd-signature-type ">OptionalUpsertParameters</span><span class="tsd-signature-symbol"> = {}</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GithubFile.html" class="tsd-signature-type tsd-kind-type-alias">GithubFile</a><span class="tsd-signature-symbol"> | </span><a href="../types/GithubFolder.html" class="tsd-signature-type tsd-kind-type-alias">GithubFolder</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">&gt;</span></h4><p>A <a href="../types/GithubFile.html" class="tsd-kind-type-alias">GithubFile</a> model that identifies the file within GitHub API, or a Response instance
if the fetch/upsert request failed.</p>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/web-pacotes/github-upsert/blob/5a41554/src/handler.ts#L20">handler.ts:20</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/web-pacotes/github-upsert/blob/fb59550/src/handler.ts#L39">handler.ts:39</a></li></ul></aside></li></ul></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand All @@ -68,8 +68,10 @@ <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</op
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>@web-<wbr/>pacotes/github-<wbr/>upsert</span></a>
<ul class="tsd-small-nested-navigation">
<li><a href="../types/File.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>File</span></a></li>
<li><a href="../types/Folder.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Folder</span></a></li>
<li><a href="../types/GitHubRepository.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Git<wbr/>Hub<wbr/>Repository</span></a></li>
<li><a href="../types/GithubFile.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Github<wbr/>File</span></a></li>
<li><a href="../types/GithubFolder.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Github<wbr/>Folder</span></a></li>
<li><a href="default.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>default</span></a></li></ul></nav></div></div></div>
<div class="tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
Expand Down
Loading

0 comments on commit b7db837

Please sign in to comment.