Skip to content

Commit

Permalink
Merge pull request #518 from chaynHQ/develop
Browse files Browse the repository at this point in the history
Merge Develop onto Main
  • Loading branch information
annarhughes authored Jul 16, 2024
2 parents 6e86e5e + d146632 commit 18608e0
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use NodeJs
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -67,4 +67,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create Pull Request
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { repo, owner } = context.repo;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/newrelic-release-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run: echo "COMMIT_REF=${{ github.ref_name }}" >> $GITHUB_ENV
# This step creates a new Change Tracking Marker
- name: New Relic Application Deployment Marker
uses: newrelic/deployment-marker-action@v2.2.0
uses: newrelic/deployment-marker-action@v2.5.0
with:
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
region: 'EU'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ We suggest starting with issues labeled `good first issue` or `complexity: begin

### Issue Limit Policies

**To ensure we give a fair opportunity to everyone, Chayn maintainers may limit the number of issues you can be assigned.** This allows us to manage our open-source contributions at a sustainble pace and ensure there are always open issues for everyone.
**To ensure we give a fair opportunity to everyone, Chayn maintainers may limit the number of issues you can be assigned.** This allows us to manage our open-source contributions at a sustainable pace and ensure there are always open issues for everyone.

- **Only 1 issue of a specific complexity level in a single repository may be assigned to a contributor at a time.** To be assigned another, you must complete or close your previous issue. For example, a contributor can have 1 beginner issue, 1 intermediate issue, and 1 complex issue open in a single repository at a time. But they cannot have 3 beginner issues open, or 2 intermediate issues open at once in a single repository.
- **Issues may be capped at any time** and for any reason, such as reserving for events like volunteer programs or Hacktoberfest.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"firebase": "^10.10.0",
"firebase-admin": "^12.0.0",
"lodash": "^4.17.21",
"newrelic": "^11.15.0",
"newrelic": "^11.17.0",
"pg": "^8.11.5",
"pg-connection-string": "^2.6.4",
"reflect-metadata": "^0.2.1",
Expand All @@ -61,7 +61,7 @@
"@golevelup/ts-jest": "^0.5.0",
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.6",
"@nestjs/testing": "^10.3.10",
"@types/date-fns": "^2.6.0",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
Expand All @@ -73,8 +73,8 @@
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"supertest": "^7.0.0",
"ts-jest": "^29.2.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
Expand Down
16 changes: 0 additions & 16 deletions src/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,6 @@ export class UserController {
return user as GetUserDto;
}

/**
* This POST endpoint deviates from REST patterns.
* Please use `getUserByFirebaseId` above which is a GET endpoint.
* Safe to delete function below from July 2024 - allowing for caches to clear
*/
@ApiBearerAuth('access-token')
@ApiOperation({
description:
'Returns user profile data with their nested partner access, partner admin, course user and session user data.',
})
@Post('/me')
@UseGuards(FirebaseAuthGuard)
async getUserProfileByFirebaseId(@Req() req: Request): Promise<GetUserDto> {
return req['user'];
}

@ApiBearerAuth()
@Delete()
@UseGuards(FirebaseAuthGuard)
Expand Down
2 changes: 1 addition & 1 deletion src/webhooks/webhooks.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const generateMockHeaders = (body) => {

const createRequestObject = (body) => {
return {
rawBody: JSON.stringify(body),
rawBody: '' + body,
setEncoding: () => {},
encoding: 'utf8',
};
Expand Down
2 changes: 0 additions & 2 deletions src/webhooks/webhooks.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ export class WebhooksController {
this.logger.error(error);
throw new HttpException(error, HttpStatus.UNAUTHORIZED);
}

req.rawBody = '' + data;
req.setEncoding('utf8');

const bodyHmac = createHmac('sha1', storyblokWebhookSecret).update(req.rawBody).digest('hex');
Expand Down
Loading

0 comments on commit 18608e0

Please sign in to comment.