Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 64 additions & 16 deletions .github/workflows/confliact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: confliact
on: [pull_request]

jobs:
welcome:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v5
Expand All @@ -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)
Expand All @@ -20,8 +21,9 @@ jobs:
if (!issue.pull_request) {
continue
}

console.log("issue: " + JSON.stringify(issue))
// 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,
Expand All @@ -32,21 +34,67 @@ jobs:

console.log("found changed files:")
for (const file of changedFiles) {
console.log(" " + file);
console.log(" " + file)
}

// pull extra data for this pull request
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
}

// 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)
}

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("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("GET /{owner}/{repo}/branches/pre_mergeable/{head1}..{head2}", {
baseUrl: "https://github.com",
head1: pullRequest.head.label,
head2: pullRequest2.head.label,
headers: {
"accept": "text/html;charset=utf-8",
"user-agent": "confliact",
},
owner: context.issue.owner,
repo: context.issue.repo,
})
console.log(result)
}
}
}

function getFilename(item) {
console.log("item " + JSON.stringify(item));
return item.filename;
// 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)
81 changes: 1 addition & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -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