Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 286a432

Browse files
committed
Adding templates to repo
1 parent 6ece845 commit 286a432

4 files changed

Lines changed: 241 additions & 0 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
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 [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
9+
10+
## Question or Problem?
11+
12+
Please do not open GitHub issues for general support questions as the GitHub list should be used for script requests and bug reports. This way we can more easily track actual issues or bugs from the scripts and keep the general discussion separate from the actual script samples.
13+
14+
## Typos, Issues, Bugs and contributions
15+
16+
Whenever you are submitting any changes to the SharePoint repositories, please follow these recommendations.
17+
18+
* Always fork repository to your own account for applying modifications
19+
* Do not combine multiple changes to one pull request, please submit for example any samples and documentation updates using separate PRs
20+
* If you are submitting multiple samples, please create specific PR for each of them
21+
* If you are submitting typo or documentation fix, you can combine modifications to single PR where suitable
22+
23+
## Sample Naming and Structure Guidelines
24+
25+
When you are submitting a new sample, it has to follow up below guidelines
26+
27+
* You will need to have a README file for your contribution, which is based on [provided template](../samples/README-template.md) under the scripts folder. Please copy this template and update accordingly. README has to be named as README.md with capital letters.
28+
* Please include as much as possible information on the exact use case of your script. More information will help on others to understand the value of your script. You can add links and images as needed.
29+
30+
* README template contains specific tracking image as a final entry in the page with img tag by default to https://telemetry.sharepointpnp.com/sp-admin-scripts/scripts/readme-template. This is transparent image, which is used to track popularity of individual samples in GitHub.
31+
32+
* Updated the image src element according with repository name and folder information. If your sample is for example in samples folder and named as known-folder-move, src element should be updated as https://telemetry.sharepointpnp.com/sp-admin-scripts/script/known-folder-move
33+
34+
* When you are submitting a new script, please name the sample solution folder accordingly
35+
* Do not use words "sample", "script" or "SharePoint" in the folder or sample name - these are scripts for SharePoint management, so no reason to repeat that in the name
36+
37+
* Do not use period/dot in the folder name of the provided sample
38+
39+
## Submitting Pull Requests
40+
41+
Here's a high level process for submitting new samples or updates to existing ones.
42+
43+
1. Sign the Contributor License Agreement (see below)
44+
1. Fork this repository [SharePoint/sp-admin-scripts](https://github.com/SharePoint/sp-admin-scripts) to your GitHub account
45+
1. Create a new branch off the `master` branch for your fork for the contribution
46+
1. Include your changes to your branch
47+
1. Commit your changes using descriptive commit message * These are used to track changes on the repositories for monthly communications
48+
1. Create a pull request in your own fork and target `master` branch
49+
1. Fill up the provided PR template with the requested details
50+
51+
Before you submit your pull request consider the following guidelines:
52+
53+
* Make sure you have a link in your local cloned fork to the [SharePoint/sp-admin-scripts](https://github.com/SharePoint/sp-admin-scripts):
54+
55+
```shell
56+
# check if you have a remote pointing to the Microsoft repo:
57+
git remote -v
58+
59+
# if you see a pair of remotes (fetch & pull) that point to https://github.com/SharePoint/sp-admin-scripts, you're ok... otherwise you need to add one
60+
61+
# add a new remote named "upstream" and point to the Microsoft repo
62+
git remote add upstream https://github.com/SharePoint/sp-admin-scripts.git
63+
```
64+
65+
* Make your changes in a new git branch:
66+
67+
```shell
68+
git checkout -b my-awesome-script-name master
69+
```
70+
71+
* Ensure your fork is updated and not behind the upstream **sp-admin-scripts** repo. Refer to these resources for more information on syncing your repo:
72+
* [GitHub Help: Syncing a Fork](https://help.github.com/articles/syncing-a-fork/)
73+
* [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)
74+
* For a quick cheat sheet:
75+
76+
```shell
77+
# assuming you are in the folder of your locally cloned fork....
78+
git checkout master
79+
80+
# assuming you have a remote named `upstream` pointing official **sp-admin-scripts** repo
81+
git fetch upstream
82+
83+
# update your local master to be a mirror of what's in the main repo
84+
git pull --rebase upstream master
85+
86+
# switch to your branch where you are working, say "my-awesome-script-name"
87+
git checkout my-awesome-script-name
88+
89+
# update your branch to update it's fork point to the current tip of master & put your changes on top of it
90+
git rebase master
91+
```
92+
93+
* Push your branch to GitHub:
94+
95+
```shell
96+
git push origin my-awesome-script-name
97+
```
98+
99+
## Merging your Existing Github Projects with this Repository
100+
101+
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:
102+
103+
* Fork the `sp-admin-scripts` repository from GitHub
104+
* Create a local git repository
105+
106+
```shell
107+
md sp-admin-scripts
108+
cd sp-admin-scripts
109+
git init
110+
```
111+
112+
* Pull your forked copy of sp-admin-scripts into your local repository
113+
114+
```shell
115+
git remote add origin https://github.com/yourgitaccount/sp-admin-scripts.git
116+
git pull origin dev
117+
```
118+
119+
* Pull your other project from github into the scripts folder of your local copy of sp-admin-scripts
120+
121+
```shell
122+
git subtree add --prefix=scripts/projectname https://github.com/yourgitaccount/projectname.git master
123+
```
124+
125+
* Push the changes up to your forked repository
126+
127+
```shell
128+
git push origin master
129+
```
130+
131+
## Signing the CLA
132+
133+
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.
134+
135+
You can find Microsoft CLA from the following address - https://cla.microsoft.com.
136+
137+
Thank you for your contribution.
138+
139+
> Sharing is caring.

.github/ISSUE_TEMPLATE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
## Expected or Desired Behavior
20+
21+
> _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._
22+
>
23+
> _(DELETE THIS PARAGRAPH AFTER READING)_
24+
25+
## Observed Behavior
26+
27+
> _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._
28+
>
29+
> _(DELETE THIS PARAGRAPH AFTER READING)_
30+
31+
## Steps to Reproduce
32+
33+
> _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._
34+
>
35+
> _(DELETE THIS PARAGRAPH AFTER READING)_
36+
37+
## Submission Guidelines
38+
39+
> - All suggestions or bugs are welcome, please let us know what's on your mind.
40+
> - If you are reporting an issue around any of the samples, please ensure that you have clear reference on the sample and possibly script file, which should be fixed.
41+
> - Remember to include sufficient details and context.
42+
> - If you have multiple suggestions or bugs please submit them in separate bugs so we can track resolution.
43+
>
44+
> _(DELETE THIS PARAGRAPH AFTER READING)_
45+
46+
Thanks for your contribution! Sharing is caring.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
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 script? | 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 `master` branch.*
19+
>
20+
> _(DELETE THIS PARAGRAPH AFTER READING)_

Scripts/readme-template.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Title of the Script (SEO friendly) #
2+
3+
## Summary ##
4+
5+
Description of the script
6+
7+
### Applies to ###
8+
9+
- OneDrive
10+
- Potentially SharePoint if applies there as well
11+
12+
### Prerequisites ###
13+
14+
- if any
15+
16+
### Solution ###
17+
Solution | Author(s)
18+
---------|----------
19+
Name of the solution | name (company name)
20+
21+
### Version history ###
22+
Version | Date | Comments
23+
---------| -----| --------
24+
1.0 | February 8th 2026 | Initial release
25+
26+
### Disclaimer ###
27+
28+
**THIS SCRIPT IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
29+
30+
----------
31+
32+
# Introduction
33+
34+
Description of the script and what it does with potential set of additional links, images and other references.
35+
36+
<img src="https://telemetry.sharepointpnp.com/onedrive-admin-scripts/scripts/my-script-folder-name" />

0 commit comments

Comments
 (0)