Skip to content

Commit 034c850

Browse files
authored
Merge branch 'repository-settings:master' into master
2 parents 04bf9c2 + 1a7a412 commit 034c850

38 files changed

+4328
-1441
lines changed

.github/workflows/node-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- 18.17.0
1919
- 20.6.1
2020
steps:
21-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2222
- name: Setup node
23-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
23+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2424
with:
2525
node-version: ${{ matrix.node }}
2626
cache: npm
@@ -29,9 +29,9 @@ jobs:
2929
verify-dev:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
32+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3333
- name: Setup node
34-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
34+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
3535
with:
3636
node-version-file: .nvmrc
3737
cache: npm

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
name: release
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20-
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
19+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
20+
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2121
with:
2222
node-version-file: .nvmrc
2323
cache: npm
2424
- run: npm clean-install
2525
- run: corepack npm audit signatures
26-
- run: npx semantic-release@23.0.7
26+
- run: npx semantic-release@24.0.0
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
NPM_TOKEN: ${{ secrets.REPOSITORY_SETTINGS_BOT_NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.12.1
1+
20.15.1

api/github/webhooks/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const { createNodeMiddleware, createProbot } = require('probot')
1+
import { createNodeMiddleware, createProbot } from 'probot'
22

3-
const app = require('../../../')
3+
import app from '../../../index.js'
44

5-
module.exports = createNodeMiddleware(app, {
5+
export default createNodeMiddleware(app, {
66
probot: createProbot(),
77
webhooksPath: '/api/github/webhooks'
88
})
File renamed without changes.

docs/plugins/environments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ environments:
2929
custom_branches:
3030
- main
3131
- dev/*
32+
- name: release/*
33+
type: branch
34+
- name: v*
35+
type: tag
3236
```

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
const mergeArrayByName = require('./lib/mergeArrayByName')
1+
import mergeArrayByName from './lib/mergeArrayByName.js'
2+
import SettingsApp from './lib/settings.js'
23

34
/**
45
* @param {import('probot').Probot} robot
56
*/
6-
module.exports = (robot, _, Settings = require('./lib/settings')) => {
7+
export default (robot, _, Settings = SettingsApp) => {
78
async function syncSettings (context, repo = context.repo()) {
89
const config = await context.config('settings.yml', {}, { arrayMerge: mergeArrayByName })
910
return Settings.sync(context.octokit, repo, config)

lib/mergeArrayByName.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// https://github.com/KyleAMathews/deepmerge#arraymerge
22

3-
const merge = require('deepmerge')
3+
import merge from 'deepmerge'
44

55
function findMatchingIndex (sourceItem, target) {
66
if (Object.prototype.hasOwnProperty.call(sourceItem, 'name')) {
@@ -10,7 +10,7 @@ function findMatchingIndex (sourceItem, target) {
1010
}
1111
}
1212

13-
function mergeByName (target, source, options) {
13+
export default function mergeByName (target, source, options) {
1414
const destination = target.slice()
1515

1616
source.forEach(sourceItem => {
@@ -24,5 +24,3 @@ function mergeByName (target, source, options) {
2424

2525
return destination
2626
}
27-
28-
module.exports = mergeByName

lib/plugins/branches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const previewHeaders = {
33
'application/vnd.github.hellcat-preview+json,application/vnd.github.luke-cage-preview+json,application/vnd.github.zzzax-preview+json'
44
}
55

6-
module.exports = class Branches {
6+
export default class Branches {
77
constructor (github, repo, settings) {
88
this.github = github
99
this.repo = repo

lib/plugins/collaborators.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const Diffable = require('./diffable')
1+
import Diffable from './diffable.js'
22

3-
module.exports = class Collaborators extends Diffable {
3+
export default class Collaborators extends Diffable {
44
constructor (...args) {
55
super(...args)
66

0 commit comments

Comments
 (0)