Open
Conversation
Open
hustcc
reviewed
Jul 13, 2017
webhookit/parser.py
Outdated
|
|
||
| # event name | ||
| def get_event_name(request): | ||
| return request.headers.get('X-GitHub-Event') |
Owner
There was a problem hiding this comment.
希望能够兼容 github、gitlab、gitosc 三个 git 服务,具体额 json 结构在这里都可以看得到。
https://github.com/hustcc/webhookit/tree/master/tests/webhookdata
Author
There was a problem hiding this comment.
gitosc的没有找到对应的头信息,所以从hook_data读取了hook_name。
另外几个站点都使用了头信息里面的X-**-Event的值
hustcc
reviewed
Sep 27, 2017
| cnt = 0 | ||
| for s in servers: | ||
| # 遍历执行 | ||
| s['SCRIPT'] = s.get('SCRIPT').format(**params) |
Owner
There was a problem hiding this comment.
另外这里可能有一个值引用修改的问题:
s['SCRIPT'] = s.get('SCRIPT').format(**params)直接修改了原始配置中的 script 值,后面每次执行都会追加参数进去,这个你也可以再确认一下!
Owner
|
不好意思,这段时间一忙就忘记了,我又 review 了一下你的代码!可能存在 bug,你再确认一下~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.