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

Add breaking change Slack notifier #257

Merged
merged 13 commits into from
Nov 5, 2024

Conversation

AyodeAwe
Copy link
Contributor

@AyodeAwe AyodeAwe commented Oct 31, 2024

Sends a notification to a designated Slack channel on every PR labelled with breaking, whenever any of the following events are triggered on the PR:

  • closed
  • reopened
  • labeled
  • unlabeled

This shared-workflow would be consumed in the following manner:

name: Trigger Breaking Change Notifications

on:
  pull_request:
    types:
      - closed
      - reopened
      - labeled
      - unlabeled

jobs:
  trigger-notifier:
    if: contains(toJSON(github.event.pull_request.labels.*.name), 'breaking')
    secrets: inherit
    uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@<branch>
    with:
      sender_login: ${{ github.event.sender.login }}
      sender_avatar: ${{ github.event.sender.avatar_url }}
      repo: ${{ github.repository }}
      pr_number: ${{ github.event.pull_request.number }}
      pr_title: ${{ github.event.pull_request.title }}
      pr_body: ${{ github.event.pull_request.body || '_Empty PR description_' }}
      pr_base_ref: ${{ github.event.pull_request.base.ref }}
      pr_author: ${{ github.event.pull_request.user.login }}
      event_action: ${{ github.event.action }}
      pr_merged: ${{ github.event.pull_request.merged }}

Example run:

@AyodeAwe AyodeAwe requested a review from a team as a code owner October 31, 2024 16:46
@AyodeAwe AyodeAwe changed the title Add breaking change notifier Add breaking change Slack notifier Oct 31, 2024
@AyodeAwe
Copy link
Contributor Author

AyodeAwe commented Oct 31, 2024

After this PR is approved/merged, I will open follow up PRs in all the relavant RAPIDS repositories.

Copy link
Contributor

@KyleFromNVIDIA KyleFromNVIDIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the logic for calculating what constitutes a "breaking change" is not present in this workflow, but is left for the individual repos to decide? And this workflow just sends the Slack notification?

I see now that this workflow will be applied to PRs with the breaking label. I don't see a reference to a label event here, so I assume the logic of invoking the workflow on PRs with the label is left to the repos.

.github/workflows/breaking-change-alert.yaml Outdated Show resolved Hide resolved
.github/workflows/breaking-change-alert.yaml Outdated Show resolved Hide resolved
@AyodeAwe
Copy link
Contributor Author

AyodeAwe commented Nov 1, 2024

I don't see a reference to a label event here, so I assume the logic of invoking the workflow on PRs with the label is left to the repos.

Thanks for the review @KyleFromNVIDIA.

Note this in the description of this PR:

name: Trigger Breaking Change Notifications

on:
  pull_request:
    types:
      - closed
      - reopened
      - labeled
      - unlabeled

# ...rest of the worfklow

Once this PR is approved and merged, I will open PRs across all RAPIDS repositories with that labelled event included, just as described in the PR description.

@AyodeAwe AyodeAwe marked this pull request as ready for review November 4, 2024 19:04
@AyodeAwe AyodeAwe marked this pull request as draft November 4, 2024 19:18
@AyodeAwe AyodeAwe marked this pull request as ready for review November 4, 2024 19:29
@AyodeAwe
Copy link
Contributor Author

AyodeAwe commented Nov 5, 2024

@KyleFromNVIDIA any further thoughts?

@AyodeAwe AyodeAwe merged commit 2764e48 into rapidsai:branch-24.12 Nov 5, 2024
rapids-bot bot pushed a commit to rapidsai/pynvjitlink that referenced this pull request Nov 14, 2024
Adds a workflow that triggers a second workflow which sends a notification to a designated Slack channel on every PR labelled with breaking, whenever any of the following events are triggered on the PR:

- closed
- reopened
- labeled
- unlabeled

Depends on rapidsai/shared-workflows#257

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - James Lamb (https://github.com/jameslamb)

URL: #113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants