Skip to content

Commit

Permalink
Merge branch 'development' into dependabot/npm_and_yarn/client/semver…
Browse files Browse the repository at this point in the history
…-5.7.2
  • Loading branch information
trillium authored Dec 7, 2023
2 parents 52cc802 + dd21257 commit 9b76c23
Show file tree
Hide file tree
Showing 42 changed files with 1,407 additions and 601 deletions.
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Bug Report'
description: 'Bug report HackforLA issue form.'

body:
- type: textarea
id: description
attributes:
label: Describe the Bug
description: Clearly state the bug
validations:
required: true
- type: dropdown
id: feature
attributes:
label: Feature
description: Select a feature related to the bug
options:
- AWS
- Brand
- Login
- Users
- Agenda
- Check in
- Database
- Dashboard
- Marketing
- Onboarding
- Repo Update
- Documentation
- GitHub Actions
- GitHub Hygiene
- Infrastructure
- Package Update
- ESLint Warnings
- Form validation
- Recurring Events
- Project Management
- Account Setup Automation
- Meeting Time Change Ticket
- Add/Remove PM access
validations:
required: true
- type: textarea
id: replicate
attributes:
label: How to Replicate
description: Clearly state how to replicate the bug
validations:
required: true
- type: dropdown
id: notification
attributes:
label: Request notification after bug squashing
description: Request notification after a bug is squashed
options:
- Yes
- No
validations:
required: true
- type: textarea
id: resource
attributes:
label: Resources/Information
description: Include any important resources/information
4 changes: 2 additions & 2 deletions .github/workflows/New-issue-create-card.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create or Update Project Card
uses: peter-evans/create-or-update-project-card@v1
uses: peter-evans/create-or-update-project-card@v2
with:
project-name: VRMS v0.4
project-name: VRMS - Active Project Board
column-name: New Issue Approval
2 changes: 1 addition & 1 deletion .github/workflows/aws-backend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Init Docker Cache
uses: satackey/action-docker-layer-caching@v0.0.11
uses: jpribyl/action-docker-layer-caching@v0.1.0
with:
key: ${{ github.workflow }}-2-{hash}
restore-keys: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aws-frontend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Init Docker Cache
uses: satackey/action-docker-layer-caching@v0.0.11
uses: jpribyl/action-docker-layer-caching@v0.1.0
with:
key: ${{ github.workflow }}-2-{hash}
restore-keys: |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/waiting-to-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Waiting to Merge

on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]

jobs:
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'waiting to merge') }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'waiting to merge'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1
2 changes: 1 addition & 1 deletion backend/middleware/user.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function isAdminByEmail(req, res, next) {
return res.sendStatus(400);
} else {
const role = user.accessLevel;
if (req.get('origin').includes('3001') || role === 'admin' || user.managedProjects.length > 0) {
if (role === 'admin' || user.managedProjects.length > 0) {
next();
} else {
next(res.sendStatus(401));
Expand Down
16 changes: 8 additions & 8 deletions backend/models/project.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Idea for the future: programmingLanguages, numberGithubContributions (pull these
*/

const projectSchema = mongoose.Schema({
name: { type: String },
description: { type: String },
githubIdentifier: { type: String },
name: { type: String, trim: true },
description: { type: String, trim: true },
githubIdentifier: { type: String, trim: true },
projectStatus: { type: String }, // Active, Completed, or Paused
location: { type: String }, // DTLA, Westside, South LA, or Remote (hacknight)
location: { type: String, trim: true }, // DTLA, Westside, South LA, or Remote (hacknight)
//teamMembers: { type: String }, // commented since we should be able to get this from Project Team Members table
createdDate: { type: Date, default: Date.now }, // date/time project was created
completedDate: { type: Date }, // only if Status = Completed, date/time completed
githubUrl: { type: String }, // link to main repo
slackUrl: { type: String }, // link to Slack channel
googleDriveUrl: { type: String },
githubUrl: { type: String, trim: true }, // link to main repo
slackUrl: { type: String, trim: true }, // link to Slack channel
googleDriveUrl: { type: String, trim: true },
googleDriveId: { type: String },
hflaWebsiteUrl: { type: String },
hflaWebsiteUrl: { type: String, trim: true },
videoConferenceLink: { type: String },
lookingDescription: { type: String }, // narrative on what the project is looking for
recruitingCategories: [{ type: String }], // same as global Skills picklist
Expand Down
6 changes: 4 additions & 2 deletions backend/models/user.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ const userSchema = mongoose.Schema({
isHflaGithubMember: { type: Boolean }, // pull from API once github handle in place?
githubPublic2FA: { type: Boolean }, // does the user have 2FA enabled on their github and membership set to public?
availability: { type: String }, // availability to meet outside of hacknight times; string for now, more structured in future
managedProjects: [{ type: String}] // Which projects managed by user.
managedProjects: [{ type: String}], // Which projects managed by user.
//currentProject: { type: String } // no longer need this as we can get it from Project Team Member table
// password: { type: String, required: true }
isActive: { type: Boolean, default: true }
});

userSchema.methods.serialize = function () {
Expand Down Expand Up @@ -65,7 +66,8 @@ userSchema.methods.serialize = function () {
isHflaGithubMember: this.isHflaGithubMember,
githubPublic2FA: this.githubPublic2FA,
availability: this.availability,
managedProjects: this.managedProjects
managedProjects: this.managedProjects,
isActive: this.isActive
};
};

Expand Down
7 changes: 5 additions & 2 deletions backend/routers/projects.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ const express = require("express");
const router = express.Router();

const { ProjectController } = require('../controllers');
const { AuthUtil } = require("../middleware");

// The base is /api/projects
router.get('/', ProjectController.project_list);

router.post('/', ProjectController.create);
router.post('/', AuthUtil.verifyCookie, ProjectController.create);

router.get('/:ProjectId', ProjectController.project_by_id);

router.patch('/:ProjectId', ProjectController.update);
router.put('/:ProjectId', AuthUtil.verifyCookie, ProjectController.update);

router.patch('/:ProjectId', AuthUtil.verifyCookie, ProjectController.update);


module.exports = router;
Loading

0 comments on commit 9b76c23

Please sign in to comment.