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.
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
ProposalSee also: https://probot.github.io/api/latest/classes/context.html#config