pantheon-systems / quicksilver-pushback

Push any commits made on the Pantheon dashboard back to the original GitHub repository.
MIT License
14 stars 13 forks source link

Is there documentation to integrate this in an existing project? #26

Open jlariza opened 1 year ago

jlariza commented 1 year ago

Good day,

I want to integrate this feature to a pantheon's site that is already created and is running. The composer and the pantheon.yml parts are easy to set; but there is no information about the files that need to be created in files/private folder.

based on this comment https://github.com/pantheon-systems/quicksilver-pushback/issues/9#issuecomment-530945590 I tried to create a mock site in pantheon using terminus build:project:create command to check the files required for the pushback feature. However, it did not created them in the files/private folder so it did not work.

What private files do we require to make this package work? is there more detailed documentation somewhere?

Thank you,

jspellman814 commented 1 year ago

Hi @jlariza 👋 Unfortunately I don't think there is more detailed documentation on using this project, but the README contains information on how to install on an already existing project. Note: it assumes you are using Integrated Composer with your upstream.

For manual set up, the README states you need to:

  1. Run composer require composer/installers pantheon-systems/quicksilver-pushback:^2
  2. Add installer-paths under extra:
    "extra": {
    "installer-paths": {
      "web/private/scripts/quicksilver": ["type:quicksilver-script"]
    }
    }

Once this is added and you push up to your site, Composer will install the contents of this repo in web/private/scripts/quicksilver:

Screen Shot 2023-02-13 at 3 38 32 PM

based on this comment #9 (comment) I tried to create a mock site in pantheon using terminus build:project:create command to check the files required for the pushback feature. However, it did not created them in the files/private folder so it did not work.

Which example project did you use when setting this up? I was able to get this running using the WP example upstream relatively easily, but if another is missing this configuration we'll need to address that.

jlariza commented 1 year ago

good day @jspellman814

From https://github.com/pantheon-systems/quicksilver-pushback/issues/9 and from the code in the installed script, I assume you need to add some private files to the pantheon instance

build-metadata.json
github-secrets.json
secrets.json

However, I cannot find what format should those files have and what information do they require. I guess those keep information such as the github repository where the commits will be pushed back and the key to do it.

Thank you,