Skip to content

Commit

Permalink
Merge pull request #21 from novuhq/remove-discover
Browse files Browse the repository at this point in the history
feat: remove discover on sync - Do not merge
  • Loading branch information
scopsy authored Jun 20, 2024
2 parents bf3455b + 8b982bc commit 9773042
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,3 @@ jobs:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
id: test-action
uses: ./
with:
milliseconds: 2000

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
12 changes: 1 addition & 11 deletions dist/index.js

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

13 changes: 1 addition & 12 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as core from '@actions/core'
import axios from 'axios'
import { createHmac } from 'crypto'

/**
* The main function for the action.
Expand Down Expand Up @@ -39,20 +38,10 @@ export async function syncState(
novuApiKey: string,
apiUrl: string
): Promise<object> {
const timestamp = Date.now()
const discover = await axios.get(`${bridgeUrl}?action=discover`, {
headers: {
'x-novu-signature': `t=${timestamp},v1=${createHmac('sha256', novuApiKey)
.update(`${timestamp}.${JSON.stringify({})}`)
.digest('hex')}`
}
})

const sync = await axios.post(
`${apiUrl}/v1/bridge/sync?source=githubAction`,
{
bridgeUrl,
workflows: discover.data.workflows
bridgeUrl
},
{
headers: {
Expand Down

0 comments on commit 9773042

Please sign in to comment.