Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ Comments in related PR to branch, notifying about the merge conflict.
## Example usage

```yaml
uses: alagos/regex-merge@v1.0
with:
accessToken: ${{ secrets.GITHUB_TOKEN }}
headBranch: master
branchRegex: '^release\/.+'
```
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Merge main to release/.+
uses: alagos/regex-merge@v1.2
with:
accessToken: ${{ secrets.GITHUB_TOKEN }}
headBranch: main
branchRegex: '^(release|staging)\/.+'
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
required: false
default: true
runs:
using: 'node12'
using: 'node16'
main: 'index.js'
branding:
icon: 'git-merge'
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function run() {
let keepCheckingBranches = true;
let currentPage = 1;
while (keepCheckingBranches) {
const { data: branches } = await octokit.repos.listBranches({
const { data: branches } = await octokit.rest.repos.listBranches({
owner: owner,
repo: repo,
page: currentPage,
Expand All @@ -42,7 +42,7 @@ async function mergeToHead(branch) {
if (branch == headBranch) {
return;
}
const { status, ...response } = await octokit.repos.merge({
const { status, ...response } = await octokit.rest.repos.merge({
owner: owner,
repo: repo,
base: branch,
Expand Down Expand Up @@ -81,7 +81,7 @@ function commentInPr(branch, branchSha) {
if (!notifyConflicts) {
return;
}
octokit.pulls
octokit.rest.pulls
.list({
owner: owner,
repo: repo,
Expand All @@ -95,7 +95,7 @@ function commentInPr(branch, branchSha) {
console.log(
`Merge conflict found for PR #${pr.number}. Notifying to @${pr.user.login}`
);
octokit.issues.createComment({
octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pr.number,
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/uuid

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

9 changes: 9 additions & 0 deletions node_modules/@actions/core/LICENSE.md

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

203 changes: 196 additions & 7 deletions node_modules/@actions/core/README.md

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

8 changes: 1 addition & 7 deletions node_modules/@actions/core/lib/command.d.ts

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

Loading