Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Globalfun32y439y54 authored Dec 17, 2024
1 parent 0420a27 commit d1f3a7a
Show file tree
Hide file tree
Showing 3 changed files with 290 additions and 7 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const { execSync } = require('child_process');
execSync('npm install @actions/core', { stdio: 'inherit' });
const core = require('@actions/core');
const github = require('@actions/github');
const fs = require('fs');
const path = require('path');

// Replace with your Crowdin API token and project ID
const CROWDIN_API_TOKEN = core.getInput('token');
const PROJECT_ID = core.getInput('project_id');
const CROWDIN_API_TOKEN = core.getInput('token', { required: true });
const PROJECT_ID = core.getInput('project_id', { required: true });

// Base API URL for Crowdin
const CROWDIN_API_URL = `https://api.crowdin.com/api/v2/projects/${PROJECT_ID}/languages/progress`;
Expand Down Expand Up @@ -131,4 +130,4 @@ async function main() {
}

// Execute the script
main();
main();
284 changes: 284 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "badge-creator",
"version": "1.0.5",
"version": "1.0.6",
"description": "This action allows you to make a badge that shows the translation progress of your Crowdin project",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@actions/core": "^1.11.1",
"node-fetch": "^3.3.1"
"@actions/github": "^6.0.0"
}
}

0 comments on commit d1f3a7a

Please sign in to comment.