Skip to content

Commit

Permalink
chore: change to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
LironEr committed Aug 16, 2024
1 parent 4830e0a commit 4bfc6b0
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build web

on:
push:
branches: [master, release/*, next]
branches: [main, release/*, next]
pull_request:
types: [synchronize, opened, reopened]

Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}

- name: Deploy
if: ${{ github.ref_name == 'master' }}
if: ${{ github.ref_name == 'main' }}
working-directory: ./apps/website
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: checks

on:
push:
branches: [master, release/*, next]
branches: [main, release/*, next]
pull_request:
types: [synchronize, opened, reopened]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 'CodeQL'

on:
push:
branches: [master, release/*, next]
branches: [main, release/*, next]
pull_request:
branches: [master, release/*, next]
branches: [main, release/*, next]
schedule:
- cron: '45 12 * * 4'

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ BundleMon helps you achieve that by constantly monitoring your bundle size on ev
- Set max increase allowed in percentage from base branch, will fail build if exceeded
- Supports multiple CI
- Integrates with Github, can post build status & comment with detailed information
- History report - [example](https://app.bundlemon.dev/projects/60a928cfc1ab380009f5cc0b/reports?branch=master&resolution=days)
- History report - [example](https://app.bundlemon.dev/projects/60a928cfc1ab380009f5cc0b/reports?branch=main&resolution=days)

## Guides

Expand Down
43 changes: 43 additions & 0 deletions apps/service/scripts/replaceProjectBranch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Replace branch name for all records for a specific project

import { closeMongoClient } from '@/framework/mongo/client';
import { getCommitRecordsCollection } from '@/framework/mongo/commitRecords';

(async () => {
try {
const projectId = '';
const sourceBranch = '';
const targetBranch = '';

console.log(
`Are you sure you want to replace branch "${sourceBranch}" to "${targetBranch}" for project "${projectId}"? (y/n)`
);
const answer = await new Promise<string>((resolve) => {
process.stdin.on('data', (data) => {
resolve(data.toString().trim());
});
});

if (answer !== 'y') {
console.log('Abort');
process.exit(0);
}

console.log('Replacing branch...');

const commitRecordsCollection = await getCommitRecordsCollection();
const result = await commitRecordsCollection.updateMany(
{
projectId,
branch: sourceBranch,
},
{ $set: { branch: targetBranch } }
);

console.log(`records updated: ${result.modifiedCount}`);

process.exit(0);
} finally {
await closeMongoClient();
}
})();
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/website/src/pages/ReportsPage/ReportsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ReportsPage = () => {

const getCommitRecordsQuery: GetCommitRecordsQuery = {
subProject: query.get('subProject') ?? undefined,
branch: query.get('branch') || 'master',
branch: query.get('branch') || 'main',
resolution: (query.get('resolution') as CommitRecordsQueryResolution | null) || CommitRecordsQueryResolution.Days,
};

Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"useInferencePlugins": false,
"defaultBase": "master",
"defaultBase": "main",
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": true
Expand Down

0 comments on commit 4bfc6b0

Please sign in to comment.