From 8428edb33d7222331dee8bdd348d4db1761e8277 Mon Sep 17 00:00:00 2001 From: Islam Shehata Date: Tue, 22 Oct 2024 12:24:56 +0300 Subject: [PATCH] feat(ci): Open PR in app when ingest options updated --- .github/workflows/release-ingest-options.yaml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/release-ingest-options.yaml diff --git a/.github/workflows/release-ingest-options.yaml b/.github/workflows/release-ingest-options.yaml new file mode 100644 index 00000000..ce4667d4 --- /dev/null +++ b/.github/workflows/release-ingest-options.yaml @@ -0,0 +1,35 @@ +name: "Create Ingest Options PR" + +on: + push: +# on: +# push: +# branches: +# - main + +jobs: + release-ingest-options: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: npm install + - run: npm run generate-ingest-options + - uses: actions/github-script@v7 + with: + script: | + const { repo, owner } = context.repo; + const result = await github.rest.pulls.create({ + title: 'Ingest Options updated', + owner: "@axiomhq", + repo: "app", + head: '${{ github.ref_name }}', + base: 'main', + body: [ + 'This PR is auto-generated by', + '[actions/github-script](https://github.com/actions/github-script).' + ].join('\n') + }); + github.rest.issues.addLabels({ + labels: ['feature', 'automated pr'] + });