Skip to content

Commit

Permalink
Generalize naming to be able to reuse for future campaigns without a …
Browse files Browse the repository at this point in the history
…lot of renaming
  • Loading branch information
MichaelKohler committed Jul 31, 2021
1 parent 16d10da commit 3a94224
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion index.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const debug = require('debug')('mozilla-proton-campaign-form:server');
const debug = require('debug')('campaign-form:server');
const http = require('http');
const app = require('./app');

Expand Down
2 changes: 1 addition & 1 deletion lib/formHandling.js
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('mozilla-proton-campaign-form:lib:formHandling');
const debug = require('debug')('campaign-form:lib:formHandling');
const { v4: uuidv4 } = require('uuid');
const { IncomingForm } = require('formidable');

Expand Down
2 changes: 1 addition & 1 deletion lib/githubBackend.js
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('mozilla-proton-campaign-form:lib:githubBackend');
const debug = require('debug')('campaign-form:lib:githubBackend');
const { Octokit } = require('@octokit/rest');

const { GITHUB_TOKEN, OWNER, REPO, BASE_URL } = process.env;
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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
@@ -1,8 +1,8 @@
{
"name": "mozilla-proton-campaign-form",
"name": "campaign-form",
"version": "1.0.0",
"scripts": {
"start": "DEBUG=mozilla-proton-campaign-form* node index.js"
"start": "DEBUG=campaign-form* node index.js"
},
"dependencies": {
"@octokit/rest": "^18.7.2",
Expand All @@ -14,4 +14,4 @@
"pug": "^3.0.2",
"uuid": "^8.3.2"
}
}
}
4 changes: 2 additions & 2 deletions routes/index.js
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('mozilla-proton-campaign-form:routes');
const debug = require('debug')('campaign-form:routes');
const express = require('express');
const formHandling = require('../lib/formHandling');
const githubBackend = require('../lib/githubBackend');
Expand All @@ -23,7 +23,7 @@ router.post('/create', async (req, res) => {
const issueNumber = issueInfo && issueInfo.data && issueInfo.data.number;
debug('ISSUE_CREATED_REDIRECTING_BACK', issueNumber);
res.redirect('/?success=true&submitted=true');
} catch(error) {
} catch (error) {
debug('OH_NO_COULD_NOT_CREATE', error);
res.redirect('/?success=false&submitted=true');
}
Expand Down

0 comments on commit 3a94224

Please sign in to comment.