Skip to content

Commit

Permalink
createIssue: add date YYYY-MM-DD to issue title
Browse files Browse the repository at this point in the history
  • Loading branch information
prestist committed Oct 26, 2023
1 parent aac969b commit 470826f
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 22 deletions.
10 changes: 5 additions & 5 deletions dist/actionItems.js

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

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

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

5 changes: 4 additions & 1 deletion dist/createIssue.js

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

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

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

8 changes: 5 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/main.js

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

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

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

5 changes: 3 additions & 2 deletions dist/meetingTopics.js

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

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

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

9 changes: 4 additions & 5 deletions src/createIssue.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import * as core from '@actions/core'
import { Octokit } from 'octokit'

export async function createThisReposIssue(
title: string,
body: string
): Promise<void> {
export async function createThisReposIssue(body: string): Promise<void> {
try {
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN
})
const title = core.getInput('issueTitle')
// calculate todays date in YYYY-MM-DD format
const today = new Date().toISOString().split('T')[0]
var title = core.getInput('issueTitle') + ' ' + today

Check failure on line 11 in src/createIssue.ts

View workflow job for this annotation

GitHub Actions / Lint Code Base

Unexpected var, use let or const instead

Check failure on line 11 in src/createIssue.ts

View workflow job for this annotation

GitHub Actions / Lint Code Base

Unexpected string concatenation
const githubRepository = process.env.GITHUB_REPOSITORY
if (!githubRepository) {
throw new Error(`GITHUB_REPOSITORY environment variable is not set`)
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function run(): Promise<void> {

const issueBody = hydrateIssueTemplate(actionItems, meetingTopics)
console.log('Create issue')
createThisReposIssue('Fedora CoreOS Weekly Meeting', issueBody)
createThisReposIssue(issueBody)
} catch (error) {
// Fail the workflow run if an error occurs
if (error instanceof Error) core.setFailed(error.message)
Expand Down

0 comments on commit 470826f

Please sign in to comment.