Skip to content

Commit

Permalink
Removing encoding dependency (#112)
Browse files Browse the repository at this point in the history
* testing output log

* Multiline

* removing encoding dependencies
  • Loading branch information
mamuso authored Aug 5, 2023
1 parent 0b9af59 commit 57c540f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 276 deletions.
230 changes: 2 additions & 228 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

23 changes: 0 additions & 23 deletions dist/licenses.txt

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

18 changes: 1 addition & 17 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@octokit/graphql": "^5.0.4",
"@vercel/ncc": "^0.36.0",
"html-entities": "^2.4"
"@vercel/ncc": "^0.36.0"
},
"devDependencies": {
"@types/jest": "^29.2.1",
Expand Down
4 changes: 2 additions & 2 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class GitHub {
const query = `
mutation {
createDiscussion(input: {
repositoryId: "${repoId}", title: "${title}", body: "${body}", categoryId: "${categoryId}"
repositoryId: "${repoId}", title: "${title}", body: """${body}""", categoryId: "${categoryId}"
}) {
discussion {
number
Expand All @@ -125,7 +125,7 @@ export default class GitHub {
const query = `
mutation {
addDiscussionComment(input: {
discussionId: "${discussionId}", body: "${body}"
discussionId: "${discussionId}", body: """${body}"""
}) {
comment {
id
Expand Down
3 changes: 0 additions & 3 deletions src/weekly-update.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as core from '@actions/core'
import * as fs from 'fs'
import {encode} from 'html-entities'
import GitHub from './github'
import DefaultConfig from './config'
import type {config} from './types'
Expand Down Expand Up @@ -65,7 +64,6 @@ export default class WeeklyUpdate {
'{{shortdate}}',
shortPostOnDateStr
)
this.postTemplate = encode(this.postTemplate, {mode: 'nonAsciiPrintableOnly', level: 'xml'})
this.remindTemplate = this.readTemplateFile(this.config.remind_template)?.replace(
'{{date}}',
shortPreviousPostOnDateStr
Expand All @@ -74,7 +72,6 @@ export default class WeeklyUpdate {
'{{shortdate}}',
shortPreviousPostOnDateStr
)
this.remindTemplate = encode(this.remindTemplate, {mode: 'nonAsciiPrintableOnly', level: 'xml'})

/**
* Determine the route that the action needs to take based on the day of the week and the configuration. The route will be one of the following:
Expand Down

0 comments on commit 57c540f

Please sign in to comment.