Files
issues-helper/en-US/guide/start/index.html
2020-12-31 15:50:04 +08:00

38 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<link
rel="shortcut icon"
type="image/x-icon"
href="https://avatars1.githubusercontent.com/u/73879334?s=200&v=4"
/>
<style>
.markdown table {
width: auto !important;
}
</style>
<link rel="stylesheet" href="/issues-helper/umi.1f456e5a.css" />
<script>
window.routerBase = "/issues-helper/";
</script>
<script>
//! umi version: 3.3.3
</script>
<title>Quick start</title>
</head>
<body>
<div id="root"><div class="__dumi-default-layout" data-route="/en-US/guide/start" data-show-sidemenu="true" data-show-slugs="true" data-site-mode="true" data-gapless="false"><div class="__dumi-default-navbar" data-mode="site"><button class="__dumi-default-navbar-toggle"></button><a class="__dumi-default-navbar-logo" style="background-image:url(&#x27;https://avatars1.githubusercontent.com/u/73879334?s=200&amp;v=4&#x27;)" href="/issues-helper//en-US">Issue Helper</a><nav><div class="__dumi-default-search"><input type="search" class="__dumi-default-search-input" value=""/><ul></ul></div><span><a aria-current="page" class="active" href="/issues-helper//en-US/guide">Guide</a></span><span><a href="/issues-helper//en-US/base">Base</a></span><span><a href="/issues-helper//en-US/advanced">Advanced</a></span><span><a href="/issues-helper//en-US/changelog">Changelog</a></span><span><a target="_blank" rel="noopener noreferrer" href="https://github.com/actions-cool/issues-helper">GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></span><div class="__dumi-default-locale-select" data-locale-count="2"><a href="/issues-helper//guide/start">中文</a></div></nav></div><div class="__dumi-default-menu" data-mode="site"><div class="__dumi-default-menu-inner"><div class="__dumi-default-menu-header"><a class="__dumi-default-menu-logo" style="background-image:url(&#x27;https://avatars1.githubusercontent.com/u/73879334?s=200&amp;v=4&#x27;)" href="/issues-helper//en-US"></a><h1>Issue Helper</h1><p></p></div><div class="__dumi-default-menu-mobile-area"><ul class="__dumi-default-menu-nav-list"><li><a aria-current="page" class="active" href="/issues-helper//en-US/guide">Guide</a></li><li><a href="/issues-helper//en-US/base">Base</a></li><li><a href="/issues-helper//en-US/advanced">Advanced</a></li><li><a href="/issues-helper//en-US/changelog">Changelog</a></li><li><a target="_blank" rel="noopener noreferrer" href="https://github.com/actions-cool/issues-helper">GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul><div class="__dumi-default-locale-select" data-locale-count="2"><a href="/issues-helper//guide/start">中文</a></div></div><ul class="__dumi-default-menu-list"><li><a target="_blank" rel="noopener noreferrer">🍭 Guide</a><ul><li><a href="/issues-helper//en-US/guide"><span>Introduction</span></a></li><li><a aria-current="page" class="active" href="/issues-helper//en-US/guide/start"><span>Quick start</span></a></li></ul></li><li><a href="/issues-helper//en-US/guide/ref">🎁 Reference</a></li><li><a href="/issues-helper//en-US/guide/faq">💬 FAQ</a></li></ul></div></div><ul role="slug-list" class="__dumi-default-layout-toc"><li title="Quick start" data-depth="2"><a href="/issues-helper//en-US/guide/start#quick-start"><span>Quick start</span></a></li><li title="1. New Action" data-depth="3"><a href="/issues-helper//en-US/guide/start#1-new-action"><span>1. New Action</span></a></li><li title="2. Edit Action" data-depth="3"><a href="/issues-helper//en-US/guide/start#2-edit-action"><span>2. Edit Action</span></a></li><li title="3. Enable Action" data-depth="3"><a href="/issues-helper//en-US/guide/start#3-enable-action"><span>3. Enable Action</span></a></li></ul><div class="__dumi-default-layout-content"><div class="markdown"><h2 id="quick-start"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/start#quick-start"><span class="icon,icon-link"></span></a>Quick start</h2><h3 id="1-new-action"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/start#1-new-action"><span class="icon,icon-link"></span></a>1. New Action</h3><p>Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.</p><p><img src="/issues-helper/static/add-1.5eede08a.jpg" alt=""/></p><p>Click <code>New workflow</code> to add.</p><p><img src="/issues-helper/static/add-2.ed31eae2.jpg" alt=""/></p><div class="__dumi-default-alert" type="success">You can click <span class="__dumi-default-badge">set up a workflow yourself</span> to add a custom action, or you can apply a new action based on a template. <a target="_blank" rel="noopener noreferrer" href="https://github.com/actions-cool/.github">Templates<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>.</div><h3 id="2-edit-action"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/start#2-edit-action"><span class="icon,icon-link"></span></a>2. Edit Action</h3><p>Actions storage address is fixed, unified as <code>/.github/workflows/xx.yml</code>.</p><p>Let&#x27;s take the example of the home page and explain it in detail. The corresponding scenario is: when an issue adds the <code>help wanted</code> tag, the system will automatically comment.</p><div class="__dumi-default-code-block"><pre class="prism-code language-yml"><button class="__dumi-default-icon __dumi-default-code-block-copy-btn" data-status="ready"></button><div class="token-line"><span class="token key atrule">name</span><span class="token punctuation">:</span><span class="token plain"> Issue Reply</span></div><div class="token-line"><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token key atrule">on</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">issues</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">types</span><span class="token punctuation">:</span><span class="token plain"> </span><span class="token punctuation">[</span><span class="token plain">labeled</span><span class="token punctuation">]</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token key atrule">jobs</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">reply-helper</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">runs-on</span><span class="token punctuation">:</span><span class="token plain"> ubuntu</span><span class="token punctuation">-</span><span class="token plain">latest</span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">steps</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token punctuation">-</span><span class="token plain"> </span><span class="token key atrule">name</span><span class="token punctuation">:</span><span class="token plain"> help wanted</span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">if</span><span class="token punctuation">:</span><span class="token plain"> github.event.label.name == &#x27;help wanted&#x27;</span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">uses</span><span class="token punctuation">:</span><span class="token plain"> actions</span><span class="token punctuation">-</span><span class="token plain">cool/issues</span><span class="token punctuation">-</span><span class="token plain">helper@v1.2</span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">with</span><span class="token punctuation">:</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">actions</span><span class="token punctuation">:</span><span class="token plain"> </span><span class="token string">&#x27;create-comment&#x27;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">token</span><span class="token punctuation">:</span><span class="token plain"> $</span><span class="token punctuation">{</span><span class="token punctuation">{</span><span class="token plain"> secrets.GITHUB_TOKEN </span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">issue-number</span><span class="token punctuation">:</span><span class="token plain"> $</span><span class="token punctuation">{</span><span class="token punctuation">{</span><span class="token plain"> github.event.issue.number </span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token key atrule">body</span><span class="token punctuation">:</span><span class="token plain"> </span><span class="token punctuation">|</span><span class="token scalar string"></span></div><div class="token-line"><span class="token scalar string"> Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome PR。</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span></div><div class="token-line"><span class="token plain"> 你好 @$</span><span class="token punctuation">{</span><span class="token punctuation">{</span><span class="token plain"> github.event.issue.user.login </span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token plain">,我们完全同意你的提议/反馈欢迎PR。</span></div><div class="token-line"><span class="token plain"></span></div></pre></div><ul><li><code>YML</code> syntax reference<ul><li><a target="_blank" rel="noopener noreferrer" href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on">Workflow syntax for GitHub Actions<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li><code>name</code>: The workflow name<ul><li>Actions workflow name, can be customized according to actual situation</li></ul></li><li><code>on</code>: The action trigger condition<ul><li>Reference <a target="_blank" rel="noopener noreferrer" href="https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows">Events that trigger workflows<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li><code>uses</code>: Use actions name<ul><li><code>uses: actions-cool/issues-helper@v1.2</code>。Please <a href="/issues-helper//en-US/changelog">refer</a> to version selection</li></ul></li><li><code>issues-hepler</code> parameter<ul><li><code>actions</code>: The name of the function used, <strong>required</strong>. Support multiple, separated by commas, such as <code>create-comment,close-issue</code> means comment and close issue</li><li><code>token</code>: A person who needs to have push permission token<ul><li><a href="/issues-helper//en-US/guide/ref#-token">More view</a></li></ul></li><li><code>issue-number</code>: Incoming parameter, here means the number of the current issue. If you are confused about the writing, you can <a target="_blank" rel="noopener noreferrer" href="https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context">view<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li><code>body</code>: Incoming parameters, here means the content of the current comment</li></ul></li></ul><h3 id="3-enable-action"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/start#3-enable-action"><span class="icon,icon-link"></span></a>3. Enable Action</h3><p>When you finish writing and submit to the master branch, you can automatically enable the workflow, and the trigger conditions follow the definition of <code>on</code>.</p><p>😏 I believe that you have a general understanding of <code>how to use</code>, do you want to try it quickly?</p><p>Please check the functions you need in <a href="/issues-helper//en-US/base">Basic</a> and <a href="/issues-helper//en-US/advanced">Advanced</a> for flexible reference.</p></div><div class="__dumi-default-layout-footer-meta"><a target="_blank" rel="noopener noreferrer" href="https://github.com/actions-cool/issue-helper/edit/main/docs/guide/start.en-US.md">Edit this doc on GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a><span data-updated-text="Last update: ">2020-12-27 2:16:18</span></div></div></div></div>
<script>
window.g_useSSR = true;
window.g_initialProps = {};
</script>
<script src="/issues-helper/umi.86bc1ac5.js"></script>
</body>
</html>