Contents
- Contents
- Contributor License Agreement
- Code of Conduct
- What Can I Do?
- Submitting an Issue or Suggestion
- Typos, minor updates, or fixes to existing samples
- Submitting Pull Requests
- Merging your Existing GitHub Projects with the Samples Repository
- Signing the CLA
If you’d like to contribute to these samples, please read the following guidelines.
Contributors are more than welcome to share your learnings with others from a centralized location.
Contributor License Agreement
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
What Can I Do?
Submitting an Issue or Suggestion
Please do not open GitHub issues for general support questions as the GitHub list should be used for feature requests and bug reports. This way we can more easily track actual issues or bugs from the code and keep the general discussion separate from the actual code.
If you have questions about how to use SharePoint Framework or any of the provided samples, please use the following locations.
- SharePoint Developer Space at http://techcommunity.microsoft.com
- SharePoint Stack Exchange with ‘spfx’ tag
If you experience an issue with one of the provided samples open an issue in GitHub and we’ll notify the original authors of the sample.
Typos, minor updates, or fixes to existing samples
Whenever you are submitting any changes to the SharePoint repositories, please follow these recommendations.
- Always fork repository to your own account for applying modifications
- Do not combine multiple changes to one pull request, please submit for example any samples and documentation updates using separate PRs
- If you are submitting multiple samples, please create specific PR for each of them
- If you are submitting typo or documentation fix, you can combine modifications to single PR where suitable
Submitting Pull Requests
Here’s a high level process for submitting new samples or updates to existing ones.
- Sign the Contributor License Agreement (see below)
- Fork the pnp/sp-dev-fx-webparts repository to your GitHub account
- Create a new branch off of the
mainbranch for your fork for the contribution - Include your changes to your branch
- Commit your changes using descriptive commit message * These are used to track changes on the repositories for monthly communications
- Create a pull request in your own fork and target
devbranch - Fill up the provided PR template with the requested details
Before you submit your pull request consider the following guidelines:
- Search GitHub for an open or closed Pull Request that relates to your submission. You don’t want to duplicate effort.
- Make sure you have a link in your local cloned fork to the pnp/sp-dev-fx-webparts:
## check if you have a remote pointing to the Microsoft repo:
git remote -v
# if you see a pair of remotes (fetch & pull) that point to https://github.com/pnp/sp-dev-fx-webparts, you're ok... otherwise you need to add one
# add a new remote named "upstream" and point to the Microsoft repo
git remote add upstream https://github.com/pnp/sp-dev-fx-webparts.git
Make your changes in a new git branch:
git checkout -b react-taxonomypicker mainEnsure your fork is updated and not behind the upstream sp-dev-fx-webparts repo. Refer to these resources for more information on syncing your repo:
# assuming you are in the folder of your locally cloned fork....
git checkout main
# assuming you have a remote named `upstream` pointing official **sp-dev-fx-webparts** repo
git fetch upstream
# update your local main to be a mirror of what's in the main repo
git pull --rebase upstream main
# switch to your branch where you are working, say "react-taxonomypicker"
git checkout react-taxonomypicker
# update your branch to update it's fork point to the current tip of main & put your changes on top of it
git rebase main
- Push your branch to GitHub:
git push origin react-taxonomypicker
Merging your Existing GitHub Projects with the Samples Repository
If the sample you wish to contribute is stored in your own GitHub repository, you can use the following steps to merge it with the samples repository:
- Fork the
sp-dev-fx-webpartsrepository from GitHub - Create a local git repository
md sp-dev-fx-webparts
cd sp-dev-fx-webparts
git init
- Pull your forked copy of sp-dev-fx-webparts into your local repository
git remote add origin https://github.com/yourgitaccount/sp-dev-fx-webparts.git
git pull origin dev
- Pull your other project from github into the samples folder of your local copy of sp-dev-fx-webparts
git subtree add --prefix=samples/projectname https://github.com/yourgitaccount/projectname.git main
- Push the changes up to your forked repository
git push origin dev
Signing the CLA
Before we can accept your pull requests you will be asked to sign electronically Contributor License Agreement (CLA), which is prerequisite for any contributions to PnP repository. This will be one time process, so for any future contributions you will not be asked to re-sign anything. After the CLA has been signed, our PnP core team members will have a look on your submission for final verification of the submission. Please do not delete your development branch until the submission has been closed.
You can find Microsoft CLA from the following address - https://cla.microsoft.com.
Thank you for your contribution.