From af8c563ac0e2ee3107f92e7dc62ac34ff3b19e9b Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 15:46:13 +0300 Subject: [PATCH 01/26] confliact --- .github/workflows/confliact.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/confliact.yml diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml new file mode 100644 index 000000000000..85ac926dc1f8 --- /dev/null +++ b/.github/workflows/confliact.yml @@ -0,0 +1,47 @@ +name: confliact +on: [pull_request] + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + // Get a list of all issues + // See: https://octokit.github.io/rest.js/#pagination + const opts = github.rest.issues.listForRepo.endpoint.merge({ + ...context.issue, + state: 'open' + }) + const issues = await github.paginate(opts) + + for (const issue of issues) { + if (!issue.pull_request) { + continue + } + + const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ + owner: github.context.repo.owner, + repo: github.context.repo.repo, + pull_number: issue.number, + }); + + const listFilesResponse = await github.paginate(listFilesOptions); + const changedFiles = listFilesResponse.map((f: any) => f.filename); + + core.debug("found changed files:"); + for (const file of changedFiles) { + core.debug(" " + file); + } + } + + diff: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + const diff_url = context.payload.pull_request.diff_url + const result = await github.request(diff_url) + console.log(result) From 945fc1377c3b1e3a97abc1f2032ec50033850567 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 15:49:14 +0300 Subject: [PATCH 02/26] Update README.md --- README.md | 81 +------------------------------------------------------ 1 file changed, 1 insertion(+), 80 deletions(-) diff --git a/README.md b/README.md index 3632a933b409..f70f10e4db19 100644 --- a/README.md +++ b/README.md @@ -1,80 +1 @@ -Dash Core staging tree 0.17 -=========================== - -|CI|master|develop| -|-|-|-| -|Gitlab|[![Build Status](https://gitlab.com/dashpay/dash/badges/master/pipeline.svg)](https://gitlab.com/dashpay/dash/-/tree/master)|[![Build Status](https://gitlab.com/dashpay/dash/badges/develop/pipeline.svg)](https://gitlab.com/dashpay/dash/-/tree/develop)| - -https://www.dash.org - - -What is Dash? -------------- - -Dash is an experimental digital currency that enables instant, private -payments to anyone, anywhere in the world. Dash uses peer-to-peer technology -to operate with no central authority: managing transactions and issuing money -are carried out collectively by the network. Dash Core is the name of the open -source software which enables the use of this currency. - -For more information, as well as an immediately useable, binary version of -the Dash Core software, see https://www.dash.org/get-dash/. - - -License -------- - -Dash Core is released under the terms of the MIT license. See [COPYING](COPYING) for more -information or see https://opensource.org/licenses/MIT. - -Development Process -------------------- - -The `master` branch is meant to be stable. Development is normally done in separate branches. -[Tags](https://github.com/dashpay/dash/tags) are created to indicate new official, -stable release versions of Dash Core. - -The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md) -and useful hints for developers can be found in [doc/developer-notes.md](doc/developer-notes.md). - -Testing -------- - -Testing and code review is the bottleneck for development; we get more pull -requests than we can review and test on short notice. Please be patient and help out by testing -other people's pull requests, and remember this is a security-critical project where any mistake might cost people -lots of money. - -### Automated Testing - -Developers are strongly encouraged to write [unit tests](src/test/README.md) for new code, and to -submit new unit tests for old code. Unit tests can be compiled and run -(assuming they weren't disabled in configure) with: `make check`. Further details on running -and extending unit tests can be found in [/src/test/README.md](/src/test/README.md). - -There are also [regression and integration tests](/test), written -in Python, that are run automatically on the build server. -These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py` - -The Travis CI system makes sure that every pull request is built for Windows, Linux, and macOS, and that unit/sanity tests are run automatically. - -### Manual Quality Assurance (QA) Testing - -Changes should be tested by somebody other than the developer who wrote the -code. This is especially important for large or high-risk changes. It is useful -to add a test plan to the pull request description if testing the changes is -not straightforward. - -Translations ------------- - -Changes to translations as well as new translations can be submitted to -[Dash Core's Transifex page](https://www.transifex.com/projects/p/dash/). - -Translations are periodically pulled from Transifex and merged into the git repository. See the -[translation process](doc/translation_process.md) for details on how this works. - -**Important**: We do not accept translation changes as GitHub pull requests because the next -pull from Transifex would automatically overwrite them again. - -Translators should also follow the [forum](https://www.dash.org/forum/topic/dash-worldwide-collaboration.88/). +A From 67038a2c5f6a55a459ffe6418a55a487d6f8f82c Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 15:46:13 +0300 Subject: [PATCH 03/26] confliact --- .github/workflows/confliact.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/confliact.yml diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml new file mode 100644 index 000000000000..4b59e03cf788 --- /dev/null +++ b/.github/workflows/confliact.yml @@ -0,0 +1,47 @@ +name: confliact +on: [pull_request] + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + // Get a list of all issues + // See: https://octokit.github.io/rest.js/#pagination + const opts = github.rest.issues.listForRepo.endpoint.merge({ + ...context.issue, + state: 'open' + }) + const issues = await github.paginate(opts) + + for (const issue of issues) { + if (!issue.pull_request) { + continue + } + + const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ + owner: github.context.repo.owner, + repo: github.context.repo.repo, + pull_number: issue.number, + }) + + const listFilesResponse = await github.paginate(listFilesOptions) + const changedFiles = listFilesResponse.map((f: any) => f.filename) + + core.debug("found changed files:") + for (const file of changedFiles) { + core.debug(" " + file); + } + } + + diff: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + const diff_url = context.payload.pull_request.diff_url + const result = await github.request(diff_url) + console.log(result) From 7580e57ddba6de2cdf61e71ebf0113156ef9da9b Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 15:46:13 +0300 Subject: [PATCH 04/26] confliact --- .github/workflows/confliact.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/confliact.yml diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml new file mode 100644 index 000000000000..9da468b0b4e1 --- /dev/null +++ b/.github/workflows/confliact.yml @@ -0,0 +1,50 @@ +name: confliact +on: [pull_request] + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + // Get a list of all issues + // See: https://octokit.github.io/rest.js/#pagination + const opts = github.rest.issues.listForRepo.endpoint.merge({ + ...context.issue, + state: 'open' + }) + const issues = await github.paginate(opts) + + for (const issue of issues) { + if (!issue.pull_request) { + continue + } + + const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ + owner: github.context.repo.owner, + repo: github.context.repo.repo, + pull_number: issue.number, + }) + + const listFilesResponse = await github.paginate(listFilesOptions) + const changedFiles = listFilesResponse.map(getFilename) + + core.debug("found changed files:") + for (const file of changedFiles) { + core.debug(" " + file); + } + } + + function getFilename(item) { + return item.filename; + } + diff: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + script: | + const diff_url = context.payload.pull_request.diff_url + const result = await github.request(diff_url) + console.log(result) From 056c5306b38e3f780779f69650e1e90a4faaf6d2 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:09:07 +0300 Subject: [PATCH 05/26] Update confliact.yml --- .github/workflows/confliact.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 42a38b14ac08..71c9bf233dfd 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -22,8 +22,7 @@ jobs: } const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ - owner: github.context.repo.owner, - repo: github.context.repo.repo, + ...context.issue, pull_number: issue.number, }) From a61e617a698049c82eb64ed9367ab0ddda6ddaa1 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:11:14 +0300 Subject: [PATCH 06/26] Update confliact.yml --- .github/workflows/confliact.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 71c9bf233dfd..089ae639df61 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -22,16 +22,16 @@ jobs: } const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ - ...context.issue, + ...issue, pull_number: issue.number, }) const listFilesResponse = await github.paginate(listFilesOptions) const changedFiles = listFilesResponse.map(getFilename) - core.debug("found changed files:") + console.log("found changed files:") for (const file of changedFiles) { - core.debug(" " + file); + console.log(" " + file); } } From 627f9f0ee48041dfb8ad24ba4dd49b5f965d4d42 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:13:26 +0300 Subject: [PATCH 07/26] Update confliact.yml --- .github/workflows/confliact.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 089ae639df61..9f697ebc4349 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -22,7 +22,8 @@ jobs: } const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ - ...issue, + owner: issue.repo.owner, + repo: issue.repo.repo, pull_number: issue.number, }) @@ -36,6 +37,7 @@ jobs: } function getFilename(item) { + console.log("item " + item); return item.filename; } From 1b417872d618963ed8f45178113a280b3298ee54 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:15:25 +0300 Subject: [PATCH 08/26] Update confliact.yml --- .github/workflows/confliact.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 9f697ebc4349..22f8ce31082f 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -21,6 +21,7 @@ jobs: continue } + console.log("issue: " + issue) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ owner: issue.repo.owner, repo: issue.repo.repo, From 6666d7b56368048d2ad26b2d11be13a18bddf785 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:18:27 +0300 Subject: [PATCH 09/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 22f8ce31082f..08315c3562cd 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -21,7 +21,7 @@ jobs: continue } - console.log("issue: " + issue) + console.dir("issue: " + issue) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ owner: issue.repo.owner, repo: issue.repo.repo, From 22c1e54ea9fafebbf45289f4a1f8ca2294e211fe Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:22:15 +0300 Subject: [PATCH 10/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 08315c3562cd..69d7515430bf 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -21,7 +21,7 @@ jobs: continue } - console.dir("issue: " + issue) + console.log("issue: " + JSON.stringify(issue)) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ owner: issue.repo.owner, repo: issue.repo.repo, From 06bf99d88dd5dc2c8ae471f0aea404acb48cec90 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:24:34 +0300 Subject: [PATCH 11/26] Update confliact.yml --- .github/workflows/confliact.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 69d7515430bf..66963a0081e1 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -23,8 +23,7 @@ jobs: console.log("issue: " + JSON.stringify(issue)) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ - owner: issue.repo.owner, - repo: issue.repo.repo, + ...context.issue, pull_number: issue.number, }) From 0773e06556208b0a101226eaa512bed35b610fc7 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:25:21 +0300 Subject: [PATCH 12/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 66963a0081e1..6b786ccd6a9a 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -37,7 +37,7 @@ jobs: } function getFilename(item) { - console.log("item " + item); + console.log("item " + JSON.stringify(item)); return item.filename; } From fd87eb1e2423d03936026cf10ab596b0d656bd6e Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:49:42 +0300 Subject: [PATCH 13/26] Update confliact.yml --- .github/workflows/confliact.yml | 34 +++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 6b786ccd6a9a..eea136f3f955 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -21,7 +21,8 @@ jobs: continue } - console.log("issue: " + JSON.stringify(issue)) + // console.log("issue: " + JSON.stringify(issue)) + console.log("pull_request: " + issue.number) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ ...context.issue, pull_number: issue.number, @@ -32,13 +33,38 @@ jobs: console.log("found changed files:") for (const file of changedFiles) { - console.log(" " + file); + console.log(" " + file) + } + for (const issue2 of issues) { + if (!issue2.pull_request || issue.number == issue2.number) { + continue + } + + // console.log("issue2: " + JSON.stringify(issue2)) + console.log("pull_request2: " + issue2.number) + const listFilesOptions2 = github.rest.pulls.listFiles.endpoint.merge({ + ...context.issue, + pull_number: issue2.number, + }) + + const listFilesResponse2 = await github.paginate(listFilesOptions2) + const changedFiles2 = listFilesResponse2.map(getFilename) + + console.log("found changed files:") + for (const file2 of changedFiles2) { + console.log(" " + file2) + } + if (listFilesResponse2.filter(function(el) { + return listFilesResponse.indexOf(el) >= 0 + }).length > 0) { + console.log(issue.number + " conflicts with " + issue2.number) + } } } function getFilename(item) { - console.log("item " + JSON.stringify(item)); - return item.filename; + // console.log("item " + JSON.stringify(item)) + return item.filename } diff: From a83626d85767b5932267e69d9dadbff02b8f4e18 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 16:52:30 +0300 Subject: [PATCH 14/26] Update confliact.yml --- .github/workflows/confliact.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index eea136f3f955..531b7fccf080 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -54,8 +54,8 @@ jobs: for (const file2 of changedFiles2) { console.log(" " + file2) } - if (listFilesResponse2.filter(function(el) { - return listFilesResponse.indexOf(el) >= 0 + if (changedFiles2.filter(function(el) { + return changedFiles.indexOf(el) >= 0 }).length > 0) { console.log(issue.number + " conflicts with " + issue2.number) } From 249e3f7f47b8f08af14d19bbefdc9e3f72ba9911 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 17:43:52 +0300 Subject: [PATCH 15/26] Update confliact.yml --- .github/workflows/confliact.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 531b7fccf080..917a1c18d8c9 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -2,7 +2,7 @@ name: confliact on: [pull_request] jobs: - welcome: + check: runs-on: ubuntu-latest steps: - uses: actions/github-script@v5 @@ -12,6 +12,7 @@ jobs: // See: https://octokit.github.io/rest.js/#pagination const opts = github.rest.issues.listForRepo.endpoint.merge({ ...context.issue, + pulls: true, state: 'open' }) const issues = await github.paginate(opts) @@ -35,6 +36,13 @@ jobs: for (const file of changedFiles) { console.log(" " + file) } + + const { data: pullRequest } = await github.rest.pulls.get({ + ...context.issue, + pull_number: issue.number, + }) + console.log("pr: " + JSON.stringify(pullRequest)) + for (const issue2 of issues) { if (!issue2.pull_request || issue.number == issue2.number) { continue @@ -54,10 +62,22 @@ jobs: for (const file2 of changedFiles2) { console.log(" " + file2) } + + const { data: pullRequest2 } = await github.rest.pulls.get({ + ...context.issue, + pull_number: issue2.number, + }) + console.log("pr2: " + JSON.stringify(pullRequest2)) + if (changedFiles2.filter(function(el) { return changedFiles.indexOf(el) >= 0 }).length > 0) { console.log(issue.number + " conflicts with " + issue2.number) + // TODO: fetch and check magic url + // `https://github.com/${context.issue.owner}/${context.issue.repo}/branches/pre_mergeable/a-test-conflicts...c-test-conflicts` + // const diff_url = context.payload.pull_request.diff_url + // const result = await github.request(diff_url) + // console.log(result) } } } @@ -66,13 +86,3 @@ jobs: // console.log("item " + JSON.stringify(item)) return item.filename } - - diff: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v5 - with: - script: | - const diff_url = context.payload.pull_request.diff_url - const result = await github.request(diff_url) - console.log(result) From 5baa6a3360f18072b2128fa8579911a407f5ac09 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 17:54:52 +0300 Subject: [PATCH 16/26] Update confliact.yml --- .github/workflows/confliact.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 917a1c18d8c9..cb03c27681e7 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -18,10 +18,6 @@ jobs: const issues = await github.paginate(opts) for (const issue of issues) { - if (!issue.pull_request) { - continue - } - // console.log("issue: " + JSON.stringify(issue)) console.log("pull_request: " + issue.number) const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ @@ -41,10 +37,10 @@ jobs: ...context.issue, pull_number: issue.number, }) - console.log("pr: " + JSON.stringify(pullRequest)) + // console.log("pr: " + JSON.stringify(pullRequest)) for (const issue2 of issues) { - if (!issue2.pull_request || issue.number == issue2.number) { + if (issue.number == issue2.number) { continue } @@ -67,17 +63,17 @@ jobs: ...context.issue, pull_number: issue2.number, }) - console.log("pr2: " + JSON.stringify(pullRequest2)) + // console.log("pr2: " + JSON.stringify(pullRequest2)) if (changedFiles2.filter(function(el) { return changedFiles.indexOf(el) >= 0 }).length > 0) { console.log(issue.number + " conflicts with " + issue2.number) // TODO: fetch and check magic url - // `https://github.com/${context.issue.owner}/${context.issue.repo}/branches/pre_mergeable/a-test-conflicts...c-test-conflicts` - // const diff_url = context.payload.pull_request.diff_url - // const result = await github.request(diff_url) - // console.log(result) + const magic_url = "https://github.com/${context.issue.owner}/${context.issue.repo}/branches/pre_mergeable/${pullRequest.head.label}...${pullRequest2.head.label}" + console.log(magic_url) + const result = await github.request(magic_url) + console.log(result) } } } From 7fc0570ba75106f6e17ca3e43cf242c2a02128ca Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:01:01 +0300 Subject: [PATCH 17/26] Update confliact.yml --- .github/workflows/confliact.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index cb03c27681e7..755b6e031f79 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -18,8 +18,12 @@ jobs: const issues = await github.paginate(opts) for (const issue of issues) { + if (!issue.pull_request) { + continue + } // console.log("issue: " + JSON.stringify(issue)) console.log("pull_request: " + issue.number) + // Get a list of all files for a specific pull request const listFilesOptions = github.rest.pulls.listFiles.endpoint.merge({ ...context.issue, pull_number: issue.number, @@ -33,6 +37,7 @@ jobs: console.log(" " + file) } + // pull extra data for this pull request const { data: pullRequest } = await github.rest.pulls.get({ ...context.issue, pull_number: issue.number, @@ -40,7 +45,7 @@ jobs: // console.log("pr: " + JSON.stringify(pullRequest)) for (const issue2 of issues) { - if (issue.number == issue2.number) { + if (!issue.pull_request || issue.number == issue2.number) { continue } From 541fdf3cf4fc58be3a54748ab5e7ee999f85dc20 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:02:38 +0300 Subject: [PATCH 18/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 755b6e031f79..5f995ad438ac 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -45,7 +45,7 @@ jobs: // console.log("pr: " + JSON.stringify(pullRequest)) for (const issue2 of issues) { - if (!issue.pull_request || issue.number == issue2.number) { + if (!issue2.pull_request || issue.number == issue2.number) { continue } From 2b211f4bbcbc41a3e79633c050521eef2ba867e2 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:04:28 +0300 Subject: [PATCH 19/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 5f995ad438ac..39a17b6ea0c6 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -75,7 +75,7 @@ jobs: }).length > 0) { console.log(issue.number + " conflicts with " + issue2.number) // TODO: fetch and check magic url - const magic_url = "https://github.com/${context.issue.owner}/${context.issue.repo}/branches/pre_mergeable/${pullRequest.head.label}...${pullRequest2.head.label}" + const magic_url = "https://github.com/" + context.issue.owner + "/" + context.issue.repo + "/branches/pre_mergeable/" +pullRequest.head.label + "..." + pullRequest2.head.label console.log(magic_url) const result = await github.request(magic_url) console.log(result) From d2b221c3d7bce2ed78003c90e6fd31860d2b7b39 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:22:23 +0300 Subject: [PATCH 20/26] Update confliact.yml --- .github/workflows/confliact.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 39a17b6ea0c6..d4e2de4903c8 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -73,11 +73,15 @@ jobs: if (changedFiles2.filter(function(el) { return changedFiles.indexOf(el) >= 0 }).length > 0) { - console.log(issue.number + " conflicts with " + issue2.number) + console.log("potential conflict: " + issue.number + " vs " + issue2.number) // TODO: fetch and check magic url const magic_url = "https://github.com/" + context.issue.owner + "/" + context.issue.repo + "/branches/pre_mergeable/" +pullRequest.head.label + "..." + pullRequest2.head.label console.log(magic_url) - const result = await github.request(magic_url) + const result = await github.request(magic_url, { + headers: { + accept: "text/html" + } + }) console.log(result) } } From 7a786980ca7c59c0634366e64fed2ded6045d240 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:27:31 +0300 Subject: [PATCH 21/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index d4e2de4903c8..70ffb10fb851 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -79,7 +79,7 @@ jobs: console.log(magic_url) const result = await github.request(magic_url, { headers: { - accept: "text/html" + accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" } }) console.log(result) From 11f25d12a31de4b5a1a42784f492eb6f8e4c2c62 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:34:46 +0300 Subject: [PATCH 22/26] Update confliact.yml --- .github/workflows/confliact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 70ffb10fb851..d4e2de4903c8 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -79,7 +79,7 @@ jobs: console.log(magic_url) const result = await github.request(magic_url, { headers: { - accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" + accept: "text/html" } }) console.log(result) From d748c76190c645e359bb012e51fc4f4eee6fbc2f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:51:55 +0300 Subject: [PATCH 23/26] Update confliact.yml --- .github/workflows/confliact.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index d4e2de4903c8..da921ed180c4 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -77,10 +77,16 @@ jobs: // TODO: fetch and check magic url const magic_url = "https://github.com/" + context.issue.owner + "/" + context.issue.repo + "/branches/pre_mergeable/" +pullRequest.head.label + "..." + pullRequest2.head.label console.log(magic_url) - const result = await github.request(magic_url, { + // const result = await github.request(magic_url, { + const result = await github.request("GET /{owner}/{repo}/branches/pre_mergeable/{head1}..{head2}", { + baseUrl: "https://github.com", + head1: pullRequest.head.label, + head2: pullRequest2.head.label, headers: { accept: "text/html" - } + }, + owner: context.issue.owner, + repo: context.issue.repo, }) console.log(result) } From 878ff4f04dd5acd8c7e1109da7e7d1d7db45930f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 18:57:27 +0300 Subject: [PATCH 24/26] Update confliact.yml --- .github/workflows/confliact.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index da921ed180c4..1e2ef39e1b41 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -83,7 +83,8 @@ jobs: head1: pullRequest.head.label, head2: pullRequest2.head.label, headers: { - accept: "text/html" + accept: 'text/html', + 'user-agent': 'confliact', }, owner: context.issue.owner, repo: context.issue.repo, From de60a514304f424c49d9bdb8e22feb9d56c13e73 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 19:05:32 +0300 Subject: [PATCH 25/26] Update confliact.yml --- .github/workflows/confliact.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index 1e2ef39e1b41..b98d0e5b6499 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -83,8 +83,9 @@ jobs: head1: pullRequest.head.label, head2: pullRequest2.head.label, headers: { - accept: 'text/html', - 'user-agent': 'confliact', + accept: "text/html;charset=utf-8", + "content-type": "text/plain", + "user-agent": "confliact", }, owner: context.issue.owner, repo: context.issue.repo, From a3fb20575da8b98de07839cee6077a8cf9d49394 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 31 Dec 2021 19:16:55 +0300 Subject: [PATCH 26/26] Update confliact.yml --- .github/workflows/confliact.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/confliact.yml b/.github/workflows/confliact.yml index b98d0e5b6499..bd602a90ef1c 100644 --- a/.github/workflows/confliact.yml +++ b/.github/workflows/confliact.yml @@ -83,8 +83,7 @@ jobs: head1: pullRequest.head.label, head2: pullRequest2.head.label, headers: { - accept: "text/html;charset=utf-8", - "content-type": "text/plain", + "accept": "text/html;charset=utf-8", "user-agent": "confliact", }, owner: context.issue.owner,