Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable .github/osschat.yml to store OSSChat configuration for consumer repos #179

Open
huan opened this issue Oct 14, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@huan
Copy link
Collaborator

huan commented Oct 14, 2021

By default, this plugin loads configuration from a given repository file. If the file doesn't exist, it loads configuration from the same path in the same owner's .github repository.
https://github.com/probot/octokit-plugin-config

// given that `.github/my-app.yml` in `octocat/hello-world` has the following ocntent
//
// comment: 'Thank you for creating the issue!'
//
const { config } = await octokit.config.get({
  owner: "octocat",
  repo: "hello-world",
  path: ".github/my-app.yml",
});
// config is now { comment: "Thank you for creating the issue!" }

// all options and returns
const { config, files } = await octokit.config.get({
  owner: "octocat",
  repo: "hello-world",
  path: ".github/my-app.yml",
  defaults: {
    comment: "Thank you for creating the issue!",
  },
  branch: "develop",
});
// files is an array of { owner, repo, path, config } objects

We can design a .github/osschat.yml for our osschat users to store their settings in this file so that osschat can be easier to be configured.

OSSChat .github/osschat.yml Proposal

chatops:
  room:
    - 12341234@chatroom
chatopera:
  faq: ./faq.yaml
  admins:
    - huan
    - mingyu

The above is a demo for this idea

See also: https://probot.github.io/api/latest/classes/context.html#config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants