Files
issues-helper/guide/note/index.html
2021-01-14 10:47:18 +08:00

33 lines
10 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"
/>
<link rel="stylesheet" href="/issues-helper/umi.34621cf3.css" />
<script>
window.routerBase = "/issues-helper/";
</script>
<script>
//! umi version: 3.3.3
</script>
<title>yml 中包含判断</title>
</head>
<body>
<div id="root"><div class="__dumi-default-layout" data-route="/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//">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//guide">指 南</a></span><span><a href="/issues-helper//base">基 础</a></span><span><a href="/issues-helper//advanced">进 阶</a></span><span><a href="/issues-helper//changelog">更新日志</a></span><span><a target="_blank" rel="noopener noreferrer" href="https://issues-helper.gitee.io">国内镜像<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><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//en-US/guide/note">English</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//"></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//guide">指 南</a></li><li><a href="/issues-helper//base">基 础</a></li><li><a href="/issues-helper//advanced">进 阶</a></li><li><a href="/issues-helper//changelog">更新日志</a></li><li><a target="_blank" rel="noopener noreferrer" href="https://issues-helper.gitee.io">国内镜像<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><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//en-US/guide/note">English</a></div></div><ul class="__dumi-default-menu-list"><li><a target="_blank" rel="noopener noreferrer">🍭 介 绍</a><ul><li><a href="/issues-helper//guide"><span>介 绍</span></a></li><li><a href="/issues-helper//guide/start"><span>快速开始</span></a></li></ul></li><li><a href="/issues-helper//guide/ref">🎁 参 考</a></li><li><a aria-current="page" class="active" href="/issues-helper//guide/note">🎗 记 录</a><ul role="slug-list"><li title="yml 中包含判断" data-depth="2"><a href="/issues-helper//guide/note#yml-中包含判断"><span>yml 中包含判断</span></a></li><li title="yml 中传值和输出" data-depth="2"><a href="/issues-helper//guide/note#yml-中传值和输出"><span>yml 中传值和输出</span></a></li><li title="GitHub Actions bot 触发" data-depth="2"><a href="/issues-helper//guide/note#github-actions-bot-触发"><span>GitHub Actions bot 触发</span></a></li><li title="assignees 范围" data-depth="2"><a href="/issues-helper//guide/note#assignees-范围"><span>assignees 范围</span></a></li></ul></li><li><a href="/issues-helper//guide/faq">💬 FAQ</a></li></ul></div></div><div class="__dumi-default-layout-content"><div class="markdown"><div class="__dumi-default-alert" type="success">这里记录自己在使用中总结的一些东西,希望可以帮助到你。</div><h2 id="yml-中包含判断"><a aria-hidden="true" tabindex="-1" href="/issues-helper//guide/note#yml-中包含判断"><span class="icon,icon-link"></span></a><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>当 issue body 不包含 <code>ie</code> 触发</li><li>测试 yml 中不支持 js <code>includes()</code> 语法</li><li>大小写不校验,<code>IE</code> 还有同时类似 <code>kiekk</code> 也可满足</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">查看<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="yml-中传值和输出"><a aria-hidden="true" tabindex="-1" href="/issues-helper//guide/note#yml-中传值和输出"><span class="icon,icon-link"></span></a><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>:不管设置 <code>true</code> 还是 <code>&#x27;ture&#x27;</code>,在程序里接收到的都是字符串格式</li></ul><p>同时输出的也是字符串格式</p><ul><li><code>check-result</code>:判断条件为 <code>if: steps.xxid.outputs.check-result == &#x27;true&#x27;</code></li></ul><h2 id="github-actions-bot-触发"><a aria-hidden="true" tabindex="-1" href="/issues-helper//guide/note#github-actions-bot-触发"><span class="icon,icon-link"></span></a><code>GitHub Actions bot</code> 触发</h2><p>当设置了一个 Actions如为给一个 issue 新增 label <code>x1</code>Actions 自动为该 issue 增加 <code>x2</code> label。</p><p>但如果这个是由 <code>GitHub Actions bot</code> 完成的(即 actions 中 token 不传,或使用默认 <code>token: $<!-- -->{<!-- -->{<!-- --> secrets.GITHUB_TOKEN <!-- -->}<!-- -->}</code>),则不会触发 label <code>x2</code> 的 Actions。</p><h2 id="assignees-范围"><a aria-hidden="true" tabindex="-1" href="/issues-helper//guide/note#assignees-范围"><span class="icon,icon-link"></span></a><code>assignees</code> 范围</h2><ul><li>仓库的所有者或协作者,若有组织,包括成员</li><li>issue 的参与者,包括创建者、评论者</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.md">在 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="最后更新时间:">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.c5fcef37.js"></script>
</body>
</html>