Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion common/globmatcher.js

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

6 changes: 5 additions & 1 deletion common/utils.js

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"@types/jest": "^27.4.0",
"@types/node": "^14.14.7",
"@types/yargs": "^15.0.4",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"chai": "^4.2.0",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -54,7 +54,7 @@
"prettier": "2.5.1",
"ts-jest": "^27.1.3",
"ts-node": "^8.10.2",
"typescript": "^4.5.2",
"typescript": "^4.7.2",
"yargs": "^15.3.1"
},
"husky": {
Expand Down
7 changes: 6 additions & 1 deletion repository-dispatch/index.js

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

14 changes: 13 additions & 1 deletion repository-dispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@ import { getInput } from '@actions/core'
class RepositoryDispatch extends Action {
id = 'RepositoryDispatch'

constructor() {
const token = getInput('token')
const eventType = getInput('event_type')
if (!token && eventType === 'oss-pull-request') {
console.log(
"Token is empty, can't dispatch event. This is expected for PRs coming from forks, please check that the changes are compatible with Enterprise before merging this PR.",
)
}

super()
}

async runAction(): Promise<void> {
const repository = getInput('repository')
if (!repository) {
throw new Error('Missing repository')
}

const api = new OctoKit(this.getToken(), context.repo)
const api = new OctoKit(this.getToken(), context.repo)

const [owner, repo] = repository.split('/')

Expand Down
Loading