diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 39e3db5b..36f8ca8b 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -1,29 +1,29 @@ name: Merge on: - issue_comment: - types: [created] + issue_comment: + types: [created] jobs: - fast-forward: - # Only run if the comment contains the /merge command. - if: ${{ contains(github.event.comment.body, '/merge') - && github.event.issue.pull_request }} - runs-on: ubuntu-latest + fast-forward: + # Only run if the comment contains the /merge command. + if: ${{ contains(github.event.comment.body, '/merge') + && github.event.issue.pull_request }} + runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - issues: write - - steps: - - name: Fast forwarding - uses: sequoia-pgp/fast-forward@v1 - with: - merge: true - github_token: ${{ secrets.FAST_FORWARD_PAT }} - # To reduce the workflow's verbosity, use 'on-error' - # to only post a comment when an error occurs, or 'never' to - # never post a comment. (In all cases the information is - # still available in the step's summary.) - comment: "on-error" + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.BUILD_APP_ID }} + private-key: ${{ secrets.BUILD_PRIVATE_KEY }} + - name: Fast forwarding + uses: sequoia-pgp/fast-forward@v1 + with: + merge: true + github_token: ${{ steps.app-token.outputs.token }} + # To reduce the workflow's verbosity, use 'on-error' + # to only post a comment when an error occurs, or 'never' to + # never post a comment. (In all cases the information is + # still available in the step's summary.) + comment: 'on-error' diff --git a/src/helpers.ts b/src/helpers.ts index 41a21328..d4bf4998 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,15 +1,28 @@ -import { html } from 'lit'; +import { type TemplateResult, html } from 'lit'; -import type { Device, Entity, HomeAssistant, State } from './types'; +import { createStateStyles } from './styles'; +import type { Area, Device, Entity, HomeAssistant, State } from './types'; export const createStateIcon = ( hass: HomeAssistant, state: State, classes: String[], -) => - html`