Skip to content

Commit

Permalink
fix: include stale and pr check workflows
Browse files Browse the repository at this point in the history
Add extra file checks to check-project command
  • Loading branch information
achingbrain committed Oct 27, 2023
1 parent d381ea5 commit f7c896c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 13 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package-lock.json
yarn.lock
# only the root node_modules folder since some of the test fixtures have them
/node_modules
node_modules
build
dist
.docs
.nyc_output
*.log
.vscode
.coverage
.DS_Store
node_modules
package-lock.json
yarn.lock
.vscode
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
"lint",
"standard"
],
"engines": {
"node": ">=18.0.0",
"npm": ">=8.6.0"
},
"bin": {
"aegir": "src/index.js"
},
Expand Down
2 changes: 2 additions & 0 deletions src/check-project/check-build-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export async function checkBuildFiles (projectDir, branchName, repoUrl) {

await ensureFileNotPresent(projectDir, '.travis.yml')
await ensureFileHasContents(projectDir, '.github/dependabot.yml')
await ensureFileHasContents(projectDir, '.github/workflows/semantic-pull-request.yml')
await ensureFileHasContents(projectDir, '.github/workflows/stale.yml')

let defaultCiContent = await download(ciFileUrl)
defaultCiContent = defaultCiContent.replaceAll('${{{ github.default_branch }}}', branchName) // eslint-disable-line no-template-curly-in-string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
13 changes: 13 additions & 0 deletions src/check-project/files/.github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Close and mark stale issue

on:
schedule:
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
uses: pl-strflt/.github/.github/workflows/reusable-stale-issue.yml@v0.3
2 changes: 1 addition & 1 deletion src/check-project/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function sortExportsMap (obj) {

let types = entry.types

if (!types) {
if (!types && entry.import != null) {
types = entry.import.replace('.js', '.d.ts')
}

Expand Down

0 comments on commit f7c896c

Please sign in to comment.