How to create a tag on GitHub when a PR is merged?

此生再无相见时 提交于 2019-12-04 10:44:42

I can write a post-merge hook. My doubt is if that hook runs locally in my machine, remotely on GitHub, or both

It will certainly not run on GitHub (that wouldn't be safe for GitHub to run any user-provided hook).

What you can have is a Webhook on pull request: by listening to its JSON payload, you can add a tag and push it back to GitHub if the PR event indicated a merged PR.
(That is, if the action is "closed", and the merged key is "true")

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!