Skip to content

Commit 29b63f3

Browse files
committed
Adding github templates etc.
1 parent 4794070 commit 29b63f3

File tree

4 files changed

+214
-0
lines changed

4 files changed

+214
-0
lines changed

.github/CONTRIBUTING.md

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Contribution Guidance
2+
3+
If you'd like to contribute to this repository, please read the following guidelines. Contributors are more than welcome to share your learnings with others from centralized location.
4+
5+
## Code of Conduct
6+
7+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
8+
For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
9+
10+
## Typos, Issues, Bugs and contributions
11+
12+
Whenever you are submitting any changes to the OneDrive repositories, please follow these recommendations.
13+
14+
* Always fork repository to your own account for applying modifications
15+
* Do not combine multiple changes to one pull request, please submit for example any samples and documentation updates using separate PRs
16+
* If you are submitting multiple samples, please create specific PR for each of them
17+
* If you are submitting typo or documentation fix, you can combine modifications to single PR where suitable
18+
19+
## Sample Naming and Structure Guidelines
20+
21+
When you are submitting a new sample, it has to follow up below guidelines
22+
23+
* You will need to have a README file for your contribution, which is based on [provided template](../samples/README-template.md) under the Samples folder. Please copy this template and update accordingly. README has to be named as README.md with capital letters.
24+
* You will need to have a picture of the solution in practice in the README file ("pics or it didn't happen"). Preview image must be located in /assets/ folder in the root your you solution.
25+
* README template contains specific tracking image as a final entry in the page with img tag by default to https://telemetry.sharepointpnp.com/onedrive-community-samples/samples/readme-template. This is transparent image, which is used to track popularity of individual samples in GitHub.
26+
* Updated the image src element according with repository name and folder information. If your sample is for example in samples folder and named as aspnet-file-handler, src element should be updated as https://telemetry.sharepointpnp.com/onedrive-community-samples/samples/aspnet-file-handler
27+
* If you find already similar kind of sample from the existing samples, we would appreciate you to rather extend existing one, than submitting a new similar sample
28+
* When you update existing samples, please update also README accordingly with information on provided changes and with your author details
29+
* When you are submitting new sample solution, please name the sample solution folder accordingly
30+
* Folder should start by identifying used technology - like "aspnet-", "aspnet-core-", "dotnet-core-", "spfx-" or "uwp-"
31+
* Do not use words "sample", "code" or "solution" in the folder or sample name
32+
* If your solution is demonstrating multiple technologies, please use functional terms as the name for the solution folder
33+
* Do not use period/dot in the folder name of the provided sample
34+
35+
## Submitting Pull Requests
36+
37+
Here's a high level process for submitting new samples or updates to existing ones.
38+
39+
1. Sign the Contributor License Agreement (see below)
40+
1. Fork this repository [OneDrive/onedrive-community-samples](https://github.com/OneDrive/onedrive-community-samples) to your GitHub account
41+
1. Create a new branch off the `master` branch for your fork for the contribution
42+
1. Include your changes to your branch
43+
1. Commit your changes using descriptive commit message * These are used to track changes on the repositories for monthly communications
44+
1. Create a pull request in your own fork and target `dev` branch
45+
1. Fill up the provided PR template with the requested details
46+
47+
Before you submit your pull request consider the following guidelines:
48+
49+
* Search [GitHub](https://github.com/OneDrive/onedrive-community-samples/pulls) for an open or closed Pull Request
50+
that relates to your submission. You don't want to duplicate effort.
51+
* Make sure you have a link in your local cloned fork to the [OneDrive/onedrive-community-samples](https://github.com/OneDrive/onedrive-community-samples):
52+
53+
```shell
54+
# check if you have a remote pointing to the Microsoft repo:
55+
git remote -v
56+
57+
# if you see a pair of remotes (fetch & pull) that point to https://github.com/OneDrive/onedrive-community-samples, you're ok... otherwise you need to add one
58+
59+
# add a new remote named "upstream" and point to the Microsoft repo
60+
git remote add upstream https://github.com/OneDrive/onedrive-community-samples.git
61+
```
62+
63+
* Make your changes in a new git branch:
64+
65+
```shell
66+
git checkout -b dotnet-core-graph-awesomeness master
67+
```
68+
69+
* Ensure your fork is updated and not behind the upstream **onedrive-community-samples** repo. Refer to these resources for more information on syncing your repo:
70+
* [GitHub Help: Syncing a Fork](https://help.github.com/articles/syncing-a-fork/)
71+
* [Keep Your Forked Git Repo Updated with Changes from the Original Upstream Repo](http://www.andrewconnell.com/blog/keep-your-forked-git-repo-updated-with-changes-from-the-original-upstream-repo)
72+
* For a quick cheat sheet:
73+
74+
```shell
75+
# assuming you are in the folder of your locally cloned fork....
76+
git checkout master
77+
78+
# assuming you have a remote named `upstream` pointing official **onedrive-community-samples** repo
79+
git fetch upstream
80+
81+
# update your local master to be a mirror of what's in the main repo
82+
git pull --rebase upstream master
83+
84+
# switch to your branch where you are working, say "dotnet-core-graph-awesomeness"
85+
git checkout dotnet-core-graph-awesomeness
86+
87+
# update your branch to update it's fork point to the current tip of master & put your changes on top of it
88+
git rebase master
89+
```
90+
91+
* Push your branch to GitHub:
92+
93+
```shell
94+
git push origin dotnet-core-graph-awesomeness
95+
```
96+
97+
## Merging your Existing Github Projects with this Repository
98+
99+
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 this repository:
100+
101+
* Fork the `onedrive-community-samples` repository from GitHub
102+
* Create a local git repository
103+
104+
```shell
105+
md onedrive-community-samples
106+
cd onedrive-community-samples
107+
git init
108+
```
109+
110+
* Pull your forked copy of onedrive-community-samples into your local repository
111+
112+
```shell
113+
git remote add origin https://github.com/yourgitaccount/onedrive-community-samples.git
114+
git pull origin dev
115+
```
116+
117+
* Pull your other project from github into the samples folder of your local copy of onedrive-community-samples
118+
119+
```shell
120+
git subtree add --prefix=samples/projectname https://github.com/yourgitaccount/projectname.git master
121+
```
122+
123+
* Push the changes up to your forked repository
124+
125+
```shell
126+
git push origin dev
127+
```
128+
129+
## Signing the CLA
130+
131+
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.
132+
133+
You can find Microsoft CLA from the following address - https://cla.microsoft.com.
134+
135+
Thank you for your contribution.
136+
137+
> Sharing is caring.

.github/ISSUE_TEMPLATE.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
> Use the following form to submit an issue only if it's related to samples in this repo. If you have an issue related to the OneDrive or its documentation, please submit the issue at [https://github.com/OneDrive/onedrive-api-docs/issues/new](https://github.com/OneDrive/onedrive-api-docs/issues/new). This will help us respond to your issue faster.
2+
>
3+
> ----
4+
>
5+
> Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.
6+
>
7+
> _(DELETE THIS PARAGRAPH AFTER READING)_
8+
9+
## Category
10+
11+
- [ ] Question
12+
- [ ] Bug
13+
- [x] Enhancement
14+
15+
> For the above list, an empty checkbox is [ ] as in <kbd>[</kbd><kbd>SPACE</kbd><kbd>]</kbd>. A checked checkbox is [x] with no space between the brackets. Use the `PREVIEW` tab at the top right to preview the rendering before submitting your issue.
16+
>
17+
> _(DELETE THIS PARAGRAPH AFTER READING)_
18+
19+
## Authors
20+
21+
> Because of the way this repository is setup, samples authors do not get a notification when you create an issue. *It makes it less likely for you to get your issue resolved or to get help*. For the section above **@mention any author of the sample**. Authors' github handle can be found on the main sample documentation page, under the "solution" section. Use the `PREVIEW` tab at the top right to preview the rendering before submitting your issue.
22+
>
23+
> _(DELETE THIS PARAGRAPH AFTER READING)_
24+
25+
## Expected or Desired Behavior
26+
27+
> _If you are reporting a bug, please describe the expected behavior. If you are suggesting an enhancement please describe thoroughly the enhancement, how it can be achieved, and expected benefit._
28+
>
29+
> _(DELETE THIS PARAGRAPH AFTER READING)_
30+
31+
## Observed Behavior
32+
33+
> _If you are reporting a bug, please describe the behavior you expected to occur when performing the action. If you are making a suggestion, you can delete this section._
34+
>
35+
> _(DELETE THIS PARAGRAPH AFTER READING)_
36+
37+
## Steps to Reproduce
38+
39+
> _If you are reporting a bug please describe the steps to reproduce the bug in sufficient detail to allow testing. Only way to fix things properly, is to have sufficient details to reproduce it. If you are making a suggestion, you can delete this section._
40+
>
41+
> _(DELETE THIS PARAGRAPH AFTER READING)_
42+
43+
## Submission Guidelines
44+
45+
> - All suggestions or bugs are welcome, please let us know what's on your mind.
46+
> - If you are reporting an issue around any of the samples, please ensure that you have clear reference on the sample and possibly code file, which should be fixed.
47+
> - Remember to include sufficient details and context.
48+
> - If you have multiple suggestions or bugs please submit them in separate bugs so we can track resolution.
49+
>
50+
> _(DELETE THIS PARAGRAPH AFTER READING)_
51+
52+
Thanks for your contribution! Sharing is caring.

.github/PULL_REQUEST_TEMPLATE.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
| Q | A |
2+
| --------------- | --------------------------------------- |
3+
| Bug fix? | no - yes? |
4+
| New feature? | no - yes? |
5+
| New sample? | no - yes? |
6+
| Related issues? | fixes #X, partially #Y, mentioned in #Z |
7+
8+
## What's in this Pull Request?
9+
10+
> Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
11+
>
12+
> _(DELETE THIS PARAGRAPH AFTER READING)_
13+
14+
## Guidance
15+
16+
> *Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.*
17+
>
18+
> *Please target your PR to `dev` branch. Released documents are in `master` branch.*
19+
>
20+
> _(DELETE THIS PARAGRAPH AFTER READING)_

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
This is the main repository for the community samples about leveraging Microsoft OneDrive and Microsoft SharePoint content (files and folders).
55

6+
> We do welcome community contributions to the samples folder in this repository for demonstrating different use cases targeted on OneDrive development topics. You sample can demonstrate capabilities on the [File Pickers](https://docs.microsoft.com/en-us/onedrive/developer/controls/file-pickers/?view=odsp-graph-online), [File Handlers](https://docs.microsoft.com/en-us/onedrive/developer/file-handlers/?view=odsp-graph-online) or [Files and Folders Microsoft Graph APIs](https://docs.microsoft.com/en-us/onedrive/developer/rest-api/?view=odsp-graph-online).
7+
68
## Available Samples
79
Here you can find the list of samples available in this repository.
810

@@ -18,6 +20,7 @@ Here you can find the list of samples available in this repository.
1820
In order to install and play with any of the above samples, follow the instructions provided in each of the corresponding folders.
1921

2022
## Contributions
23+
2124
This repository welcomes contributions and suggestions. Most contributions require you to agree to a
2225
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
2326
the rights to use your contribution. For details, visit https://cla.microsoft.com.
@@ -29,3 +32,5 @@ provided by the bot. You will only need to do this once across all repos using o
2932
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
3033
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
3134
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
35+
36+
> Sharing is caring!

0 commit comments

Comments
 (0)