Files
issues-helper/en-US/guide/note/index.html
2021-01-18 10:29:50 +08:00

33 lines
9.6 KiB
HTML

<!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"
/>
<link rel="stylesheet" href="/issues-helper/umi.303f3de1.css" />
<script>
window.routerBase = "/issues-helper/";
</script>
<script>
//! umi version: 3.3.3
</script>
<title>Include judgment in yml</title>
</head>
<body>
<div id="root"><div class="__dumi-default-layout" data-route="/en-US/guide/note" data-show-sidemenu="true" data-show-slugs="false" 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/note">中文</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/note">中文</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 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 aria-current="page" class="active" href="/issues-helper//en-US/guide/note">🎗 Note</a><ul role="slug-list"><li title="Include judgment in yml" data-depth="2"><a href="/issues-helper//en-US/guide/note#include-judgment-in-yml"><span>Include judgment in yml</span></a></li><li title="Pass value and output in yml" data-depth="2"><a href="/issues-helper//en-US/guide/note#pass-value-and-output-in-yml"><span>Pass value and output in yml</span></a></li><li title="GitHub Actions bot trigger" data-depth="2"><a href="/issues-helper//en-US/guide/note#github-actions-bot-trigger"><span>GitHub Actions bot trigger</span></a></li><li title="assignees scope" data-depth="2"><a href="/issues-helper//en-US/guide/note#assignees-scope"><span>assignees scope</span></a></li></ul></li><li><a href="/issues-helper//en-US/guide/faq">💬 FAQ</a></li></ul></div></div><div class="__dumi-default-layout-content"><div class="markdown"><div class="__dumi-default-alert" type="success">Here are some things I summarized in my use, I hope it can help you.</div><h2 id="include-judgment-in-yml"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/note#include-judgment-in-yml"><span class="icon,icon-link"></span></a>Include judgment in <code>yml</code></h2><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">if</span><span class="token punctuation">:</span><span class="token plain"> contains(github.event.issue.body</span><span class="token punctuation">,</span><span class="token plain"> &#x27;ie&#x27;) == false</span></div><div class="token-line"><span class="token plain"></span></div></pre></div><ul><li>Triggered when the issue body does not contain <code>ie</code></li><li>The js <code>includes()</code> syntax is not supported in the yml</li><li>Case is not checked, <code>IE</code> and also similar to <code>kiekk</code> can also be satisfied</li></ul><p><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#functions">More<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>.</p><h2 id="pass-value-and-output-in-yml"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/note#pass-value-and-output-in-yml"><span class="icon,icon-link"></span></a>Pass value and output in <code>yml</code></h2><div class="__dumi-default-code-block"><pre class="prism-code language-unknown"><button class="__dumi-default-icon __dumi-default-code-block-copy-btn" data-status="ready"></button><div class="token-line"><span class="token plain">with:</span></div><div class="token-line"><span class="token plain"> actions: &#x27;month-statistics&#x27;</span></div><div class="token-line"><span class="token plain"> token: ${{ secrets.GITHUB_TOKEN }}</span></div><div class="token-line"><span class="token plain"> count-lables: &#x27;true&#x27;</span></div><div class="token-line"><span class="token plain"></span></div></pre></div><ul><li><code>count-lables</code>: Regardless of setting <code>true</code> or <code>&#x27;ture&#x27;</code>, all received in the program is in string format</li></ul><p>At the same time, the output is also in string format</p><ul><li><code>check-result</code>: The judgment condition is <code>if: steps.xxid.outputs.check-result ==&#x27;true&#x27;</code></li></ul><h2 id="github-actions-bot-trigger"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/note#github-actions-bot-trigger"><span class="icon,icon-link"></span></a><code>GitHub Actions bot</code> trigger</h2><p>When an action is set, such as adding a label <code>x1</code> to an issue, Actions will automatically add a label <code>x2</code> to the issue.</p><p>But if this is done by <code>GitHub Actions bot</code> (that is, the token in the actions is not passed, or the default <code>token: $<!-- -->{<!-- -->{<!-- --> secrets.GITHUB_TOKEN <!-- -->}<!-- -->}</code> is used), the actions of label <code>x2</code> will not be triggered.</p><h2 id="assignees-scope"><a aria-hidden="true" tabindex="-1" href="/issues-helper//en-US/guide/note#assignees-scope"><span class="icon,icon-link"></span></a><code>assignees</code> scope</h2><ul><li>The owner or collaborator of the warehouse, if there is an organization, including members</li><li>Participants of the issue, including creators and commenters</li></ul></div><div class="__dumi-default-layout-footer-meta"><a target="_blank" rel="noopener noreferrer" href="https://github.com/actions-cool/issues-helper/edit/main/docs/guide/note.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: ">2021/1/11 21:32:00</span></div></div></div></div>
<script>
window.g_useSSR = true;
window.g_initialProps = {};
</script>
<script src="/issues-helper/umi.9dde246b.js"></script>
</body>
</html>