Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joshooaj committed Mar 19, 2024
0 parents commit adcbbe6
Show file tree
Hide file tree
Showing 56 changed files with 3,052 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"nbgv": {
"version": "3.6.133",
"commands": [
"nbgv"
]
}
}
}
60 changes: 60 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM squidfunk/mkdocs-material:latest

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# install git iproute2, process tools
RUN apk add --no-cache \
ca-certificates \
less \
ncurses-terminfo-base \
krb5-libs \
libgcc \
libintl \
libssl1.1 \
libstdc++ \
tzdata \
userspace-rcu \
zlib \
icu-libs \
curl \
git \
openssh-client \
less \
procps \
gpg \
bash \
shadow \
sudo && \
apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust && \
# Download the powershell '.tar.gz' archive \
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz && \
# Create the target folder where powershell will be placed
mkdir -p /opt/microsoft/powershell/7 && \
# Expand powershell to the target folder
tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 && \
# Set execute permissions
chmod +x /opt/microsoft/powershell/7/pwsh && \
# Create the symbolic link that points to pwsh
ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh && \
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
addgroup -g $USER_GID $USERNAME && \
adduser -s /usr/bin/pwsh -u $USER_UID -G $USERNAME -D $USERNAME && \
# [Optional] Add sudo support for the non-root user
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
# Clean up
apk cache clean && \
rm /tmp/powershell.tar.gz
USER $USERNAME
ENTRYPOINT [ "/usr/bin/pwsh" ]
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "PowerShell",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "usr/bin/bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "usr/bin/zsh"
},
"pwsh": {
"path": "/usr/bin/pwsh",
"icon": "terminal-powershell"
}
},
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": ["ms-vscode.powershell", "davidanson.vscode-markdownlint", "redhat.vscode-yaml"]
}
},
"postCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postStartCommand": "pwsh -c 'sudo chown -R \"$(id -u):$(id -g)\" $PWD; ./build.ps1 -Task Init -Bootstrap'",
"forwardPorts": [8000],
"remoteUser": "vscode"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -crlf
62 changes: 62 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# How to contribute

Contributions to PSPushover are highly encouraged and desired.
Below are some guidelines that will help make the process as smooth as possible.

## Getting Started

- Make sure you have a [GitHub account](https://github.com/signup/free)
- Submit a new issue, assuming one does not already exist.
- Clearly describe the issue including steps to reproduce when it is a bug.
- Make sure you fill in the earliest version that you know has the issue.
- Fork the repository on GitHub

## Suggesting Enhancements

I want to know what you think is missing from PSPushover and how it can be made better.

- When submitting an issue for an enhancement, please be as clear as possible about why you think the enhancement is needed and what the benefit of it would be.

## Making Changes

- From your fork of the repository, create a topic branch where work on your change will take place.
- To quickly create a topic branch based on master; `git checkout -b my_contribution master`.
Please avoid working directly on the `master` branch.
- Make commits of logical units.
- Check for unnecessary whitespace with `git diff --check` before committing.
- Please follow the prevailing code conventions in the repository.
Differences in style make the code harder to understand for everyone.
- Make sure your commit messages are in the proper format.

```
Add more cowbell to Get-Something.ps1
The functionality of Get-Something would be greatly improved if there was a little
more 'pizzazz' added to it. I propose a cowbell. Adding more cowbell has been
shown in studies to both increase one's mojo, and cement one's status
as a rock legend.
```

- Make sure you have added all the necessary Pester tests for your changes.
- Run _all_ Pester tests in the module to assure nothing else was accidentally broken.

## Documentation

I am infallible and as such my documenation needs no corectoin.
In the highly unlikely event that that is _not_ the case, commits to update or add documentation are highly apprecaited.

## Submitting Changes

- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to the main repository.
- Once the pull request has been reviewed and accepted, it will be merged with the master branch.
- Celebrate

## Additional Resources

- [General GitHub documentation](https://help.github.com/)
- [GitHub forking documentation](https://guides.github.com/activities/forking/)
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
- [GitHub Flow guide](https://guides.github.com/introduction/flow/)
- [GitHub's guide to contributing to open source projects](https://guides.github.com/activities/contributing-to-open-source/)

31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Module version used:
* Operating System and PowerShell version:

37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

28 changes: 28 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches:
- main
paths-ignore:
- .github/workflows/Docs.yml
pull_request:
branches:
- main
paths-ignore:
- .github/workflows/Docs.yml
workflow_dispatch:

jobs:
test:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Test
shell: pwsh
run: ./build.ps1 -Task Test -Bootstrap

29 changes: 29 additions & 0 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Docs

on:
push:
branches:
- main
paths-ignore:
- .github/workflows/CI.yml
- tests/**
- .vscode/**

jobs:
DeployDocs:
# Grant the minimum permissions necessary for this job to publish to GitHub Pages
permissions:
contents: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Setting fetch-depth to 0 forces checkout to pull _all_ commit history which takes longer but can be
# useful when using mkdocs plugins that use git history to apply published/updated timestamps on pages.
fetch-depth: 0

- name: MkDocs GH-Deploy
if: github.ref == 'refs/heads/main'
shell: pwsh
run: .\build.ps1 -Bootstrap -Task PublishDocs
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Don't check in the Output dir
Output/

scratch/

testResults.xml

.dotnet/

.cache/
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.PowerShell",
"DavidAnson.vscode-markdownlint"
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "PowerShell: Launch Current File",
"type": "PowerShell",
"request": "launch",
"script": "${file}",
"args": [],
"createTemporaryIntegratedConsole": true
}
]
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files.autoSave": "onFocusChange",
"files.autoSaveWorkspaceFilesOnly": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"powershell.codeFormatting.preset": "OTBS",
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"!relative scalar",
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
]
}
Loading

0 comments on commit adcbbe6

Please sign in to comment.