如何使用Github操作调用Webhooks并通过PR统治互联网

Github Actions are a new feature from everyone's favorite code tool. While they take a little getting used to, they are very powerful tools for CI (continuous integration) and other checks on your pull requests.

Github Actions是每个人都喜欢的代码工具的新功能。 尽管它们已经习惯了一些,但它们是用于CI(连续集成)和对拉取请求进行其他检查的功能非常强大的工具。

Here, I'll talk about how to use Github Actions for calling webhooks. And as you know, once you can call a webhook, the internet is your oyster.

在这里,我将讨论如何使用Github Actions调用webhook。 如您所知,一旦您可以呼叫网络钩子,互联网就是您的牡蛎。

为什么不使用旧的网络钩子? (Why not the old webhooks?)

Now, you may be saying: "Github already has webhooks, why bother with actions?" The answer is simple: version control.

现在,您可能会说:“ Github已经存在Webhooks,为什么还要烦恼操作?” 答案很简单: 版本控制

If you work with anyone else on your code base, you want to be able to track how changes to configuration have come about, and who is responsible.

如果您与代码库中的其他任何人一起工作,则希望能够跟踪如何进行配置更改以及由谁负责。

With basic Github settings, you don't know these things - someone sets and configures a webhook. Maybe it fails one day, then what?

使用基本的Github设置,您将不知道这些事情-有人设置并配置了一个Webhook。 也许有一天失败了,那又如何呢?

With Github Actions, you don't have to leave your text editor to see what happens when you push your code.

使用Github Actions,您不必离开文本编辑器即可查看在推送代码时会发生什么。

The other reason is that there is a world of things you can do from Github Actions, and some ideas are below. I needed webhooks for a recent project, but there are features for running tests, gathering code coverage, linting, and more.

另一个原因是,您可以通过Github Actions做很多事情,下面是一些想法。 对于最近的项目,我需要使用webhooks,但是有一些功能可用于运行测试,收集代码覆盖范围,整理文件等。

Seeing as so many of us use Github every day, it can't hurt to get familiar with this new tool.

看到我们每天都有如此多的人使用Github,熟悉这个新工具不会有什么坏处。

你的第一个动作 (Your first action)

So, let's get started. The first thing you need to do i

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值