Skip to content

Commit

Permalink
fix(sqs): get sqs url from ref in sls yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wyvern8 committed Nov 28, 2017
1 parent c38b051 commit bd76d66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ package:
functions:
gtmGithubHook:
handler: dist/src/serverless/gtmGithubHook/gtmGithubHook.listener
environment:
SLS_PENDING_QUEUE_URL:
Ref: PendingQueue

package:
include:
- dist/src/serverless/gtmGithubHook/**
Expand Down Expand Up @@ -139,7 +143,6 @@ resources:
MessageRetentionPeriod: 1209600
VisibilityTimeout: 7200


custom:
dotenv:
path: .env
2 changes: 1 addition & 1 deletion src/serverless/gtmGithubHook/gtmGithubHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function handleEvent(type, body) {
console.log(`new pull request: "${body.pull_request.title}" "${body.action}" by ${body.pull_request.user.login}`);

// add event body to SQS

console.log(process.env.SLS_PENDING_QUEUE_URL);

} else {
console.log(`unsupported event: type: '${type}' action: '${body.action}'`);
Expand Down

0 comments on commit bd76d66

Please sign in to comment.