diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml new file mode 100644 index 0000000000..4d6c36511c --- /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 }} diff --git a/.github/workflows/release-comment-issues.yml b/.github/workflows/release-comment-issues.yml new file mode 100644 index 0000000000..25cb489cac --- /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