Thank you for your interest in contributing to COSMOS! We welcome contributions and appreciate your help in making this project better. Please follow the guidelines below to ensure a smooth contribution process.
- GitHub CLI (
gh
): Make sure you have the GitHub CLI installed. If not, you can install it from GitHub CLI installation page.
-
Navigate to Your Repository:
$ cd path/to/your/repository
-
Create an Issue: Use the
gh issue create
command to create a new issue.$ gh issue create --title "Issue Title" --body "Description of the issue"
After running this command, you’ll get an issue number in the output. Note this number as it will be used to create a branch.
-
Create a Branch: Use the
gh
CLI to create a branch associated with the issue. Thegh
CLI can automatically create a branch for you based on the issue number. In this case, the<issue_number>
is 989.$ gh issue develop -c 989 github.com/NASA-IMPACT/COSMOS/tree/989-make-coding-syntax-consistent From https://github.com/NASA-IMPACT/COSMOS * [new branch] 989-make-coding-syntax-consistent -> origin/989-make-coding-syntax-consistent
This command creates a new branch named
<issue_number>-issue
and switches to it. This branch will be used to work on the issue. -
Make Your Changes and Push: Edit files, add code, or make any changes needed to address the issue. Commit your changes and push the branch to the remote repository.
git add . git commit -m "Fixes issue #<issue_number>" git push origin <issue_number>-issue
-
Create the Pull Request: After pushing the branch, create a pull request using the
gh pr create
command:gh pr create --base dev --head <issue_number>-issue --title "Title of the Pull Request" --body "Description of the changes"
-base
: The base branch you want to merge your changes into (dev
in our case)-head
: The branch that contains your changes (e.g.,<issue_number>-issue
).-title
: The title of the pull request.-body
: The description or body of the pull request.
This command will create a pull request from your branch into the base branch specified.
-
Review and Merge: Once the pull request is created, we will review it on GitHub and merge it if everything looks good. If any changes are required, we might ask you to make adjustments before the merge.