Skip to content

Commit

Permalink
feat: Add Notion ID prefix to PR (#35)
Browse files Browse the repository at this point in the history
* Init

* adding idempotency to the logic

* adding binary

* refactoring

* adding binary

* adding tests and bumping up version

* feat: adding branch name as prefix to to PR title

* adding binary

* Update test.yml
  • Loading branch information
subhroacharjee authored Jun 5, 2023
1 parent dcdcbd0 commit 166bb7c
Show file tree
Hide file tree
Showing 13 changed files with 4,378 additions and 12,556 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- run: npm ci
- run: npm run all
test: # make sure the action works on a clean machine without building
if: startsWith(github.event.pull_request.head.ref, 'TUT-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
14 changes: 5 additions & 9 deletions __tests__/github.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import {getAttachedIssues} from '../src/core/github'
import {expect, test} from '@jest/globals'
import Github from '../src/core/github'

test('throws invalid action', async () => {
const input: any = {
owner: 'MathGaps',
name: 'notion-issue-sync',
pr: 11
}

await expect(getAttachedIssues('invalid token', input)).rejects.toThrow()
test('Github class test', function () {
expect(() => {
new Github('invalid token', '{"wrong": "input"}')
}).toThrowError()
})
19 changes: 0 additions & 19 deletions __tests__/webhook_state.test.ts

This file was deleted.

3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Notion Issue Sync
description: Invokes a provided Make web-hook for syncing the state of an issue linked to the active PR
inputs:
webhook:
required: true
description: 'Integrations web-hook URL'
token:
required: true
description: 'Read-scoped GitHub token'
Expand Down
Loading

0 comments on commit 166bb7c

Please sign in to comment.