Skip to content

Commit

Permalink
Merge branch 'main' into rybickic/upgrade-assignees
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 17, 2022
2 parents 555bc64 + 06123c9 commit f9e5489
Show file tree
Hide file tree
Showing 28 changed files with 167 additions and 1,295 deletions.
1 change: 0 additions & 1 deletion .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions .github/workflows/stale.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions docs/api/API.md

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion docs/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,36 @@ By default, many projects are initialized with `GitHub` component to enabled Git

The use of GitHub (and generating corresponding files in `.github`) can be disabled by specifying `github: false` in your project options.

### Workflows
## Workflows

TODO

See the `GitHub`, `GithubWorkflow`, and `Job` types in the [API reference](./api/API.md) for currently available APIs.

Example code of creating a GitHub workflow: <https://github.com/projen/projen/blob/65b4194c163f47ba4842981b0c92dbe516be787b/src/github/auto-approve.ts#L67-L105>

### Stale workflow

A "stale" workflow can be added which will automatically close issues or pull
requests on your GitHub repository after time has passed without the issue
seeing any comments or updates. You can enable as shown below:

```ts
// or PythonProject, etc.
new typescript.TypeScriptProject({
stale: true,
staleOptions: {
issues: {
closeMessage: "closing pull request",
staleLabel: "I-AM-STALE",
daysBeforeStale: 180,
},
}
})
```

Check the API reference for a list of all available options.

When enabled, by default issues with no activity with will be marked as stale
after 60 days and closed within 7 days, and pull requests with no activity will
be marked as stale after 14 days and closed within 2 days.
8 changes: 4 additions & 4 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/github/github-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface GitHubProjectOptions extends ProjectOptions {
/**
* Auto-close of stale issues and pull request. See `staleOptions` for options.
*
* @default true
* @default false
*/
readonly stale?: boolean;

Expand Down Expand Up @@ -218,7 +218,7 @@ export class GitHubProject extends Project {
);
}

const stale = options.stale ?? true;
const stale = options.stale ?? false;
if (stale && this.github) {
new Stale(this.github, options.staleOptions);
}
Expand Down
3 changes: 0 additions & 3 deletions test/__snapshots__/cleanup.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f9e5489

Please sign in to comment.