Giter VIP home page Giter VIP logo

typescript-repos-automation's Introduction

Meta

  • State: In Production
  • Dashboard: Azure

Current Checks

Pull Requests

  • Adds a label for any new PR by a core team member
  • Assigns a core team member to their own PR if no-one is assigned

Issues

  • NOOP for now, but set up

Setup

This repo represents a single Azure "Function App" - which is an app which hosts many functions.

# Clone
git clone https://github.com/microsoft/TypeScript-repos-automation.git repos-automation
cd repos-automation
npm install

# Validate
npm test

You should mostly work according to tests from the src repo, but you can start the server by running:

npm start

To do this you need to have the Azure Functions Core Tools set up. Expect this install to take some time - it's the actual runtime used on the server in Azure.

Windows users:

npm install -g azure-functions-core-tools

Mac users:

brew tap azure/functions
brew install azure-functions-core-tools

Then you can use curl to send GitHub webhook JSON fixtures to the server:

curl -d "@fixtures/issues/created.json" -X POST http://localhost:7071/api/TypeScriptRepoIssueWebhook

While developing, you can use the createFakeGitHubClient to mock out the API with the responses you expect:

- import { createGitHubClient } from "./util/createGitHubClient";
+ import { createFakeGitHubClient } from "./util/tests/createMockGitHubClient";

export const handlePullRequestPayload = async (payload: WebhookPayloadPullRequest, context: Context) => {
-  const api = createGitHubClient();
+  const api = createGitHubClient();

  // Run checks
  await assignSelfToNewPullRequest(api, payload);

  context.res = {
    status: 200,
    body: "Success"
  };
};

Deployment

PR's are automatically deployed when merged via GitHub Actions. If you'd like to manually deploy, you can use npm run deploy. Note: a manual deploy will nuke your node_modules.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

typescript-repos-automation's People

Contributors

jakebailey avatar microsoft-github-operations[bot] avatar microsoftopensource avatar orta avatar sandersn avatar weswigham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typescript-repos-automation's Issues

Add a housekeeping label for PRs which only affect certain files

You could confidently add the Housekeeping label to any PR that only touches files in, say, scripts/ or perhaps src/harness (except unit tests, I think they're in there somewhere). That will miss many categories of Housekeeping PRs, like type-annotation-only ones, but there aren't many of them anyway.

from #10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.