Files
llvm/.github/workflows/llvm-bugs.yml
Mend Renovate 2fd3bf3680 [Github] Update GHA Dependencies (major) (#161108)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/attest-build-provenance](https://redirect.github.com/actions/attest-build-provenance)
| action | major | `v1.4.4` -> `v3.0.0` |
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | major | `v4.3.0` -> `v5.0.0` |
|
[actions/github-script](https://redirect.github.com/actions/github-script)
| action | major | `v7.1.0` -> `v8.0.0` |
|
[actions/github-script](https://redirect.github.com/actions/github-script)
| action | major | `v6.4.1` -> `v8.0.0` |
| [actions/labeler](https://redirect.github.com/actions/labeler) |
action | major | `v4.3.0` -> `v6.0.1` |
| [actions/setup-node](https://redirect.github.com/actions/setup-node) |
action | major | `v4.4.0` -> `v6.0.0` |
|
[actions/setup-python](https://redirect.github.com/actions/setup-python)
| action | major | `v5.6.0` -> `v6.0.0` |
|
[github/codeql-action](https://redirect.github.com/github/codeql-action)
| action | major | `v2.28.1` -> `v4.31.2` |
|
[github/codeql-action](https://redirect.github.com/github/codeql-action)
| action | major | `v3.31.2` -> `v4.31.2` |
| [node](https://redirect.github.com/actions/node-versions) | uses-with
| major | `18` -> `24` |
|
[tj-actions/changed-files](https://redirect.github.com/tj-actions/changed-files)
| action | major | `v46.0.5` -> `v47.0.0` |
2025-11-06 15:39:56 -08:00

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@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24
check-latest: true
- run: npm install mailgun.js form-data
- name: Send notification
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.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));