🎉 First off, thanks for taking the time to contribute! 🎉
The following is a set of guidelines for contributing to Translate Readme Action. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
This project and everyone participating in it are governed by the Code of Conduct. By participating, you are expected to uphold this code.
It's quick and goes a long way! 🌠
When you are creating a bug report, please include as many details as possible.
Bugs are tracked as GitHub issues.
Explain the problem and include additional details to help maintainers reproduce the problem:
- Use a clear and descriptive title for the issue to identify the problem.
- Describe the exact steps which reproduce the problem in as many details as possible. Don't just say what you did, but explain how you did it.
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
- Explain which behavior you expected to see instead and why.
When you are creating an enhancement suggestion, please include as many details as possible including the steps that you imagine you would take if the feature you're requesting existed.
Enhancement suggestions are tracked as GitHub issues.
Create an issue on that repository and provide the following information:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Explain why this enhancement would be useful to most Crowdin Contributors Action users.
Unsure where to begin contributing to Translate Readme Action? You can start by looking through these good-first-issue
and help-wanted
issues:
- Good first issue - issues which should only require a small amount of code, and a test or two.
- Help wanted - issues which should be a bit more involved than
Good first issue
issues.
Before sending your pull requests, make sure you followed the list below:
- Read these guidelines.
- Read Code of Conduct.
- Ensure that your code adheres to standard conventions, as used in the rest of the project.
- Ensure that your changes are well tested.
- Ensure that your changes is covered by Unit tests.
First, you'll need to have a reasonably modern version of
node
handy. This won't work with versions older than 9, for instance.
Install the dependencies:
$ npm install
Build the typescript and package it for distribution:
$ npm run build && npm run package
Run the tests ✔️
$ npm test
PASS ./index.test.js
✓ throws invalid number (3ms)
✓ wait 500 ms (504ms)
✓ test runs (95ms)
...
The action.yml
defines the inputs and output for your action.
Update the action.yml
with your name, description, inputs and outputs for your action.
See the documentation
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
import * as core from '@actions/core';
async function run() {
try {
// ...
}
catch (error) {
core.setFailed(error.message);
}
}
run();
See the toolkit documentation for the various packages.
You can now validate the action by referencing ./
in a workflow in your repo (see test.yml)
uses: ./
with:
file: README.md
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
See the actions tab for runs of this action! 🚀