Skip to content

Commit

Permalink
MRG: Merge pull request #19 from aerosense-ai/feature/add-battery-sta…
Browse files Browse the repository at this point in the history
…tistics

Add battery statistics
  • Loading branch information
cortadocodes authored Mar 6, 2023
2 parents 67c1354 + 6a7fe92 commit 8589810
Show file tree
Hide file tree
Showing 12 changed files with 1,829 additions and 1,829 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: ci

on:
pull_request:
branches:
- main

workflow_dispatch:
inputs:
debug_enabled:
Expand All @@ -16,23 +15,10 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skipci')"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# Set fetch-depth to 0 to fetch all tags (necessary for git-mkver to determine the correct semantic version).
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2

- name: Install git-mkver
run: |
curl -L https://github.com/idc101/git-mkver/releases/download/v1.2.1/git-mkver-linux-amd64-1.2.1.tar.gz \
| tar xvz \
&& sudo mv git-mkver /usr/local/bin
- name: Install semantic version checker
run: pip install git+https://github.com/octue/conventional-commits

- name: Check version
run: check-semantic-version pyproject.toml
- uses: octue/[email protected]
with:
path: pyproject.toml
breaking_change_indicated_by: minor
31 changes: 12 additions & 19 deletions .github/workflows/update_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,27 @@
# message headers of the commits since the last pull request merged into main. The auto generated section is enveloped
# between two comments: "<!--- START AUTOGENERATED NOTES --->" and "<!--- END AUTOGENERATED NOTES --->". Anything
# outside these in the description is left untouched. Auto-generated updates can be skipped for a commit if
# "skipci" is in the commit message body.
# "<!--- SKIP AUTOGENERATED NOTES --->" is added to the pull request description.

name: update-pr
name: update-pull-request

on: [pull_request]
# Only trigger for pull requests into main branch.
on:
pull_request:

jobs:
description:
if: "!contains(github.event.head_commit.message, 'skipci')"
if: "!contains(github.event.pull_request.body, '<!--- SKIP AUTOGENERATED NOTES --->')"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: octue/[email protected]
id: pr-description
with:
# Set fetch-depth to 0 to fetch all commit history (necessary for compiling pull request description).
fetch-depth: 0

- name: Install release note compiler
run: pip install git+https://github.com/octue/conventional-commits

- name: Compile new pull request description
run: |
echo 'PULL_REQUEST_NOTES<<EOF' >> $GITHUB_ENV
echo "$(compile-release-notes PULL_REQUEST_START --pull-request-url=${{ github.event.pull_request.url }} --api-token=${{ secrets.GITHUB_TOKEN }})" >> $GITHUB_ENV
echo EOF >> $GITHUB_ENV
pull_request_url: ${{ github.event.pull_request.url }}
api_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update pull request body
uses: riskledger/update-pr-description@v2
with:
body: ${{ env.PULL_REQUEST_NOTES }}
body: ${{ steps.pr-description.outputs.pull_request_description }}
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ repos:
hooks:
- id: prettier

- repo: https://github.com/octue/pre-commit-hooks
rev: 0.5.0
- repo: https://github.com/octue/conventional-commits
rev: 0.8.1
hooks:
- id: check-commit-message-is-conventional
stages: [commit-msg]
Expand Down
Loading

0 comments on commit 8589810

Please sign in to comment.