Skip to content

Commit

Permalink
fix: 🩹 Semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Dec 12, 2024
1 parent 652a3fb commit 2cc0240
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code Limit GitHub Action
# CodeLimit GitHub Action

<div align="center">

Expand All @@ -19,7 +19,7 @@

</div>

To run Code Limit on every push and before every merge to main, append it to
To run CodeLimit on every push and before every merge to main, append it to
your GH Action workflow:

```yaml
Expand All @@ -40,6 +40,6 @@ jobs:
- name: 'Checkout sources'
uses: actions/checkout@v4

- name: 'Run Code Limit'
- name: 'Run CodeLimit'
uses: getcodelimit/codelimit-action@v1
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Code Limit'
name: 'CodeLimit'
description: 'Your Refactoring Alarm ⏰'
branding:
icon: 'activity'
Expand Down
6 changes: 3 additions & 3 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ async function checkChangedFiles(octokit: Octokit, clBinary: string): Promise<nu
const changedFiles = await getChangedFiles(octokit);
console.log(`Number of files changed: ${changedFiles.length}`);
if (changedFiles.length === 0) {
console.log('No files changed, skipping Code Limit');
console.log('No files changed, skipping CodeLimit');
return 0;
} else {
console.log('Running Code Limit...');
console.log('Running CodeLimit...');
return await exec(clBinary, ['check'].concat(changedFiles), {ignoreReturnCode: true});
}
}

async function main() {
console.log(`Code Limit action, version: ${version.revision}`);
console.log(`CodeLimit action, version: ${version.revision}`);
let exitCode = 0;
const clBinary = await downloadCodeLimitBinary();
console.log('Scanning codebase...');
Expand Down
8 changes: 4 additions & 4 deletions src/codelimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ async function getLatestBinaryUrl() {

export async function downloadCodeLimitBinary() {
const binaryUrl = await getLatestBinaryUrl();
console.log(`Downloading Code Limit binary from URL: ${binaryUrl}`);
console.log(`Downloading CodeLimit binary from URL: ${binaryUrl}`);
const response = await nodeFetch(binaryUrl);
const filename = path.join(__dirname, getBinaryName());
await streamPipeline(response.body, fs.createWriteStream(filename));
fs.chmodSync(filename, '777');
console.log(`Code Limit binary downloaded: ${filename}`);
console.log(`CodeLimit binary downloaded: ${filename}`);
return filename;
}

Expand All @@ -48,7 +48,7 @@ export function getReportContent(): string | undefined {

function makeBadgeSvg(message: string, color: string): string {
const badge = {
label: 'Code Limit',
label: 'CodeLimit',
message: message,
color: color
};
Expand All @@ -69,4 +69,4 @@ export function getBadgeContent(reportContent: string | undefined): string {
return makeBadgeSvg('Passed', 'brightgreen');
}
}
}
}
4 changes: 2 additions & 2 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function createOrUpdateFile(octokit: Octokit, owner: string, repo:
repo: repo,
path: path,
sha: sha,
message: `Update by Code Limit`,
message: `Update by CodeLimit`,
branch: branchName,
content: Buffer.from(content).toString('base64'),
committer: {
Expand Down Expand Up @@ -140,4 +140,4 @@ export async function createBranchIfNotExists(octokit: Octokit, owner: string, r
} else {
console.log(`Branch ${branchName} already exists`);
}
}
}

0 comments on commit 2cc0240

Please sign in to comment.