mirror of
https://github.com/KieSun/all-of-frontend.git
synced 2024-11-22 06:48:13 +08:00
chore: action
This commit is contained in:
parent
45b0967015
commit
bbb46d851e
4
.github/workflows/comment.yml
vendored
4
.github/workflows/comment.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
||||||
ISSUEHOST: ${{ secrets.ISSUEHOST }}
|
COMMENTHOST: ${{ secrets.COMMENTHOST }}
|
||||||
run: |
|
run: |
|
||||||
yarn
|
yarn
|
||||||
node ./script/issue.js
|
node ./script/comment.js
|
||||||
|
@ -1,24 +1,23 @@
|
|||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
const {
|
const {
|
||||||
event: { issue, action },
|
event: { comment },
|
||||||
} = JSON.parse(process.env.GITHUB_CONTEXT);
|
} = JSON.parse(process.env.GITHUB_CONTEXT);
|
||||||
const { author_association, body, title, number } = issue;
|
const {
|
||||||
const host = process.env.ISSUEHOST;
|
body,
|
||||||
|
updated_at,
|
||||||
|
html_url,
|
||||||
|
id,
|
||||||
|
user: { avatar_url, login },
|
||||||
|
issue: { number },
|
||||||
|
} = comment;
|
||||||
|
const host = process.env.COMMENTHOST;
|
||||||
|
|
||||||
console.log(JSON.parse(process.env.GITHUB_CONTEXT););
|
axios.post(host, {
|
||||||
|
issueId: number,
|
||||||
// if (author_association === "OWNER") {
|
commentId: id,
|
||||||
// if (action === "edited") {
|
htmlUrl: html_url,
|
||||||
// axios.put(host, {
|
userName: login,
|
||||||
// name: title,
|
avatarUrl: avatar_url,
|
||||||
// issueId: number,
|
content: body,
|
||||||
// content: body,
|
updatedAt: updated_at,
|
||||||
// });
|
});
|
||||||
// } else if (action === "opened") {
|
|
||||||
// axios.post(host, {
|
|
||||||
// name: title,
|
|
||||||
// issueId: number,
|
|
||||||
// content: body,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user