Skip to content

Commit

Permalink
feat: 레포 오너 변경사항 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
amaran-th committed Nov 8, 2023
1 parent 5ae9849 commit ee2c720
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions every_week_posting_challenge/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports.getDiscussions = async function getDiscussions() {
return await graphql(
`
{
repository(owner: "amaran-th", name: "every-week-posting-challenge") {
repository(owner: "BDD-CLUB", name: "every-week-posting-challenge") {
discussions(first: 100) {
totalCount
edges {
Expand Down Expand Up @@ -43,7 +43,7 @@ exports.getNotifyDiscussions = async function getNotifyDiscussions() {
return await graphql(
`
{
repository(owner: "amaran-th", name: "every-week-posting-challenge") {
repository(owner: "BDD-CLUB", name: "every-week-posting-challenge") {
discussions(first: 100, categoryId: "DIC_kwDOJjgAhs4CWp1V") {
totalCount
}
Expand Down
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions test/test_graphql.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const { graphql } = require('@octokit/graphql')
require('dotenv/config')

async function repo() {
const mytoken = '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'
const mytoken = `${process.env.GITHUB_TOKEN}`
const { repository, viewer } = await graphql(
/* 아래는 요청할 쿼리가 들어가는 영역 */
`
{
repository(owner: "amaran-th", name: "every-week-posting-challenge") {
repository(owner: "BDD-CLUB", name: "every-week-posting-challenge") {
discussions(first: 10) {
totalCount
edges {
Expand All @@ -19,8 +20,14 @@ async function repo() {
login
avatarUrl
}
category {
id
name
}
}
}
}
}
viewer {
Expand All @@ -36,9 +43,10 @@ async function repo() {
)
console.log(
repository.discussions.totalCount,
repository.discussions.edges,
repository.discussions.edges.map(edge => edge.node.category),
viewer
)
console.log(process.env)
return { repository, viewer }
}

Expand Down

0 comments on commit ee2c720

Please sign in to comment.