Files
issues-helper/docs/guide/note.md
2021-01-08 11:09:23 +08:00

1.2 KiB
Raw Blame History

toc
toc
menu
这里记录自己在使用中总结的一些东西,希望可以帮助到你。

yml 中包含判断

if: contains(github.event.issue.body, 'ie') == false
  • 当 issue body 不包含 ie 触发
  • 测试 yml 中不支持 js includes() 语法
  • 大小写不校验,IE 还有同时类似 kiekk 也可满足

更多查看

yml 中传值和输出

with:
  actions: 'month-statistics'
  token: ${{ secrets.GITHUB_TOKEN }}
  count-lables: 'true'
  • count-lables:不管设置 true 还是 'ture',在程序里接收到的都是字符串格式

同时输出的也是字符串格式

  • check-result:判断条件为 if: steps.xxid.outputs.check-result == 'true'

GitHub Actions bot 触发

当设置了一个 Actions如为给一个 issue 新增 label x1Actions 自动为该 issue 增加 x2 label。

但如果这个是由 GitHub Actions bot 完成的(即 actions 中 token 不传,或使用默认 token: ${{ secrets.GITHUB_TOKEN }}),则不会触发 label x2 的 Actions。