Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
#99 initial release of prettier.yml workflow (#100)
Browse files Browse the repository at this point in the history
* "#99 updated to use newer actions"
* added timeout limit, removed perms
* #99 added repo token
* #99 removed 'on pull request' per discussion in dependabot/dependabot-core#3253, update will take place after push to develop branch
  • Loading branch information
mvogelgesang committed Dec 20, 2022
1 parent 8bf947e commit 96b2804
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 5 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name:
Prettier
# You may pin to the exact commit or the version.
# uses: creyD/prettier_action@0b655e298cc5c8477c9df9e60dfb6cd5d79f3055
# This action works with pull requests and pushes

on:
## this ensures the update runs against the fork branch
workflow_dispatch:
push:
branches:
- develop
jobs:
prettier:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Set date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Checkout repository using git
uses: actions/checkout@v3
with:
token: ${{ secrets.LIGHTNING_COMMUNITY_REPO }}
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
working-directory: ./
- name: Prettify code
run: npx prettier --write .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: Automated data pull ${{ steps.nvm.outputs.date }}

# Optional. Local and remote branch name where commit is going to be pushed
# to. Defaults to the current branch.
# You might need to set `create_branch: true` if the branch does not exist.
# branch: feature-123

# Optional. Options used by `git-commit`.
# See https://git-scm.com/docs/git-commit#_options
commit_options: "--no-verify --signoff"

# Optional glob pattern of files which should be added to the commit
# Defaults to all (.)
# See the `pathspec`-documentation for git
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary. txt-aiddefpathspecapathspec
# file_pattern: docs/_data/*.yml docs/_data/legacy/*.yml

# Optional. Local file path to the repository.
# Defaults to the root of the repository.
repository: .

# Optional commit user and author settings
commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "github-actions [bot]@users.noreply.github.com"
commit_author: Author <[email protected]> # defaults to author of the commit that triggered the run

# Optional. Option used by `git-status` to determine if the repository is
# dirty. See https://git-scm.com/docs/git-status#_options
status_options: "--untracked-files=no"

# Optional. Options used by `git-add`.
# See https://git-scm.com/docs/git-add#_options
add_options: "-u"

# Optional. Options used by `git-push`.
# See https://git-scm.com/docs/git-push#_options
push_options: "--force"

# Optional. Disable dirty check and always try to create a commit and push
skip_dirty_check: false

# Optional. Skip internal call to `git fetch`
skip_fetch: true

# Optional. Skip internal call to `git checkout`
skip_checkout: true

# Optional. Prevents the shell from expanding filenames.
# Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion. html
disable_globbing: true

# Optional. Create given branch name in local and remote repository.
create_branch: true
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
({
doInit: function (component, event, helper) {
component.set("v.allData", helper.generateData());
component.set(
"v.totalPages",
Math.ceil(component.get("v.allData").length / component.get("v.pageSize"))
);
component.set("v.allData", helper.generateData());
component.set(
"v.totalPages",
Math.ceil(component.get("v.allData").length / component.get("v.pageSize"))
);
helper.buildData(component);
},
handleCurrentPageNumberChange: function (component, event, helper) {
Expand Down

0 comments on commit 96b2804

Please sign in to comment.