Skip to content

Conversation

@Dargon789
Copy link
Owner

@Dargon789 Dargon789 commented Oct 2, 2025

Summary by Sourcery

Fix demo redirect logic and introduce a suite of CI/CD configurations, including GitHub Actions workflows for Google Cloud, Octopus Deploy, GitHub Pages, CircleCI pipelines, and add a security policy

Bug Fixes:

  • Fix demo redirect to use correct path segment for next parameter

CI:

  • Add GitHub Actions workflows for building and deploying to GKE via Google Cloud
  • Add GitHub Actions workflow for Docker build and deploy via Octopus Deploy
  • Add GitHub Actions workflows for Jekyll and static site deployments to GitHub Pages
  • Add GitHub Actions Jekyll Docker CI workflow
  • Add CircleCI configurations for Rust build, general jobs, and a custom web3 defi workflow

Documentation:

  • Add SECURITY.md with supported versions and vulnerability reporting policy

Dargon789 and others added 11 commits July 4, 2025 23:51
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
* Create SECURITY.md

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>

* Update SECURITY.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>

---------

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Summary by Sourcery
Add a new GitHub Actions workflow to build and deploy static content to GitHub Pages.

CI:

Create .github/workflows/static.yml to trigger deployments on pushes to main and manual dispatch
Configure permissions for GITHUB_TOKEN and set concurrency to avoid canceling in-progress runs
Define a deploy job that checks out the repo, configures Pages, uploads the site artifact, and deploys to GitHub Pages

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
…scripting (#39)

Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 2, 2025

Reviewer's Guide

This PR corrects a redirect path calculation in the frontend utilities and adds a comprehensive suite of CI/CD configurations (GitHub Actions and CircleCI) alongside a security policy document.

Sequence diagram for corrected demo redirect logic in frontend

sequenceDiagram
  participant "User (browser)" as User
  participant "handleDemoRedirect()" as HandleDemoRedirect
  participant "window.location" as WindowLocation
  User->>HandleDemoRedirect: Navigates to demo route
  HandleDemoRedirect->>HandleDemoRedirect: Calculate current and next path
  HandleDemoRedirect->>WindowLocation: setTimeout (15s) to redirect to `${path[index]}?next=${nextPath}`
  WindowLocation->>User: Browser navigates to new path
Loading

File-Level Changes

Change Details Files
Fix redirect URL calculation for demo routing
  • Use the correct path segment when constructing the redirect URL
  • Replace params.next with the indexed path element in setTimeout
frontend/src/app/shared/common.utils.ts
Add GitHub Actions workflows for various build and deploy pipelines
  • Create workflow to build Docker image and deploy to GKE via workload identity
  • Create workflow to build and deploy via Octopus Deploy
  • Create workflows for Jekyll site and static site deployments to GitHub Pages
  • Add Jekyll build-in-Docker CI workflow for pull requests
.github/workflows/google.yml
.github/workflows/octopusdeploy.yml
.github/workflows/jekyll-gh-pages.yml
.github/workflows/static.yml
.github/workflows/jekyll-docker.yml
Introduce CircleCI configurations for Rust and sample pipelines
  • Add Rust build-and-test job with caching, formatting check, and tests
  • Add a sample ‘say-hello’ job and orchestrate it via a workflow
  • Add custom executor example for a web3 Defi GameFi project
.circleci/cargo.yml
.circleci/config.yml
.circleci/web3_defi_gamefi.yml
Add Security Policy documentation
  • Define supported project versions table
  • Outline vulnerability reporting process and contacts
SECURITY.md

Possibly linked issues

  • Create cargo.yml #24: The PR adds the CircleCI Rust build and test job, covering formatting, testing, and caching, as detailed in the issue. However, it also includes other unrelated changes.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist
Copy link

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing the project's infrastructure by adding new CircleCI configurations for continuous integration, including a specific setup for Rust-based components and a general-purpose workflow. Additionally, it introduces a formal SECURITY.md document to guide vulnerability reporting and supported versions. A minor but important fix addresses an issue in the frontend's demo redirection utility, ensuring proper navigation.

Highlights

  • CI/CD Configuration: New CircleCI configurations have been introduced, including a dedicated setup for Rust projects and a general template for workflows.
  • Security Policy: A SECURITY.md file has been added to define supported versions and the process for reporting vulnerabilities.
  • Frontend Redirection Fix: A bug in the demo redirection logic within common.utils.ts has been resolved to ensure correct URL construction.
Ignored Files
  • Ignored by pattern: .github/workflows/** (5)
    • .github/workflows/google.yml
    • .github/workflows/jekyll-docker.yml
    • .github/workflows/jekyll-gh-pages.yml
    • .github/workflows/octopusdeploy.yml
    • .github/workflows/static.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several new CircleCI configuration files and a SECURITY.md policy, alongside a minor change in a TypeScript utility file. My review focuses on improving the new CI configurations by removing redundancy and placeholder content. Specifically, I've pointed out duplicated steps in the Rust CI workflow, and hardcoded/placeholder content in another CI file. I've also suggested updating the new security policy with accurate information.

sourcery-ai[bot]
sourcery-ai bot previously approved these changes Oct 2, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Several GitHub Actions workflows seem to overlap (e.g., two Jekyll/Pages workflows and static deploy); consider consolidating or clarifying their distinct purposes to reduce maintenance overhead.
  • Multiple workflows include TODO placeholders for critical environment variables (e.g., PROJECT_ID, OCTOPUS_URL); ensure these are parameterized via secrets or updated to real values before merging.
  • The CircleCI cargo job repeats formatting and testing steps twice; removing duplicate runs will streamline the CI process.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Several GitHub Actions workflows seem to overlap (e.g., two Jekyll/Pages workflows and static deploy); consider consolidating or clarifying their distinct purposes to reduce maintenance overhead.
- Multiple workflows include TODO placeholders for critical environment variables (e.g., PROJECT_ID, OCTOPUS_URL); ensure these are parameterized via secrets or updated to real values before merging.
- The CircleCI cargo job repeats formatting and testing steps twice; removing duplicate runs will streamline the CI process.

## Individual Comments

### Comment 1
<location> `.github/workflows/google.yml:104-106` </location>
<code_context>
+          docker push "${DOCKER_TAG}"
+
+      # Set up kustomize
+      - name: 'Set up Kustomize'
+        run: |-
+          curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz
+          chmod u+x ./kustomize
+
</code_context>

<issue_to_address>
**issue (bug_risk):** The Kustomize download command fetches a tar.gz but does not extract it.

Since the downloaded file is a tar.gz archive, extracting it is necessary to access the kustomize binary and prevent runtime issues.
</issue_to_address>

### Comment 2
<location> `.github/workflows/google.yml:113` </location>
<code_context>
+      - name: 'Deploy to GKE'
+        run: |-
+          # replacing the image name in the k8s template
+          ./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA
+          ./kustomize build . | kubectl apply -f -
+          kubectl rollout status deployment/$DEPLOYMENT_NAME
</code_context>

<issue_to_address>
**issue (bug_risk):** Hardcoded placeholders in the kustomize image set command may cause deployment issues.

Placeholders such as LOCATION, PROJECT_ID, REPOSITORY, IMAGE, and TAG may not be resolved automatically. Use environment variables or explicit values to avoid incorrect image references during deployment.
</issue_to_address>

### Comment 3
<location> `.github/workflows/octopusdeploy.yml:63-68` </location>
<code_context>
+          username: ${{ env.DOCKER_REGISTRY_USERNAME }}
+          password: ${{ env.DOCKER_REGISTRY_PASSWORD }}
+
+      - name: Extract metadata (tags, labels) for Docker
+        id: meta
+        uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
+        with:
+          images: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}
+          tags: type=semver,pattern={{version}},value=v1.0.0-{{sha}}
+
+      - name: Build and push Docker image
</code_context>

<issue_to_address>
**suggestion:** The Docker image tag pattern is hardcoded to v1.0.0-{{sha}}, which may not reflect actual versioning.

A static tag can cause image overwrites and versioning confusion. Please use dynamic tags derived from release or commit data.

```suggestion
      - name: Extract metadata (tags, labels) for Docker
        id: meta
        uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
        with:
          images: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}
          tags: |
            type=ref,event=tag
            type=sha,format=short
            type=raw,value=latest,enable={{is_default_branch}}
```
</issue_to_address>

### Comment 4
<location> `.circleci/cargo.yml:13-15` </location>
<code_context>
+          keys:
+            - v1-cargo-{{ checksum "Cargo.lock" }}
+            - v1-cargo-
+      - run:
+          name: "Check formatting"
+          command: cargo fmt -- --check
+      - run:
+          name: "Run tests"
</code_context>

<issue_to_address>
**suggestion:** Duplicate formatting and test steps may be redundant.

The workflow executes 'cargo fmt -- --check' and 'cargo test' twice; removing the duplicates will simplify the workflow.

Suggested implementation:

```
      - run:
          name: "Check formatting"
          command: cargo fmt -- --check
      - run:
          name: "Run tests"
          command: cargo test

```

```
      - save_cache:
          key: v1-cargo-{{ checksum "Cargo.lock" }}
          paths:
            - "~/.cargo/bin"
            - "~/.cargo/registry/index"
            - "~/.cargo/registry/cache"
            - "~/.cargo/git/db"
            - "target"

```

If there are additional duplicate 'cargo fmt -- --check' or 'cargo test' steps elsewhere in the file, please remove those as well to ensure each is only run once per job.
</issue_to_address>

### Comment 5
<location> `.circleci/web3_defi_gamefi.yml:20-21` </location>
<code_context>
+    executor: my-custom-executor
+    steps:
+      - checkout
+      - run: |
+          # echo Hello, World!
+
+workflows:
</code_context>

<issue_to_address>
**suggestion:** The run step is currently commented out and does not perform any action.

Please clarify the purpose of this step and either implement the required commands or remove it if unnecessary.

```suggestion
      - run: |
          echo "CircleCI job started in working directory: $(pwd)"
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: AU_gdev_19 <64915515+Dargon789@users.noreply.github.com>
@Dargon789 Dargon789 enabled auto-merge (rebase) October 2, 2025 22:55
@Dargon789 Dargon789 self-assigned this Oct 15, 2025
@Dargon789 Dargon789 added documentation Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers invalid This doesn't seem right labels Oct 15, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right

Projects

Status: Backlog
Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants