Skip to content

Commit

Permalink
chore: 修改注释/发布脚本等
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Feb 27, 2021
1 parent 071fb8b commit 51af58f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 40 deletions.
Empty file removed .env
Empty file.
33 changes: 0 additions & 33 deletions .github/workflows/auto-merge.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/release.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: yarn
- run: npm run lint
- run: npm run build
# - env:
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npm run release
- env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 CaoMeiYouRen(草梅友仁)
Copyright (c) 2021 CaoMeiYouRen(草梅友仁)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
27 changes: 25 additions & 2 deletions src/push/dingtalk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ import { Message } from './dingtalk/index'
const Debugger = debug('push:dingtalk')

class RobotOption {
/**
* 即 access_token
*
*/
accessToken?: string
/**
* 加签安全秘钥(HmacSHA256)
*
*/
secret?: string
}

/**
* 在 [dingtalk-robot-sdk](https://github.com/ineo6/dingtalk-robot-sdk) 的基础上重构了一下,用法几乎完全一致。
* 参考文档 [钉钉开放平台 - 自定义机器人接入](https://developers.dingtalk.com/document/app/custom-robot-access)
*
* @author CaoMeiYouRen
* @date 2021-02-27
* @export
* @class Dingtalk
*/
export class Dingtalk implements Send {
private accessToken?: string
private secret?: string
Expand All @@ -35,7 +51,14 @@ export class Dingtalk implements Send {
}
return signStr
}

/**
*
*
* @author CaoMeiYouRen
* @date 2021-02-27
* @param message
* @returns
*/
public async send(message: Message): Promise<AxiosResponse<any>> {
const timestamp = Date.now()
const sign = this.getSign(timestamp)
Expand Down

0 comments on commit 51af58f

Please sign in to comment.