WIP, add user remap
This commit is contained in:
parent
a674d4f082
commit
5f36417a82
@ -7,3 +7,4 @@ Automation tool to reduce pain while taking CGT365
|
||||
- Tips on [managing API tokens](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/)
|
||||
- [PatternPacker](https://git.alanocull.com/alan/pattern-packer/src/branch/master/src/server/server.ts) uses some basic express hosting
|
||||
- Jira REST API docs for [issues](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues)
|
||||
- Gitea REST API [docs](https://git.alanocull.com/api/swagger)
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"gitea": "https://git.alanocull.com",
|
||||
"port": 3001
|
||||
}
|
9
config/user_remap.json
Normal file
9
config/user_remap.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"alan": "arocull@purdue.edu",
|
||||
"Will": "montgow@purdue.edu",
|
||||
"connor": "celswort@purdue.edu",
|
||||
"shelby": "shockada@purdue.edu",
|
||||
"tommy": "thochste@purdue.edu",
|
||||
"matt": "mcschule@purdue.edu",
|
||||
"patrick": "ryan227@purdue.edu"
|
||||
}
|
18
src/index.js
18
src/index.js
@ -9,14 +9,32 @@ const CONFIG = JSON.parse(fs.readFileSync(`${CONFIG_DIRECTORY}server.json`, 'utf
|
||||
const SECRETS = JSON.parse(fs.readFileSync(`${CONFIG_DIRECTORY}secrets.json`, 'utf-8'));
|
||||
const PORT = CONFIG['port'];
|
||||
|
||||
// BUILD OAUTH
|
||||
const OAUTH_JIRA = `${SECRETS['jira-email']}:${SECRETS['jira-token']}`;
|
||||
const OAUTH_GITEA = `token ${SECRETS['gitea-token']}`;
|
||||
|
||||
const URL_GITEA = `${CONFIG['gitea']}/api`;
|
||||
|
||||
// INITIALIZE EXPRESS
|
||||
const app = express();
|
||||
|
||||
|
||||
|
||||
// FUNCTIONALITY
|
||||
|
||||
|
||||
|
||||
// SET UP WEBHOOKS
|
||||
app.get('/', (req, res) => {
|
||||
console.log("Got request ", req.url);
|
||||
res.send({'data':'nice'});
|
||||
})
|
||||
|
||||
// HOST
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on localhost:${PORT}, working in ${CONFIG_DIRECTORY}`)
|
||||
});
|
||||
|
||||
app.post(`${URL_GITEA}/repos/triple-aaa-games/hook-line-axe/issues`, (req, res) => {
|
||||
console.log(req.body);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user