попробуйте это; это может работать:
module.exports = app => {
app.on(["pull_request.opened"], async context => {
let id = "some string";
//Just return the id, if you want to export more than one thing(id), you can use an object.
return id;
});
};
//Usage
//Where_i_use_it.js
const MyApp = require("./path/to/MyApp");
console.log(MyApp()); // ==> "some string" ```