Skip to content

Commit

Permalink
style: reformat yml files with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 19, 2023
1 parent a27fb73 commit e6c5ddc
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 249 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: "🐛 Bug Report"
description: Create a new ticket for a bug.
title: "🐛 [BUG] - <title>"
labels: [
"bug"
]
labels: ["bug"]
body:
- type: textarea
id: description
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: "💡 Feature Request"
description: Create a new ticket for a new feature request
title: "💡 [REQUEST] - <title>"
labels: [
"question"
]
labels: ["question"]
body:
- type: input
id: start_date
Expand Down
65 changes: 33 additions & 32 deletions .github/actions/merge-branch/action.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,59 @@
---
#------------------------------------------------------------------------------
# Run pre-commit
#------------------------------------------------------------------------------
name: Merge
branding:
icon: 'git-pull-request'
color: 'orange'
icon: "git-pull-request"
color: "orange"
inputs:
github-token:
description: 'The GitHub token to use for authentication'
description: "The GitHub token to use for authentication"
required: true
type: string
source-branch:
description: 'The branch to merge from'
description: "The branch to merge from"
required: false
type: string
default: 'main'
default: "main"
target-branch:
description: 'The branch to merge to'
description: "The branch to merge to"
required: true
type: string

python-version:
description: 'The version of Python to use, such as 3.11.0'
description: "The version of Python to use, such as 3.11.0"
required: true
type: string

runs:
using: "composite"
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Checkout code
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Remember current branch
shell: bash
run: |
echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV
- name: Remember current branch
shell: bash
run: |
echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV
- name: Merge
id: merge
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout ${{ inputs.source-branch }}
git pull
git checkout ${{ inputs.target-branch }}
git merge -Xtheirs ${{ inputs.source-branch }}
git push https://${{ inputs.github-token }}@github.com/${{ github.repository }}.git HEAD:${{ inputs.target-branch }}
- name: Merge
id: merge
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout ${{ inputs.source-branch }}
git pull
git checkout ${{ inputs.target-branch }}
git merge -Xtheirs ${{ inputs.source-branch }}
git push https://${{ inputs.github-token }}@github.com/${{ github.repository }}.git HEAD:${{ inputs.target-branch }}
- name: Checkout current branch
shell: bash
run: |
git checkout ${{ env.CURRENT_BRANCH }}
- name: Checkout current branch
shell: bash
run: |
git checkout ${{ env.CURRENT_BRANCH }}
97 changes: 49 additions & 48 deletions .github/actions/tests/pre-commit/action.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,69 @@
---
#------------------------------------------------------------------------------
# Run pre-commit
#------------------------------------------------------------------------------
name: Test pre-commit
branding:
icon: 'git-pull-request'
color: 'orange'
icon: "git-pull-request"
color: "orange"
inputs:
python-version:
description: 'The version of Python to use, such as 3.11.0'
description: "The version of Python to use, such as 3.11.0"
required: true
type: string

runs:
using: "composite"
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v4
- name: Checkout code
id: checkout
uses: actions/checkout@v4

- name: Check for pre-commit in requirements
shell: bash
run: |
if ! grep -q "pre-commit" ./requirements.txt; then
echo "pre-commit not found in requirements.txt" >&2
exit 1
fi
- name: Check for pre-commit in requirements
shell: bash
run: |
if ! grep -q "pre-commit" ./requirements.txt; then
echo "pre-commit not found in requirements.txt" >&2
exit 1
fi
- name: Check for black in requirements
shell: bash
run: |
if ! grep -q "black" ./requirements.txt; then
echo "black not found in requirements.txt" >&2
exit 1
fi
- name: Check for black in requirements
shell: bash
run: |
if ! grep -q "black" ./requirements.txt; then
echo "black not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8 in requirements
shell: bash
run: |
if ! grep -q "flake8" ./requirements.txt; then
echo "flake8 not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8 in requirements
shell: bash
run: |
if ! grep -q "flake8" ./requirements.txt; then
echo "flake8 not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8-coding in requirements
shell: bash
run: |
if ! grep -q "flake8-coding" ./requirements.txt; then
echo "flake8-coding not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8-coding in requirements
shell: bash
run: |
if ! grep -q "flake8-coding" ./requirements.txt; then
echo "flake8-coding not found in requirements.txt" >&2
exit 1
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
# see: https://pre-commit.ci/lite.html
- name: pre-commit ci
id: pre-commit-ci
if: always()
uses: pre-commit-ci/[email protected]
# see: https://pre-commit.ci/lite.html
- name: pre-commit ci
id: pre-commit-ci
if: always()
uses: pre-commit-ci/[email protected]
Loading

0 comments on commit e6c5ddc

Please sign in to comment.