CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
name: LLVM Bugs notifier
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: read
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
jobs:
|
|
auto-subscribe:
|
|
runs-on: ubuntu-24.04
|
|
if: github.repository == 'llvm/llvm-project'
|
|
steps:
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 24
|
|
check-latest: true
|
|
- run: npm install mailgun.js form-data
|
|
- name: Send notification
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }}
|
|
with:
|
|
script: |
|
|
const Mailgun = require('mailgun.js');
|
|
const formData = require('form-data');
|
|
|
|
const mailgun = new Mailgun(formData);
|
|
const DOMAIN = 'email.llvm.org';
|
|
|
|
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
|
|
|
|
github.rest.issues.get({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo
|
|
})
|
|
.then((issue) => {
|
|
var maybeTruncatedBody = issue.data.body;
|
|
if (maybeTruncatedBody.length > 15000) {
|
|
maybeTruncatedBody = maybeTruncatedBody.substring(0,
|
|
15000) +
|
|
"<truncated>Please see the issue for the entire body."
|
|
}
|
|
const payload = {
|
|
author : issue.data.user.login,
|
|
issue : issue.data.number,
|
|
title : issue.data.title,
|
|
url : issue.data.html_url,
|
|
labels : issue.data.labels.map((label) => label.name),
|
|
assignee : issue.data.assignees.map((assignee) => assignee.login),
|
|
body : maybeTruncatedBody
|
|
};
|
|
|
|
const data = {
|
|
from: 'LLVM Bugs <llvm-bugs@email.llvm.org>',
|
|
to: 'llvm-bugs@lists.llvm.org',
|
|
subject: `[Bug ${issue.data.number}] ${issue.data.title}`,
|
|
template: 'new-github-issue',
|
|
'o:tracking-clicks': 'no',
|
|
'h:X-Mailgun-Variables': JSON.stringify(payload)
|
|
};
|
|
|
|
return mg.messages.create(DOMAIN, data);
|
|
})
|
|
.then((msg) => console.log(msg));
|