From e28437dcf3252c9030e9febb3f51451a80f70357 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 22 Nov 2024 14:14:49 +0100 Subject: [PATCH 1/3] Add GH automation to comment on issues when the fix for the issue has been released --- .github/workflows/release-comment-issues.yml | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release-comment-issues.yml diff --git a/.github/workflows/release-comment-issues.yml b/.github/workflows/release-comment-issues.yml new file mode 100644 index 0000000000..d30aacd718 --- /dev/null +++ b/.github/workflows/release-comment-issues.yml @@ -0,0 +1,32 @@ +name: "Automation: Notify issues for release" +on: + release: + types: + - published + workflow_dispatch: + inputs: + version: + description: Which version to notify issues for + required: false + +# This workflow is triggered when a release is published +jobs: + release-comment-issues: + runs-on: ubuntu-20.04 + name: 'Notify issues' + steps: + - name: Get version + id: get_version + run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT + + - name: Comment on linked issues that are mentioned in release + if: | + steps.get_version.outputs.version != '' + && !contains(steps.get_version.outputs.version, 'a') + && !contains(steps.get_version.outputs.version, 'b') + && !contains(steps.get_version.outputs.version, 'rc') + + uses: getsentry/release-comment-issues-gh-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + version: ${{ steps.get_version.outputs.version }} \ No newline at end of file From 3a66112e587637d891d8d8413c1265971299c836 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 22 Nov 2024 14:15:29 +0100 Subject: [PATCH 2/3] Add PRs and Issues automatically to the Python SDK gh project (and label with potel, if pr wants to merge into potel-base --- .github/workflows/project-automation.yml | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/project-automation.yml diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml new file mode 100644 index 0000000000..b66630dcb8 --- /dev/null +++ b/.github/workflows/project-automation.yml @@ -0,0 +1,27 @@ +name: "Automation: Update GH Project" + +on: + pull_request: + types: [opened, reopened] + issues: + types: [opened, reopened] + +jobs: + add-to-project: + name: Add item to "Python SDK" project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/getsentry/projects/235 + github-token: ${{ secrets.GH_PROJECT_AUTOMATION }} + + add-label: + name: Add POTel label if needed + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'potel-base' + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "Project: POTel" + github_token: ${{ secrets.GITHUB_TOKEN }} From 7e56a1ed562dafb925cf42adad2a33dc813c59ce Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 22 Nov 2024 14:24:51 +0100 Subject: [PATCH 3/3] Quotes --- .github/workflows/project-automation.yml | 2 +- .github/workflows/release-comment-issues.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml index b66630dcb8..4d6c36511c 100644 --- a/.github/workflows/project-automation.yml +++ b/.github/workflows/project-automation.yml @@ -8,7 +8,7 @@ on: jobs: add-to-project: - name: Add item to "Python SDK" project + name: 'Add item to "Python SDK" project' runs-on: ubuntu-latest steps: - uses: actions/add-to-project@v0.5.0 diff --git a/.github/workflows/release-comment-issues.yml b/.github/workflows/release-comment-issues.yml index d30aacd718..25cb489cac 100644 --- a/.github/workflows/release-comment-issues.yml +++ b/.github/workflows/release-comment-issues.yml @@ -13,7 +13,7 @@ on: jobs: release-comment-issues: runs-on: ubuntu-20.04 - name: 'Notify issues' + name: Notify issues steps: - name: Get version id: get_version