-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from Snuffy2/config-flow
- Loading branch information
Showing
20 changed files
with
1,980 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
mode: auto | ||
silent: true | ||
branchName: full | ||
openDraftPR: true | ||
|
||
branches: | ||
- label: bug | ||
skip: false | ||
prefix: bugfix/ | ||
name: dev | ||
prTarget: dev | ||
- label: '*' | ||
skip: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
- black | ||
- isort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Draft PR for New Branches | ||
on: | ||
workflow_dispatch: | ||
create: | ||
ref_type: branch | ||
branches-ignore: | ||
- dev | ||
- newdev | ||
jobs: | ||
new_branch_pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
- name: Show Branch Name | ||
run: echo Branch ${GITHUB_REF##*/} | ||
- name: Create and Checkout New Dev branch | ||
run: git checkout ${GITHUB_REF##*/} | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email noreply@github.com | ||
- name: Create Empty Commit | ||
run: git commit --allow-empty -m "Empty commit" | ||
#- run: echo "commit_count="$(git rev-list --count origin..HEAD) | ||
#- run: echo "commit_count="$(git rev-list --count origin..HEAD) >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
run: gh pr create -d -B dev -b "${GITHUB_REF##*/}" -t "${GITHUB_REF##*/}" --head "${GITHUB_REF##*/}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CPR }} | ||
GH_TOKEN: ${{ secrets.CPR }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Create Empty Commit | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
create_empty_commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
- name: Show Branch Name | ||
run: echo Branch ${GITHUB_REF##*/} | ||
- name: Create and Checkout New Dev branch | ||
run: git checkout ${GITHUB_REF##*/} | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email noreply@github.com | ||
- name: Create Empty Commit | ||
run: git commit --allow-empty -m "Empty commit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: HACS Action | ||
|
||
on: [workflow_dispatch, pull_request] | ||
|
||
jobs: | ||
hacs: | ||
name: HACS Action | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: HACS Action | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" | ||
ignore: "brands" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Validate with hassfest | ||
|
||
on: [workflow_dispatch, pull_request] | ||
|
||
jobs: | ||
validate: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "home-assistant/actions/hassfest@master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Create Branch on Assigning Bug Issue | ||
on: | ||
issues: | ||
types: [ assigned ] | ||
|
||
jobs: | ||
create_issue_branch_job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Issue Branch | ||
uses: robvanderleek/create-issue-branch@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: MyLint Code Updater (black, isort, flake8) | ||
on: [workflow_dispatch, pull_request] | ||
jobs: | ||
mylint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Check code with the Black Code Formatter | ||
uses: rickstaa/action-black@v1.1.14 | ||
id: action_black | ||
with: | ||
black_args: "." | ||
fail_on_error: 'true' | ||
- name: Check code with isort | ||
uses: jamescurtin/isort-action@master | ||
id: action_isort | ||
with: | ||
configuration: --force-single-line --profile black | ||
- name: Check code with flake8 | ||
uses: reviewdog/action-flake8@v3 | ||
id: action_flake8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
fail_on_error: false | ||
filter_mode: "nofilter" | ||
flake8_args: "--select=F,E7,E9,W1,W6" | ||
- name: Create Pull Request | ||
if: github.event_name == 'pull_request' && (steps.action_black.outputs.is_formatted == 'true' || steps.action_isort.outputs.isort-result) | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v4.1.1 | ||
with: | ||
token: ${{ secrets.CPR }} | ||
title: "Format Python code with isort & Black Code Formatter" | ||
commit-message: ":art: Format Python code with isort & Black Code Formatter" | ||
body: | | ||
There appear to be some python formatting errors in ${{ github.sha }}. This pull request | ||
uses the [Black Code Formatter](/~https://github.com/psf/black) and [isort](https://pycqa.github.io/isort) to fix these issues. | ||
labels: "automerge,black,isort" | ||
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch | ||
delete-branch: true | ||
branch: actions/mylint | ||
- name: Auto Merge | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
id: automerge | ||
uses: pascalgn/automerge-action@v0.15.3 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.CPR }}" | ||
PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" | ||
MERGE_LABELS: "automerge" | ||
MERGE_METHOD: "squash" | ||
MERGE_REMOVE_LABELS: "automerge" | ||
MERGE_DELETE_BRANCH: "true" | ||
MERGE_ERROR_FAIL: "true" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Create New Dev Branch and PR | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [released] | ||
jobs: | ||
new_dev_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
- name: Create and Checkout New Dev branch | ||
run: git checkout -b dev | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email noreply@github.com | ||
- name: Empty Commit | ||
run: git commit --allow-empty -m "Empty commit" | ||
- name: Push Commit | ||
run: git push --set-upstream origin dev | ||
- name: Create Pull Request | ||
run: gh pr create -d -B ${{ github.event.repository.default_branch }} -l ignore-for-release -b "Dev PR Release" -t "Dev PR Release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CPR }} | ||
GH_TOKEN: ${{ secrets.CPR }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.