Skip to content

Commit

Permalink
fix: 改行コードを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
hulk510 committed Aug 25, 2024
1 parent 89f2a95 commit 07d21e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ import { App, Octokit } from 'octokit'
dotenv.config()

// Set configured values
const privateKey = process.env.PRIVATE_KEY
const appId = process.env.APP_ID
const privateKey = process.env.PRIVATE_KEY.replace(/\\n/g, '\n')
console.log(`Private Key: ${privateKey.slice(0, 30)}...`)
const secret = process.env.WEBHOOK_SECRET
const enterpriseHostname = process.env.ENTERPRISE_HOSTNAME
const messageForNewPRs = fs.readFileSync('./message.md', 'utf8')

// Create an authenticated Octokit client authenticated as a GitHub App
const app = new App({
// appId,
// privateKey,
// webhooks: {
// secret
// },
appId,
privateKey,
webhooks: {
secret
},
...(enterpriseHostname && {
Octokit: Octokit.defaults({
baseUrl: `https://${enterpriseHostname}/api/v3`
Expand Down

0 comments on commit 07d21e3

Please sign in to comment.