Possible to tell the AI to do the similar changes in other files in the repo?

Hi :slight_smile:

I’ve been trying Cursor and I’ve had a task which I think is suitable for an AI automation.

I have a .yaml file that originally looks like this:

version: "3.7"
x-project-repository-mount: &project-repository-mount
  type: bind
  source: $REPOSITORY_PATH

x-project-base: &project-base
  env_file:
    - .env
  restart: always
  networks:
    - source-verify

networks:
  source-verify:

services:
  server:
    <<: *project-base
    image: ethereum/source-verify:server-${TAG}
    container_name: server-${TAG}
    ports:
      - "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}"
    volumes:
      - <<: *project-repository-mount
        target: /home/data/repository

I want to change it to this:

version: "3.7"

x-project-base: &project-base
  env_file:
    - .env
  restart: always
  networks:
    - source-verify

networks:
  source-verify:

services:
  server:
    <<: *project-base
    image: ethereum/source-verify:server-${TAG}
    container_name: server-${TAG}
    ports:
      - "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}"
    volumes:
      - type: bind
        source: $REPOSITORY_PATH_HOST
        target: $REPOSITORY_PATH

I.e. remove the x-project-repository-mount variable and add it to volumes.

I want to do this thing in 5 other similar files too. But I couldn’t really prompt the AI to do this for me. I tried giving the repo context but it didn’t work.

Is this possible somehow?

The files are her https://github.com/ethereum/sourcify/tree/staging/environments

I think the feature you want is this one here. You’ll have to wait a bit for it I guess.

2 Likes