diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index b512c09..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index fa6d20b..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,12 +0,0 @@ -env: - browser: true - es2021: true -extends: - - standard - - plugin:no-jquery/all - - prettier -plugins: - - no-jquery -parserOptions: - ecmaVersion: latest - sourceType: module diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml deleted file mode 100644 index 1125184..0000000 --- a/.github/.kodiak.toml +++ /dev/null @@ -1,19 +0,0 @@ - -# .kodiak.toml -version = 1 -[merge] -method = "squash" # default: "merge" -delete_branch_on_merge = true # default: false -optimistic_updates = true # default: true -prioritize_ready_to_merge = true # default: false - -[merge.message] -title = "pull_request_title" # default: "github_default" -body = "github_default" # default: "github_default" -strip_html_comments = true # default: false - -[update] -always = true # default: false - -[approve] -auto_approve_usernames = ["hossainemruz"] diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 4d42107..0000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: Bug -about: File a bug report. -title: 'bug' ---- - -## Expected Behavior - - -## Current Behavior - - -## Possible Solution - - -## Steps to Reproduce - - -1. -2. -3. -4. - -### Screenshots - - -### Browsers Affected - -- [ ] Chrome -- [ ] Firefox -- [ ] Edge -- [ ] Safari 11 -- [ ] Safari 10 -- [ ] IE 11 - -## Detailed Description - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 2c05662..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Feature Request -about: File a Feature Request. -title: 'Feature Request' ---- - - - -### Describe the solution you'd like - - - -### Describe alternatives you've considered - - - -### Additional context - - diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 03d047b..0000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: Question -about: Ask a general question. ---- - - - -### Question - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 2862d6e..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -### Issue - - -### Description - - - -### Test Evidence - - \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 63e630d..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Update dependencies - -version: 2 -updates: -# Update the Github Action versions -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - labels: - - "dependencies" - - "automerge" - - "enhancement" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 87a418c..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,41 +0,0 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' -template: | - I am very excited to announce [Hugo](https://gohugo.io/) theme [Toha](https://themes.gohugo.io/toha/) **v$RESOLVED_VERSION**. This release incorporates some improvements and fixes. Please, read the release note and update your theme to enjoy the new changes. - - Thanks to $CONTRIBUTORS for their valuable contribution in this release. - $CHANGES - - This release note has been generated automatically by [Release Drafter](https://github.com/marketplace/actions/release-drafter). - -categories: -- title: 'Breaking Changes' - label: 'breaking-change' - -- title: 'New Features & Enhancements' - labels: - - 'feature' - - 'enhancement' - -- title: 'Translations' - label: 'translation' - -- title: 'Bug Fixes' - labels: - - 'bug' - - 'bug-fix' - -version-resolver: - major: - labels: - - 'breaking-change' - - 'breaking' - minor: - labels: - - 'feature' - - 'enhancement' - - 'translation' - patch: - labels: - - 'bug' - - 'bug-fix' diff --git a/.github/workflows/autoprefixer.yml b/.github/workflows/autoprefixer.yml deleted file mode 100644 index 28a6200..0000000 --- a/.github/workflows/autoprefixer.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Autoprefixer -on: - push: - branches: - - main -jobs: - autoprefixer: - runs-on: ubuntu-latest - steps: - - name: Checkout to latest commit - uses: actions/checkout@v3.5.2 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "15.x" - - - name: Run autoprefixer - run: | - npm install postcss postcss-cli autoprefixer --save-dev - npm run autoprefixer - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - branch: autoprefixer - branch-suffix: timestamp - commit-message: add vendor specific css prefixes - title: "Update and run autoprefixer" - body: | - This PR runs [postcss/autoprefixer](https://github.com/postcss/autoprefixer) to update vendor specific CSS prefixes. - - >This PR has been created automatically by Github Action [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request). - labels: "enhancement,automerge" - reviewers: hossainemruz diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index f301b0e..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Run Build - -# Run action on pull request event -on: [pull_request] - - -jobs: - build: - runs-on: ubuntu-latest - steps: - # checkout to the commit that has been pushed - - uses: actions/checkout@v3.5.2 - with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install node modules - run: npm install - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.6.0 - with: - hugo-version: 'latest' - extended: true - - - name: Build - run: | - cd exampleSite - hugo --minify diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index b186685..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,71 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '19 16 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v3.5.2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml deleted file mode 100644 index e29ae90..0000000 --- a/.github/workflows/draft-release.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Release Drafter -# Run action on push in mater branch -on: - push: - branches: - - main - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - # Create/Update release draft - - uses: release-drafter/release-drafter@v5.23.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/enforce-label.yml b/.github/workflows/enforce-label.yml deleted file mode 100644 index e532fa4..0000000 --- a/.github/workflows/enforce-label.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Enforce Labels - -on: - pull_request: - types: [labeled, unlabeled, opened, edited, synchronize] -jobs: - enforce-label: - runs-on: ubuntu-latest - steps: - - uses: yogevbd/enforce-label-action@2.2.2 - with: - REQUIRED_LABELS_ANY: "automerge,breaking-change,bug-fix,enhancement,feature,translation" - REQUIRED_LABELS_ANY_DESCRIPTION: "The PR must have at least one these labels: ['automerge','breaking-change','bug-fix','enhancement','feature','translation']" diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml deleted file mode 100644 index a74d472..0000000 --- a/.github/workflows/hugo.yaml +++ /dev/null @@ -1,78 +0,0 @@ -# Sample workflow for building and deploying a Hugo site to GitHub Pages -name: Deploy Hugo site to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: - - gh-pages - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -# Default to bash -defaults: - run: - shell: bash - -jobs: - # Build job - build: - runs-on: ubuntu-latest - env: - HUGO_VERSION: 0.111.3 - steps: - - name: Install Hugo CLI - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - name: Install Dart Sass Embedded - run: sudo snap install dart-sass-embedded - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 - - name: Setup Pages - id: pages - uses: actions/configure-pages@v3 - - name: Install Node.js dependencies - run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - - name: Build with Hugo - env: - # For maximum backward compatibility with Hugo modules - HUGO_ENVIRONMENT: production - HUGO_ENV: production - run: | - hugo \ - --gc \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - path: ./public - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml deleted file mode 100644 index f80683b..0000000 --- a/.github/workflows/md-link-checker.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Check Markdown links - -# Run action on pull request event -on: [pull_request] - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - # checkout to latest commit - - uses: actions/checkout@v3.5.2 - # run markdown linter - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 diff --git a/.github/workflows/project-automation-issue.yaml b/.github/workflows/project-automation-issue.yaml deleted file mode 100644 index a257eae..0000000 --- a/.github/workflows/project-automation-issue.yaml +++ /dev/null @@ -1,150 +0,0 @@ -name: Project Automation (Issue) -on: - issues: - types: - - opened - - reopened - - closed - - labeled - - unlabeled -jobs: - issue_automation: - runs-on: ubuntu-latest - steps: - - name: Get project data - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - ORGANIZATION: hugo-toha - PROJECT_NUMBER: 4 - run: | - gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query=' - query($org: String!, $number: Int!) { - organization(login: $org){ - projectNext(number: $number) { - id - fields(first:20) { - nodes { - id - name - settings - } - } - } - } - }' -f org="$ORGANIZATION" -F number=$PROJECT_NUMBER > project_data.json - - echo 'PROJECT_ID='$(jq -r '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - - # Read the ID of the "Type" field options - echo 'TYPE_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.id' project_data.json) >> $GITHUB_ENV - echo 'PROJECT_ID='$(jq -r '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_BUG='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Bug") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_FEATURE='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Feature") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_ENHANCEMENT='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Enhancement") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_DOCUMENTATION='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Documentation") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_TRANSLATION='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Translation") |.id' project_data.json) >> $GITHUB_ENV - - # Read the id of the "Status" field options - echo 'STATUS_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_TODO='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_IN_PROGRESS='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_READY_FOR_REVIEW='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Ready for Review") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_DONE='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV - - - name: Add Issue to project - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - ISSUE_ID: ${{ github.event.issue.node_id }} - run: | - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $issue:ID!) { - addProjectNextItem(input: {projectId: $project, contentId: $issue}) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f issue="$ISSUE_ID" --jq '.data.addProjectNextItem.projectNextItem.id')" - - echo 'ITEM_ID='$item_id >> $GITHUB_ENV - - - name: Export Labels - env: - ISSUE_DATA: ${{ toJson(github.event.issue) }} - run: | - echo 'LABELS='$(echo "$ISSUE_DATA" | jq -r '[.labels[].name] | join(" ")') >> $GITHUB_ENV - - - name: Set "Type" field - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - run: | - # Only execute this step if the Issue contains at least one label - if [ "${#LABELS[@]}" -gt 0 ]; then - - # Let by default the type is "Bug" - OPTION_ID=$TYPE_BUG - - # If it has "feature" label then set the type to "Feature" - if [[ "${LABELS[*]}" =~ "feature" ]]; then - OPTION_ID=$TYPE_FEATURE - fi - - # If it has "enhancement" label then set the type to "Enhancement" - if [[ "${LABELS[*]}" =~ "enhancement" ]]; then - OPTION_ID=$TYPE_ENHANCEMENT - fi - - # If it has "documentation" label then set the type to "Documentation" - if [[ "${LABELS[*]}" =~ "documentation" ]]; then - OPTION_ID=$TYPE_DOCUMENTATION - fi - - # If it has "translation" label then set the type to "Translation" - if [[ "${LABELS[*]}" =~ "translation" ]]; then - OPTION_ID=$TYPE_TRANSLATION - fi - - # Set the "Type" field to appropriate option - gh api graphql -f query=' - mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: String!) { - updateProjectNextItemField(input: { - projectId: $project - itemId: $item - fieldId: $field - value: $opt_id - }) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$TYPE_ID" -f opt_id="$OPTION_ID" --silent - fi - - - name: Set "Status" field - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - run: | - STATE=${{github.event.issue.state}} - - echo "State: $STATE" - - OPTION_ID=$STATUS_TODO - - if [[ "${STATE}" == "closed" ]] - then - OPTION_ID=$STATUS_DONE - fi - - gh api graphql -f query=' - mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) { - updateProjectNextItemField(input: { - projectId: $project - itemId: $item - fieldId: $field - value: $status_id - }) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$STATUS_ID" -f status_id="$OPTION_ID" --silent diff --git a/.github/workflows/project-automation-pr.yaml b/.github/workflows/project-automation-pr.yaml deleted file mode 100644 index 3d8e936..0000000 --- a/.github/workflows/project-automation-pr.yaml +++ /dev/null @@ -1,219 +0,0 @@ -name: Project Automation (PR) -on: - pull_request: - types: - - opened - - ready_for_review - - reopened - - review_requested - - closed - - labeled - - unlabeled - - synchronize -jobs: - pr_automation: - runs-on: ubuntu-latest - steps: - - name: Get project data - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - ORGANIZATION: hugo-toha - PROJECT_NUMBER: 4 - run: | - gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query=' - query($org: String!, $number: Int!) { - organization(login: $org){ - projectNext(number: $number) { - id - fields(first:20) { - nodes { - id - name - settings - } - } - } - } - }' -f org="$ORGANIZATION" -F number=$PROJECT_NUMBER > project_data.json - - echo 'PROJECT_ID='$(jq -r '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - - # Read the ID of the "Type" field options - echo 'TYPE_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.id' project_data.json) >> $GITHUB_ENV - echo 'PROJECT_ID='$(jq -r '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_BUG='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Bug") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_FEATURE='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Feature") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_ENHANCEMENT='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Enhancement") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_DOCUMENTATION='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Documentation") |.id' project_data.json) >> $GITHUB_ENV - echo 'TYPE_TRANSLATION='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Type") |.settings | fromjson.options[] | select(.name=="Translation") |.id' project_data.json) >> $GITHUB_ENV - - # Read the id of the "Status" field options - echo 'STATUS_ID='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_TODO='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_IN_PROGRESS='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_READY_FOR_REVIEW='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Ready for Review") |.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_DONE='$(jq -r '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV - - - name: Add PR to project - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - PR_ID: ${{ github.event.pull_request.node_id }} - run: | - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $pr:ID!) { - addProjectNextItem(input: {projectId: $project, contentId: $pr}) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f pr="$PR_ID" --jq '.data.addProjectNextItem.projectNextItem.id')" - - echo 'ITEM_ID='$item_id >> $GITHUB_ENV - - - name: Export Labels - env: - PR_DATA: ${{ toJson(github.event.pull_request) }} - run: | - echo 'LABELS='$(echo "$PR_DATA" | jq -r '[.labels[].name] | join(" ")') >> $GITHUB_ENV - - - name: Set "Type" field - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - run: | - # Only execute this step if the PR contains at least one label - if [ "${#LABELS[@]}" -gt 0 ]; then - - # Let by default the type is "Bug" - OPTION_ID=$TYPE_BUG - - # If it has "feature" label then set the type to "Feature" - if [[ "${LABELS[*]}" =~ "feature" ]]; then - OPTION_ID=$TYPE_FEATURE - fi - - # If it has "enhancement" label then set the type to "Enhancement" - if [[ "${LABELS[*]}" =~ "enhancement" ]]; then - OPTION_ID=$TYPE_ENHANCEMENT - fi - - # If it has "documentation" label then set the type to "Documentation" - if [[ "${LABELS[*]}" =~ "documentation" ]]; then - OPTION_ID=$TYPE_DOCUMENTATION - fi - - # If it has "translation" label then set the type to "Translation" - if [[ "${LABELS[*]}" =~ "translation" ]]; then - OPTION_ID=$TYPE_TRANSLATION - fi - - # Set the "Type" field to appropriate option - gh api graphql -f query=' - mutation ($project: ID!, $item: ID!, $field: ID!, $opt_id: String!) { - updateProjectNextItemField(input: { - projectId: $project - itemId: $item - fieldId: $field - value: $opt_id - }) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$TYPE_ID" -f opt_id="$OPTION_ID" --silent - fi - - - name: Set "Status" field - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - run: | - MERGED=${{github.event.pull_request.merged}} - STATE=${{github.event.pull_request.state}} - REVIEWERS=${{github.event.pull_request.requested_reviewers}} - DRAFT=${{github.event.pull_request.draft}} - - echo "Merged: $MERGED" - echo "State: $STATE" - echo "Draft: $DRAFT" - echo "Reviewer: $REVIEWER" - - OPTION_ID=$STATUS_TODO - - if [[ ("${MERGED}" == "true") || ("${STATE}" == "closed") ]] - then - OPTION_ID=$STATUS_DONE - elif [[ ${#REVIEWERS[@]} -gt 0 ]] - then - OPTION_ID=$STATUS_READY_FOR_REVIEW - else - OPTION_ID=$STATUS_IN_PROGRESS - fi - - # Expose the OPTION_ID so that it can be used in later steps - echo 'PR_STATUS='$OPTION_ID >> $GITHUB_ENV - - gh api graphql -f query=' - mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) { - updateProjectNextItemField(input: { - projectId: $project - itemId: $item - fieldId: $field - value: $status_id - }) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$STATUS_ID" -f status_id="$OPTION_ID" --silent - - - name: Find Linked Issues - id: linked_issues - uses: hossainemruz/linked-issues@main - with: - pr_url: ${{github.event.pull_request.html_url}} - format: IssueNumber - - - name: Update Linked Issues Status - env: - GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}} - run: | - declare -a issues=(${{ steps.linked_issues.outputs.issues }}) - - # Loop through the every issues and update their Status to same as the PR Status - for i in "${issues[@]}" - do - # Find the Issue ID - ISSUE_ID="$(gh api graphql -f query=' - query($owner: String!, $name: String!, $issue_number: Int!) { - repository(owner: $owner, name: $name) { - issue(number: $issue_number) { - id - } - } - }' -f owner="${{github.event.pull_request.head.repo.owner.login}}" -f name="${{github.event.pull_request.head.repo.name}}" -F issue_number=$i --jq='.data.repository.issue.id')" - - # Find the id of the Issue at the project board - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $pr:ID!) { - addProjectNextItem(input: {projectId: $project, contentId: $pr}) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f pr="$ISSUE_ID" --jq '.data.addProjectNextItem.projectNextItem.id')" - - # Update the Issue Status - gh api graphql -f query=' - mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: String!) { - updateProjectNextItemField(input: { - projectId: $project - itemId: $item - fieldId: $field - value: $status_id - }) { - projectNextItem { - id - } - } - }' -f project="$PROJECT_ID" -f item="$item_id" -f field="$STATUS_ID" -f status_id="$PR_STATUS" --silent - done diff --git a/.gitignore b/.gitignore index 43c3d1f..f40fbd8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ -.vscode/ -node_modules/ -.DS_Store -.history/ -resources/ -public/ -.hugo_build.lock \ No newline at end of file +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 437583c..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "themes/toha"] - path = themes/toha - url = https://github.com/hugo-toha/toha.git -[submodule "themes/hugo-scroll"] - path = themes/hugo-scroll - url = https://github.com/zjedi/hugo-scroll.git diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/.prettierrc.yml b/.prettierrc.yml deleted file mode 100644 index 4f03d60..0000000 --- a/.prettierrc.yml +++ /dev/null @@ -1,5 +0,0 @@ -printWidth: 100 -tabWidth: 2 -semi: false -singleQuote: true -trailingComma: "all" diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 5686ee0..0000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -nodejs 18.12.1 diff --git a/404.html b/404.html new file mode 100644 index 0000000..086a5c9 --- /dev/null +++ b/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
Page not found :(
+The requested page could not be found.
+