From e4742e23a41a17dc1a2bb7a62f982b3a911bdfab Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Wed, 18 Sep 2024 14:26:38 +0100 Subject: [PATCH 1/3] Use centralized 'Add to docs project' workflow with GitHub App auth Until this is merged, it is likely that any issues labeled `type/docs` won't be added to the [organization project](https://github.com/orgs/grafana/projects/69). The underlying action is centralized so that any future changes are made in one place (`grafana/writers-toolkit`). The action is versioned to protect workflows from breaking changes. The action uses Vault secrets instead of the discouraged organization secrets. The workflow uses a consistent name so that future changes can be made programmatically. Relates to https://github.com/orgs/grafana/projects/279/views/9?pane=issue&itemId=44280262 Signed-off-by: Jack Baldry --- .github/issue_commands.json | 10 ---------- .github/workflows/add-to-docs-project.yml | 16 ++++++++++++++++ .github/workflows/issue_commands.yml | 21 --------------------- 3 files changed, 16 insertions(+), 31 deletions(-) delete mode 100644 .github/issue_commands.json create mode 100644 .github/workflows/add-to-docs-project.yml delete mode 100644 .github/workflows/issue_commands.yml diff --git a/.github/issue_commands.json b/.github/issue_commands.json deleted file mode 100644 index a1f4ec217871..000000000000 --- a/.github/issue_commands.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "type": "label", - "name": "type/docs", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/69" - } - } -] diff --git a/.github/workflows/add-to-docs-project.yml b/.github/workflows/add-to-docs-project.yml new file mode 100644 index 000000000000..91fe9fe7be3a --- /dev/null +++ b/.github/workflows/add-to-docs-project.yml @@ -0,0 +1,16 @@ +name: Add to docs project +on: + issues: + types: [labeled] + pull_request: + types: [labeled] +jobs: + main: + if: ${{ github.event.label.name == 'type/docs' }} + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: grafana/writers-toolkit/add-to-docs-project@add-to-docs-project/v1 diff --git a/.github/workflows/issue_commands.yml b/.github/workflows/issue_commands.yml deleted file mode 100644 index cfab551c4207..000000000000 --- a/.github/workflows/issue_commands.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Run commands when issues are labeled -on: - issues: - types: [labeled] -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v4 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Commands - uses: ./actions/commands - with: - token: ${{secrets.ISSUE_COMMANDS_TOKEN}} - configPath: issue_commands From 9e6c6b51ab24b28f62e692a5d65f5d9b2151589e Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 19 Sep 2024 12:29:40 +0100 Subject: [PATCH 2/3] Remove unneeded checkout step --- .github/workflows/add-to-docs-project.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/add-to-docs-project.yml b/.github/workflows/add-to-docs-project.yml index 91fe9fe7be3a..56f57ed9badf 100644 --- a/.github/workflows/add-to-docs-project.yml +++ b/.github/workflows/add-to-docs-project.yml @@ -12,5 +12,4 @@ jobs: id-token: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - uses: grafana/writers-toolkit/add-to-docs-project@add-to-docs-project/v1 From 237e3571f853d740d6e0b60d2d61d49d6e1d0ab5 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 10 Oct 2024 18:35:17 +0100 Subject: [PATCH 3/3] Delete .github/workflows/add-to-docs-project.yml --- .github/workflows/add-to-docs-project.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/add-to-docs-project.yml diff --git a/.github/workflows/add-to-docs-project.yml b/.github/workflows/add-to-docs-project.yml deleted file mode 100644 index 56f57ed9badf..000000000000 --- a/.github/workflows/add-to-docs-project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Add to docs project -on: - issues: - types: [labeled] - pull_request: - types: [labeled] -jobs: - main: - if: ${{ github.event.label.name == 'type/docs' }} - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - uses: grafana/writers-toolkit/add-to-docs-project@add-to-docs-project/v1