Skip to content

Commit fe8c168

Browse files
authored
Merge branch 'tapanito/vault-enhanced' into tapanito/vault-block-deposit
2 parents fcf415f + 3a1afbc commit fe8c168

File tree

20 files changed

+5953
-1031
lines changed

20 files changed

+5953
-1031
lines changed

.github/scripts/assign_xls_number.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def find_draft_xls_files(changed_files: list[str]) -> list[str]:
6363
Returns:
6464
List of draft XLS directory names (e.g., ["XLS-draft-my-feature"])
6565
"""
66-
draft_pattern = re.compile(r"^(XLS-draft-[^/]+)/README\.md$")
66+
draft_pattern = re.compile(r"^((XLS|xls)-draft[^/]+)/README\.md$")
6767
drafts = []
6868

6969
for file_path in changed_files:
@@ -76,9 +76,15 @@ def find_draft_xls_files(changed_files: list[str]) -> list[str]:
7676

7777
def main():
7878
"""Main entry point for the script."""
79-
# Get repository root (parent of .github directory)
80-
script_dir = Path(__file__).resolve().parent
81-
repo_root = script_dir.parent.parent
79+
# Get repository root from environment variable (set by GitHub Actions)
80+
# or fall back to calculating from script location
81+
repo_root_env = os.environ.get("REPO_ROOT")
82+
if repo_root_env:
83+
repo_root = Path(repo_root_env)
84+
else:
85+
# Fallback: parent of .github directory
86+
script_dir = Path(__file__).resolve().parent
87+
repo_root = script_dir.parent.parent
8288

8389
# Get changed files from command line arguments or environment variable
8490
if len(sys.argv) > 1:
@@ -121,7 +127,7 @@ def set_github_output(name: str, value: str):
121127

122128
for draft_dir in sorted(draft_dirs):
123129
assigned_number = next_number
124-
new_dir_name = re.sub(r"^XLS-draft-", f"XLS-{assigned_number:04d}-", draft_dir)
130+
new_dir_name = re.sub(r"^xls-draft-", f"xls-{assigned_number:04d}-", draft_dir.lower())
125131
assignments.append({
126132
"draft": draft_dir,
127133
"number": assigned_number,
@@ -143,7 +149,7 @@ def set_github_output(name: str, value: str):
143149

144150
# For single draft case, also output individual values for easy access
145151
if len(assignments) == 1:
146-
set_github_output("xls_number", f"{assignments[0]['number']:04d}")
152+
set_github_output("xls_number", f"{assignments[0]['number']}")
147153
set_github_output("draft_dir", assignments[0]['draft'])
148154
set_github_output("new_dir_name", assignments[0]['new_name'])
149155

.github/workflows/assign-xls-number.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
11
name: Assign XLS Number
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, ready_for_review]
66

77
jobs:
88
assign-xls-number:
99
runs-on: ubuntu-latest
1010
name: Assign XLS Number to Draft
1111
permissions:
1212
pull-requests: write
13+
issues: write
1314
contents: read
1415

1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@v6
1819
with:
1920
fetch-depth: 0
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
23+
- name: Checkout script from base branch
24+
uses: actions/checkout@v6
25+
with:
26+
ref: ${{ github.event.pull_request.base.ref }}
27+
sparse-checkout: |
28+
.github/scripts/assign_xls_number.py
29+
sparse-checkout-cone-mode: false
30+
path: base-repo
2031

2132
- name: Get added files
2233
id: added-files
2334
uses: tj-actions/changed-files@v47
2435
with:
2536
files: |
26-
XLS-draft-*/README.md
27-
xls-draft-*/README.md
37+
XLS-draft*/README.md
38+
xls-draft*/README.md
2839
# Only look at added files, not modified ones
2940
include_all_old_new_renamed_files: false
3041

@@ -51,9 +62,11 @@ jobs:
5162
- name: Assign XLS number
5263
if: steps.check-drafts.outputs.has_drafts == 'true'
5364
id: assign-number
65+
env:
66+
REPO_ROOT: ${{ github.workspace }}
5467
run: |
5568
echo ${{ steps.check-drafts.outputs.draft_files }}
56-
python .github/scripts/assign_xls_number.py ${{ steps.check-drafts.outputs.draft_files }}
69+
python base-repo/.github/scripts/assign_xls_number.py ${{ steps.check-drafts.outputs.draft_files }}
5770
5871
- name: Check for existing assignment comment
5972
if: steps.check-drafts.outputs.has_drafts == 'true'

.github/workflows/discussions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read # Required to checkout the repository
1111

1212
env:
13-
STALE_DAYS: 730 # Number of days without updates to consider a discussion stale (2 years)
13+
STALE_DAYS: 550 # Number of days without updates to consider a discussion stale (1.5 years)
1414
WARNING_DAYS: 30 # Number of days to wait after warning before closing
1515
WARNING_MESSAGE:
1616
| # note: the marker is necessary for the script and should not be removed

XLS-0008-tickets/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
created: 2020-03-01
77
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/23
88
status: Withdrawn
9+
withdrawal-reason: Superseded by XLS-13
910
category: Amendment
1011
</pre>
1112

XLS-0010-non-transferable-tokens/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<pre>
22
xls: 10
33
title: Non-Transferable Token (NTT) standard
4+
description: A standard for non-transferable tokens on the XRP Ledger
45
author: RichardAH (@RichardAH)
56
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/20
67
created: 2020-04-05

XLS-0015-concise-tx-id/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
created: 2021-03-09
77
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/34
88
status: Withdrawn
9+
withdrawal-reason: Superseded by XLS-37
910
category: System
1011
</pre>
1112

XLS-0016-nft-metadata/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<pre>
2-
xls: 16
3-
title: NFT Metadata
4-
author: Hubert Getrouw (@HubertG97)
5-
created: 2021-03-17
6-
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/37
7-
status: Stagnant
8-
category: Ecosystem
2+
xls: 16
3+
title: NFT Metadata
4+
description: Standard for NFT metadata
5+
author: Hubert Getrouw (@HubertG97)
6+
created: 2021-03-17
7+
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/37
8+
status: Stagnant
9+
category: Ecosystem
910
</pre>
1011

1112
In addition to @WietseWind 's [XLS-14](https://github.com/XRPLF/XRPL-Standards/discussions/30) and @RichardAH 's proposal [XLS-15](../XLS-0015-concise-tx-id/README.md) here is a proposal to create a standard for the creation of metadata for the tokens created with a CTI in the currency code.

XLS-0017-xfl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<pre>
22
xls: 17
33
title: XFL Developer-friendly representation of XRPL balances
4-
descrption: Introduces developer-friendly representation of XRPL balances.
4+
description: Introduces developer-friendly representation of XRPL balances.
55
author: RichardAH (@RichardAH)
66
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/39
77
created: 2021-03-19

XLS-0051-nftoken-escrow/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<pre>
22
xls: 51
33
title: NFToken Escrows
4+
description: Extension to Escrow functionality to support escrowing NFTokens
45
author: Mayukha Vadari (@mvadari)
5-
created: 2023-11-17
66
proposal-from: https://github.com/XRPLF/XRPL-Standards/discussions/146
77
status: Stagnant
88
category: Amendment
9+
created: 2023-11-17
910
</pre>
1011

1112
# NFToken Escrows

0 commit comments

Comments
 (0)