Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

About

This page describes the process of submitting code to  FreeSWITCH™.

 Click here to expand Table of Contents

Forking project with Stash

  • Create a new account in JIRA.
  • Create a new issue in JIRA, describing the feature you want to develop or the problem you're trying to fix.
  • Login to Stash using your JIRA credentials: https://freeswitch.org/stash

After logging in, you'll see current projects hosted on Stash. Click on  FreeSWITCH™ project link:

You'll see a list with all repositories, click on  FreeSWITCH™:

In the repository page, hover over the ellipsis button on the left and click on the Fork option:

 

In the next screen, name your fork (it will default to FreeSWITCH, but you may want to name it something more descriptive. Example freeswitch-FS-1234 where FS-1234 is the name of a Jira you are addressing). This will bring you to your fork repository:

In your new fork page, we need to enable public access. To do this, click on "Settings" on top of the page, and then "Repository" under "Permissions" and check the enable box under "Public Access":

       

Ensure Git is Setup

Tell git your full name and email address. Make sure to use your real name and not a username.

./scripts/setup-git.sh

Clone your fork

 

Clone your new fork
git clone https://YOUR_USERNAME@stash.freeswitch.org/scm/\~YOUR_USERNAME/freeswitch-fs-1234.git
cd freeswitch-fs-1234

Create Your Commits

Make your change:

emacs .

Commit the results locally; see the Commit Guidelines for how to write a good commit message:

git commit -va

Create more commits as needed such that each commit represents a logically separate change:

#while true; do emacs .; git commit -va; done

Review changes and ensure your author name is correct:

git log -p

Create Pull Request

To create your Pull Request, go to Stash page and navigate to the repository which you want to contribute your changes, in this case  FreeSWITCH™, and click “Pull Request” Button Upper right :

Select your repository and your branch, edit the Title (it will default to the branch name, if there is a matching Jira you should reference the Ticket ID, FS-1234), the Description (it will auto populate with commit messages from commits on the branch not already in FreeSWITCH™ master repo):

Congratulations! You just created your first Pull Request. 

Updating Pull Request with new code

If one of the developers ask you to modify your code, there's no need to create another pull request.

Each pull request tracks the branch from the forked repository, so when you commit more changes and pushes those changes to Stash, the pull request is automatically updated with the new commits.

Always create one branch for each pull request. If a developer asks for a change, make the change in the specific branch, and push the new change.

Working with branches

The documentation above shows the basic use for a FreeSWITCH newcomer, using one fork for one JIRA ticket. If you want to work with just one personal fork and different branches, the instructions will be a little different.

Download the Source Code:

git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch

Create a topic/feature branch in your local repository:

git checkout -b myfeature

Make your changes, commit, etc.:

#while true; do emacs .; git commit -va; done

Add your repository as a remote:

git remote add stash ssh://git@stash.freeswitch.org:7999/\~YOUR_USERNAME/freeswitch.git

Push your changes to the new branch:

git push stash +HEAD:myfeature

Create the pull request as described above, using your branch instead of master.

Getting feedback

To increase your chances of having your pull request accepted, please make sure you follow our Coding Guidelines and Commit Message Guidelines.

If you have not received feedback on your Pull Request by the regular Thursday Bug Hunt/Patch Review conference call, Call in to the bridge at 2PM US Central Time (1900 GMT) and ask to have your patch reviewed.

For more informations about our conference schedule, see ClueCon Weekly Conference call.

 



  • No labels