From 55eebfb5cb3206ee818b09e3a2ee96700a999cc4 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Wed, 30 Mar 2022 18:05:27 +0400 Subject: [PATCH] Use latest external workflow. --- .github/markdown-lint.yaml | 29 --------- .github/workflows/autofix.yaml | 86 ++------------------------- .github/workflows/autolock.yaml | 2 +- .github/workflows/label-sponsors.yaml | 2 +- .github/workflows/labels.yaml | 2 +- .github/workflows/lint.yaml | 24 +------- readme.md | 30 +--------- 7 files changed, 11 insertions(+), 164 deletions(-) delete mode 100644 .github/markdown-lint.yaml diff --git a/.github/markdown-lint.yaml b/.github/markdown-lint.yaml deleted file mode 100644 index acc3d84..0000000 --- a/.github/markdown-lint.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# See example at: -# https://github.com/avto-dev/markdown-lint/blob/master/lint/config -# /changelog.yml ---- - -# Line length -# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013 -# XXX Temporary disabled because of line continuation edge-case. See: -# https://github.com/DavidAnson/markdownlint/issues/302 -MD013: false - -# Inline HTML -# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033 -# is allowed for beautiful rendering on GitHub. -MD033: - # Whitelist elements used to render centered images and footnotes on GitHub. - allowed_elements: - - 'a' - - 'br' - - 'i' - - 'img' - - 'p' - - 'strong' - - 'sup' - -# First line in file should be a top level heading -# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md041 -# Our header image is replacing the title. -MD041: false diff --git a/.github/workflows/autofix.yaml b/.github/workflows/autofix.yaml index 0940ea6..b627976 100644 --- a/.github/workflows/autofix.yaml +++ b/.github/workflows/autofix.yaml @@ -2,88 +2,12 @@ name: Autofix "on": push: - # Only targets default branch to avoid amplification effects of - # auto-fixing the exact same stuff in multiple non-rebased branches. + # Only targets main branch to avoid amplification effects of auto-fixing + # the exact same stuff in multiple non-rebased branches. branches: - - 'main' - schedule: - # Run linter every week to catch regressions from external dependencies. - - cron: 17 9 * * 1 + - main jobs: - markdown: - name: Format markdown, update TOC and create a PR - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Install doctoc - run: | - sudo npm install -g doctoc - - name: Generate full TOC - run: | - doctoc --github readme.md - - name: Remove forbidden special TOC entries - # See: https://github.com/sindresorhus/awesome-lint/blob/v0.16.0/rules - # /toc.js#L15-L18 - run: > - gawk -i inplace '!/^- \[(Contributing|Footnotes)\]\(#.+\)$/{print}' - ./readme.md - - name: Install Pandoc - run: | - sudo apt install pandoc - - name: Auto-format to GitHub-Flavored Markdown - run: > - pandoc ./readme.md --from=gfm --to=gfm --output=./readme.md - --columns=79 --wrap=none --tab-stop=2 - - name: Auto-fix Markdown - uses: avto-dev/markdown-lint@v1.5.0 - # Non-fixable markdown issues will return non-zero error code. Allow - # that step to fail so we can proceed with creating the auto-fix PR - # below. - continue-on-error: true - with: - config: '.github/markdown-lint.yaml' - args: './**/*.md' - fix: true - - uses: peter-evans/create-pull-request@v3.12.0 - with: - author: "Kevin Deldycke " - commit-message: "[autofix] Format Markdown" - title: "[autofix] Format Markdown" - body: > - [Auto-generated on run - #${{ github.run_id }}](https://github.com/${{ github.repository - }}/actions/runs/${{ github.run_id }}) as defined by [workflow - action](https://github.com/${{ github.repository - }}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml). - labels: "CI/CD" - assignees: kdeldycke - branch: format-markdown - - json: - name: Format JSON files and create a PR - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Install linter - run: | - sudo npm install jsonlint -g - - name: Lint - run: > - find ./ -type f -name '*.json' -print -exec - jsonlint --in-place "{}" \; - - uses: peter-evans/create-pull-request@v3.12.0 - with: - author: "Kevin Deldycke " - commit-message: "[autofix] Format JSON content" - title: "[autofix] Format JSON content" - body: > - [Auto-generated on run - #${{ github.run_id }}](https://github.com/${{ github.repository - }}/actions/runs/${{ github.run_id }}) as defined by [workflow - action](https://github.com/${{ github.repository - }}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml). - labels: "CI/CD" - assignees: kdeldycke - branch: format-json + autofix: + uses: kdeldycke/workflows/.github/workflows/autofix.yaml@v1.0.0 \ No newline at end of file diff --git a/.github/workflows/autolock.yaml b/.github/workflows/autolock.yaml index e04d8f6..617bb45 100644 --- a/.github/workflows/autolock.yaml +++ b/.github/workflows/autolock.yaml @@ -8,4 +8,4 @@ name: Autolock jobs: autolock: - uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v0.9.1 + uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v1.0.0 diff --git a/.github/workflows/label-sponsors.yaml b/.github/workflows/label-sponsors.yaml index a85ce05..831ae3e 100644 --- a/.github/workflows/label-sponsors.yaml +++ b/.github/workflows/label-sponsors.yaml @@ -11,4 +11,4 @@ name: Label sponsors jobs: label-sponsors: - uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v0.9.1 \ No newline at end of file + uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v1.0.0 \ No newline at end of file diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml index d9dffc4..7d2ccdd 100644 --- a/.github/workflows/labels.yaml +++ b/.github/workflows/labels.yaml @@ -8,7 +8,7 @@ name: Labels jobs: labels: - uses: kdeldycke/workflows/.github/workflows/labels.yaml@v0.9.1 + uses: kdeldycke/workflows/.github/workflows/labels.yaml@v1.0.0 with: extra-label-files: | .github/labels-extra.json \ No newline at end of file diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4011bec..e900de7 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -6,26 +6,4 @@ name: Lint jobs: lint: - uses: kdeldycke/workflows/.github/workflows/lint.yaml@v0.9.1 - - lint-markdown: - name: Lint markdown - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: avto-dev/markdown-lint@v1.5.0 - with: - config: '.github/markdown-lint.yaml' - args: './**/*.md' - - lint-awesome: - name: Lint Awesome list - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - # Fetch all history to please linter's age checks. - fetch-depth: 0 - - run: | - npx awesome-lint --version - npx awesome-lint + uses: kdeldycke/workflows/.github/workflows/lint.yaml@v1.0.0 \ No newline at end of file diff --git a/readme.md b/readme.md index 317c236..5b24c82 100644 --- a/readme.md +++ b/readme.md @@ -15,39 +15,13 @@ A *falsehood* is an ***idea* that you initially believe was true**, but in-reality it is **proven to be false**. -E.g. of an *idea*: valid email address exactly has one `@` character. So, you will use this rule to implement your email-field validation logic. Right? Wrong\! The *reality* is: emails can have multiple `@` chars. Therefore your implementation should allow this. The initial *idea* is a falsehood you believed in. +E.g. of an *idea*: valid email address exactly has one `@` character. So, you will use this rule to implement your email-field validation logic. Right? Wrong! The *reality* is: emails can have multiple `@` chars. Therefore your implementation should allow this. The initial *idea* is a falsehood you believed in. The *falsehood* articles listed below will have a comprehensive list of those false-beliefs that you should be aware of, to help you become a better programmer. ## Contents - - - - - - -- [Meta](#meta) -- [Arts](#arts) -- [Business](#business) -- [Dates and Time](#dates-and-time) -- [Education](#education) -- [Emails](#emails) -- [Geography](#geography) -- [Human Identity](#human-identity) -- [Internationalization](#internationalization) -- [Management](#management) -- [Multimedia](#multimedia) -- [Networks](#networks) -- [Phone Numbers](#phone-numbers) -- [Postal Addresses](#postal-addresses) -- [Science](#science) -- [Society](#society) -- [Software Engineering](#software-engineering) -- [Typography](#typography) -- [Video Games](#video-games) - - + ## Meta