mirror of
https://github.com/swc-project/swc.git
synced 2024-11-22 15:25:01 +03:00
chore(bot): Allow org members to use bump comments (#6942)
This commit is contained in:
parent
8c5a53d0d5
commit
0324d5a78b
2
bindings/Cargo.lock
generated
2
bindings/Cargo.lock
generated
@ -168,6 +168,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"swc_core",
|
"swc_core",
|
||||||
|
"swc_node_base",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-chrome",
|
"tracing-chrome",
|
||||||
"tracing-futures",
|
"tracing-futures",
|
||||||
@ -2648,6 +2649,7 @@ dependencies = [
|
|||||||
"swc_ecma_loader",
|
"swc_ecma_loader",
|
||||||
"swc_ecma_transforms_base",
|
"swc_ecma_transforms_base",
|
||||||
"swc_ecma_visit",
|
"swc_ecma_visit",
|
||||||
|
"swc_node_base",
|
||||||
"swc_node_bundler",
|
"swc_node_bundler",
|
||||||
"swc_nodejs_common",
|
"swc_nodejs_common",
|
||||||
"swc_plugin_proxy",
|
"swc_plugin_proxy",
|
||||||
|
@ -67,3 +67,4 @@ swc_core = { version = "0.59.26", features = [
|
|||||||
"base_node",
|
"base_node",
|
||||||
"base_concurrent",
|
"base_concurrent",
|
||||||
] }
|
] }
|
||||||
|
swc_node_base = "0.5.8"
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate napi_derive;
|
extern crate napi_derive;
|
||||||
|
|
||||||
|
extern crate swc_node_base;
|
||||||
|
|
||||||
use std::{env, panic::set_hook, sync::Arc};
|
use std::{env, panic::set_hook, sync::Arc};
|
||||||
|
|
||||||
use backtrace::Backtrace;
|
use backtrace::Backtrace;
|
||||||
|
@ -3,7 +3,6 @@ import YAML from "yaml";
|
|||||||
|
|
||||||
const owner = "swc-project";
|
const owner = "swc-project";
|
||||||
const repo = "swc";
|
const repo = "swc";
|
||||||
const maintainer = "kdy1";
|
|
||||||
|
|
||||||
export interface Action {
|
export interface Action {
|
||||||
crate: string;
|
crate: string;
|
||||||
@ -17,8 +16,14 @@ export async function parsePrComments(prNumber: number): Promise<Action[]> {
|
|||||||
pull_number: prNumber,
|
pull_number: prNumber,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const maintainers = await octokit.orgs.listPublicMembers({ org: owner });
|
||||||
|
|
||||||
return comments.data
|
return comments.data
|
||||||
.filter((c) => c.user && c.user.login === maintainer)
|
.filter(
|
||||||
|
(c) =>
|
||||||
|
c.user &&
|
||||||
|
maintainers.data.find((m) => m.login === c.user?.login)
|
||||||
|
)
|
||||||
.map((c) => {
|
.map((c) => {
|
||||||
const idx = c.body.indexOf("swc-bump:");
|
const idx = c.body.indexOf("swc-bump:");
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user