Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions automations #3815

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
32 changes: 32 additions & 0 deletions .github/workflows/release-comment-issues.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Loading