How to use gcf-utils - 9 common examples

To help you get started, we’ve selected a few gcf-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / repo-automation-bots / packages / conventional-commit-lint / src / local.ts View on Github external
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './conventional-commit-lint';
import express from 'express';
import { config } from 'dotenv';
import { resolve } from 'path';
import * as bodyParser from 'body-parser';

const out = config({ path: resolve(__dirname, '../../.env') });
console.log(out);

const bootstrap = new GCFBootstrapper();
const handler = bootstrap.gcf(appFn);

const app = express();
app.use(bodyParser.json());

app.all('/', (req: express.Request, res: express.Response) => {
  handler(req, res);
});

const port = 3000;

app.listen(port, () => {
  console.log(`listening on http://localhost:${port}`);
});
github googleapis / repo-automation-bots / packages / blunderbuss / src / local.ts View on Github external
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './blunderbuss';
import express from 'express';
import { config } from 'dotenv';
import { resolve } from 'path';
import * as bodyParser from 'body-parser';

const out = config({ path: resolve(__dirname, '../../.env') });
console.log(out);

const bootstrap = new GCFBootstrapper();
const handler = bootstrap.gcf(appFn);

const app = express();
app.use(bodyParser.json());

app.all('/', (req: express.Request, res: express.Response) => {
  handler(req, res);
});

const port = 3000;

app.listen(port, () => {
  console.log(`listening on http://localhost:${port}`);
});
github googleapis / repo-automation-bots / packages / blunderbuss / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './blunderbuss';

const bootstrap = new GCFBootstrapper();
module.exports.blunderbuss = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / header-checker-lint / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './header-checker-lint';

const bootstrap = new GCFBootstrapper();
module.exports.header_checker_lint = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / conventional-commit-lint / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './conventional-commit-lint';

const bootstrap = new GCFBootstrapper();
module.exports.conventional_commit_lint = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / release-please / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './release-please';

const bootstrap = new GCFBootstrapper();
module.exports.release_please = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / trusted-contribution / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './trusted-contribution';

const bootstrap = new GCFBootstrapper();
module.exports.trusted_contribution = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / label-sync / src / app.ts View on Github external
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { GCFBootstrapper } from 'gcf-utils';
import appFn from './label-sync';

const bootstrap = new GCFBootstrapper();
module.exports.label_sync = bootstrap.gcf(appFn);
github googleapis / repo-automation-bots / packages / buildcop / src / app.ts View on Github external
* you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { GCFBootstrapper } from 'gcf-utils';
import { buildcop } from './buildcop';

const bootstrap = new GCFBootstrapper();
module.exports.buildcop = bootstrap.gcf(buildcop);

gcf-utils

An extension for running Probot in Google Cloud Functions

Apache-2.0
Latest version published 7 months ago

Package Health Score

68 / 100
Full package analysis

Popular gcf-utils functions