Skip to content

Commit

Permalink
Repo refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
TGWolf committed Jun 4, 2024
1 parent 5f48543 commit 8acc345
Show file tree
Hide file tree
Showing 32 changed files with 967 additions and 167 deletions.
19 changes: 9 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
Examples of behaviour that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
Expand All @@ -20,7 +20,7 @@ include:
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:
Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
Expand All @@ -34,8 +34,8 @@ Examples of unacceptable behavior by participants include:
## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
Expand All @@ -54,7 +54,7 @@ further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported by contacting the project team at . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
Expand All @@ -67,10 +67,9 @@ members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
This Code of Conduct is adapted from the
[Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<https://www.contributor-covenant.org/faq>
11 changes: 8 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Contributing

Please refer to the [contributing](https://github.com/WolfSoftware/contributing) documentation.
Please refer to the
[contributing](https://github.com/WolfSoftware/contributing)
documentation.

## Important

ALL commits must be signed to ensure the identity of the developer, any pull requests that are made with unsigned commits will be rejected as a matter of course.
ALL commits must be signed to ensure the identity of the developer, any pull
requests that are made with unsigned commits will be rejected as a matter of
course.

> This project has a [code of conduct](CODE_OF_CONDUCT.md). By interacting with this repository, organization, or community you agree to abide by its terms.
> This project has a [code of conduct](CODE_OF_CONDUCT.md). By interacting
with this repository, organization, or community you agree to abide by its terms.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Funding
# https://help.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository

ko_fi: wolfsoftware
github: [WolfSoftware,TGWolf]
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/ask_question.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Ask a question
description: If you don't have a specific issue or bug to report you can still ask us questions and we will do our best to answer them
title: "[Question]: "
labels: [question, triage]
labels: ["type: question", "state: triage"]
assignees:
- tgwolf
body:
Expand All @@ -16,7 +16,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/DevelopersToolbox/ini-file-parser/blob/master/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Report a bug
description: Found a bug? Let us knonw what the issue is and we will attempt to fix it
title: "[Bug]: "
labels: [bug, triage]
labels: ["type: bug", "state: triage"]
assignees:
- tgwolf
body:
Expand Down Expand Up @@ -52,7 +52,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/DevelopersToolbox/ini-file-parser/blob/master/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Request a new feature
description: Got an idea for a new feature? Let us know what you want and we will see if we can add it
title: "[Feature Request]: "
labels: [enhancement, triage]
labels: ["type: feature", "state: triage"]
assignees:
- tgwolf
body:
Expand Down Expand Up @@ -37,7 +37,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/DevelopersToolbox/ini-file-parser/blob/master/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
26 changes: 17 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
# Thank You

**Summary**
Thanks for submitting a pull request! Please provide enough information so that
others can review your pull request:

## Summary

<!-- Summary of the PR -->

Expand All @@ -10,19 +13,24 @@ This PR fixes/implements the following **bugs/features**
* [ ] Feature 1
* [ ] Breaking changes

<!-- You can skip this if you're fixing a typo or adding an app to the Showcase. -->
<!-- You can skip this if you're fixing a typo or adding an app to the
Showcase. -->

Explain the **motivation** for making this change. What existing problem does the pull request solve?
Explain the **motivation** for making this change. What existing problem does
the pull request solve?

<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->
<!-- Example: When "Adding a function to do X", explain why it is necessary
to have a way to do X. -->

**Test plan (required)**
## Test plan (required)

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots help greatly.
Demonstrate the code is solid. Example: The exact commands you ran and their
output, screenshots help greatly.

<!-- Make sure tests pass on both Travis. -->

**Closing issues**
## Closing issues

<!-- Put `fixes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). -->
<!-- Put `fixes #NNN` in your comment to auto-close the issue that your PR
fixes (if such). -->
Fixes #
23 changes: 12 additions & 11 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

This document outlines security procedures and general policies for this project.

* [Reporting a Bug](#reporting-a-bug)
* [Disclosure Policy](#disclosure-policy)
* [Comments on this Policy](#comments-on-this-policy)
* [Reporting a Bug](#reporting-a-bug)
* [Disclosure Policy](#disclosure-policy)
* [Comments on this Policy](#comments-on-this-policy)

## Reporting a Bug

We take **ALL** security related bugs and issues very seriously.

If you think you have identified a security related issue, please [report it immediately](mailto:[email protected])
and include the word "SECURITY" in the subject line. If you are not sure, don’t worry.
If you think you have identified a security related issue, please
[report it immediately](mailto:[email protected]) and include
the word "SECURITY" in the subject line. If you are not sure, don’t worry.
Better safe than sorry – just send an email.

* Please provide as much information as you can.
Expand All @@ -25,13 +26,13 @@ the module.

When a security report is received, we will carry out the following steps:

* Confirm the problem and determine the affected versions.
* Audit code to find any potential similar problems.
* Prepare fixes for all releases still under maintenance. These fixes will be
released as fast as possible.
* Confirm the problem and determine the affected versions.
* Audit code to find any potential similar problems.
* Prepare fixes for all releases still under maintenance. These fixes will be
released as fast as possible.

We will endeavor to keep you informed of the progress towards a fix
and full announcement, and may ask for additional information or guidance.
We will endeavour to keep you informed of the progress towards a fix and full
announcement, and may ask for additional information or guidance.

## Comments on this Policy

Expand Down
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
open-pull-requests-limit: 10
commit-message:
prefix: "chore:"
labels:
- "dependabot: ecosystem : github actions"
- "dependabot: dependencies"
assignees:
- "TGWolf"

38 changes: 38 additions & 0 deletions .github/scripts/check-jobs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

# This script receives a JSON string containing job results and checks for any failures.

# Check if jq is available
if ! command -v jq &> /dev/null; then
echo "jq could not be found, please install jq to run this script."
exit 1
fi

# Read the JSON string from the first script argument
job_results_json=$1

# Check if the job results JSON is not empty
if [[ -z "$job_results_json" ]]; then
echo "No job results JSON provided."
exit 1
fi

# Set default state
failed_jobs=false

# Use jq to parse the JSON and check each job's result
while IFS= read -r line; do
job_name=$(echo "$line" | awk '{print $1}')
result=$(echo "$line" | awk '{print $3}')

if [ "$result" != "success" ]; then
echo "$job_name failed."
failed_jobs=true
else
echo "$job_name succeed."
fi
done <<< "$( echo "$job_results_json" | jq -r 'to_entries[] | "\(.key) result: \(.value.result)"' )"

if [ "$failed_jobs" = true ] ; then
exit 1
fi
48 changes: 48 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI/CD Pipeline

on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '**/*.md'
- '**/*.cff'

pull_request:
branches:
- '**'
paths-ignore:
- '**/*.md'
- '**/*.cff'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest

steps:
- name: Checkout the Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Perform ShellCheck Analysis
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/shellcheck/master/pipeline.sh)

cicd-pipeline:
if: always()
name: CI/CD Pipeline
needs:
- shellcheck
runs-on: ubuntu-latest

steps:
- name: Checkout the Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Check Job Statuses
run: .github/scripts/check-jobs.sh '${{ toJson(needs) }}'
Loading

0 comments on commit 8acc345

Please sign in to comment.