Skip to content

Commit 3d1e86d

Browse files
authored
Merge pull request #1 from alagos/node16
Node16
2 parents 927e662 + 1ff27af commit 3d1e86d

File tree

376 files changed

+69369
-59658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+69369
-59658
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ Comments in related PR to branch, notifying about the merge conflict.
2323
## Example usage
2424

2525
```yaml
26-
uses: alagos/regex-merge@v1.0
27-
with:
28-
accessToken: ${{ secrets.GITHUB_TOKEN }}
29-
headBranch: master
30-
branchRegex: '^release\/.+'
31-
```
26+
permissions: write-all
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Merge main to release/.+
30+
uses: alagos/regex-merge@v1.2
31+
with:
32+
accessToken: ${{ secrets.GITHUB_TOKEN }}
33+
headBranch: main
34+
branchRegex: '^(release|staging)\/.+'
35+
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inputs:
1616
required: false
1717
default: true
1818
runs:
19-
using: 'node12'
19+
using: 'node16'
2020
main: 'index.js'
2121
branding:
2222
icon: 'git-merge'

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function run() {
1818
let keepCheckingBranches = true;
1919
let currentPage = 1;
2020
while (keepCheckingBranches) {
21-
const { data: branches } = await octokit.repos.listBranches({
21+
const { data: branches } = await octokit.rest.repos.listBranches({
2222
owner: owner,
2323
repo: repo,
2424
page: currentPage,
@@ -42,7 +42,7 @@ async function mergeToHead(branch) {
4242
if (branch == headBranch) {
4343
return;
4444
}
45-
const { status, ...response } = await octokit.repos.merge({
45+
const { status, ...response } = await octokit.rest.repos.merge({
4646
owner: owner,
4747
repo: repo,
4848
base: branch,
@@ -81,7 +81,7 @@ function commentInPr(branch, branchSha) {
8181
if (!notifyConflicts) {
8282
return;
8383
}
84-
octokit.pulls
84+
octokit.rest.pulls
8585
.list({
8686
owner: owner,
8787
repo: repo,
@@ -95,7 +95,7 @@ function commentInPr(branch, branchSha) {
9595
console.log(
9696
`Merge conflict found for PR #${pr.number}. Notifying to @${pr.user.login}`
9797
);
98-
octokit.issues.createComment({
98+
octokit.rest.issues.createComment({
9999
owner: owner,
100100
repo: repo,
101101
issue_number: pr.number,

node_modules/.bin/uuid

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/LICENSE.md

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/README.md

Lines changed: 196 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.d.ts

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)