-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
290 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
.github/ISSUE_TEMPLATE/recommendation-20-maintenance-request .md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Recommendation 20 Maintenance Request | ||
about: This issue template allows to raise a maintenance requestion for Recommendation | ||
20 Code List | ||
title: "[Rec20 MR]" | ||
labels: MR, Rec-20 | ||
assignees: kshychko | ||
|
||
--- | ||
## Maintenance Request details | ||
<!-- Please describe the details of the maintenance request you are raising including the reason --> | ||
Status: | ||
Common Code: | ||
Name: | ||
Description: | ||
Level/Category: | ||
Symbol: | ||
Conversion Factor | ||
|
||
|
||
Reason: | ||
|
||
## Related Pull Request | ||
<!-- Add a reference to a corresponding Pull Request --> | ||
PR #{PR_number} | ||
|
||
## Additional context | ||
<!-- Add any other context or screenshots about the feature request here --> | ||
|
||
### Mentions: | ||
<!--- Keep maintainers team mentioned and add more mentions if needed --> | ||
|
||
@uncefact/vocab-codes-maintainers |
31 changes: 31 additions & 0 deletions
31
.github/ISSUE_TEMPLATE/recommendation-21-maintenance-request.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Recommendation 21 Maintenance Request | ||
about: This issue template allows to raise a maintenance requestion for Recommendation | ||
21 Code List | ||
title: "[Rec21 MR]" | ||
labels: MR, Rec-21 | ||
assignees: kshychko | ||
|
||
--- | ||
## Maintenance Request details | ||
<!-- Please describe the details of the maintenance request you are raising including the reason --> | ||
Status: | ||
Code: | ||
Name: | ||
Description: | ||
Numeric code: | ||
|
||
|
||
Reason: | ||
|
||
## Related Pull Request | ||
<!-- Add a reference to a corresponding Pull Request --> | ||
PR #{PR_number} | ||
|
||
## Additional context | ||
<!-- Add any other context or screenshots about the feature request here --> | ||
|
||
### Mentions: | ||
<!--- Keep maintainers team mentioned and add more mentions if needed --> | ||
|
||
@uncefact/vocab-codes-maintainers |
31 changes: 31 additions & 0 deletions
31
.github/ISSUE_TEMPLATE/recommendation-23-maintenance-request.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Recommendation 23 Maintenance Request | ||
about: This issue template allows to raise a maintenance requestion for Recommendation | ||
23 Code List | ||
title: "[Rec23 MR]" | ||
labels: MR, Rec-23 | ||
assignees: kshychko | ||
|
||
--- | ||
## Maintenance Request details | ||
<!-- Please describe the details of the maintenance request you are raising including the reason --> | ||
CI: | ||
Group: | ||
Subgroup: | ||
Detail: | ||
Description: | ||
Mode/Site Indicator: | ||
Duplicate Indicator: | ||
|
||
Reason: | ||
|
||
## Related Pull Request | ||
<!-- Add a reference to a corresponding Pull Request --> | ||
PR #{PR_number} | ||
|
||
## Additional context | ||
<!-- Add any other context or screenshots about the feature request here --> | ||
|
||
### Mentions: | ||
<!--- Keep maintainers team mentioned and add more mentions if needed --> | ||
@uncefact/vocab-codes-maintainers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ CI: | |
Code: | ||
Name: | ||
Description: | ||
|
||
|
||
Reason: | ||
|
||
## Related Pull Request | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Diff code list 20 | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'CLR/Rec20/current/Annex || & Annex |||/code-list.csv' | ||
|
||
jobs: | ||
diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out this repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ github.event.pull_request.number }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Python dependencies | ||
run: |- | ||
pip install csv-diff | ||
- name: Fetch latest data | ||
run: |- | ||
cp "CLR/Rec20/current/Annex || & Annex |||/code-list.csv" code-list-new.csv | ||
curl -o code-list-old.csv "https://raw.githubusercontent.com/uncefact/vocab-codes/main/CLR/Rec20/current/code-list.csv" | ||
# Remove heading line and use it to start a new file | ||
## todo: check if need sorting, simple sort isn't working because CI is the first column | ||
#head -n 1 code-list-new.csv > code-list-new-sorted.csv | ||
## Sort all but the first line and append to that file | ||
#tail -n +2 "code-list-new.csv" | sort >> code-list-new-sorted.csv | ||
# Generate commit message using csv-diff | ||
csv-diff code-list-old.csv code-list-new.csv --key=Code --singular=record --plural=records > message.txt | ||
cat message.txt | ||
# todo: add check for message.txt content | ||
#mv code-list-new.csv "CRL/Rec20/current/Annex || & Annex |||/code-list.csv" | ||
- name: Set variables | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
run: | | ||
MSG=$(cat message.txt) | ||
echo "MESSAGE=$MSG" >> $GITHUB_ENV | ||
- name: Comment a pull_request | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
uses: mb2dev/[email protected] | ||
with: | ||
message: | | ||
message: | ||
${{ env.MESSAGE }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit and push if it changed | ||
run: |- | ||
git config user.name "Automated" | ||
git config user.email "[email protected]" | ||
git add "CLR/Rec20/current/" | ||
timestamp=$(date -u) | ||
git commit -F message.txt || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Diff code list 21 | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'CLR/Rec21/current/code-list.csv' | ||
|
||
jobs: | ||
diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out this repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ github.event.pull_request.number }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Python dependencies | ||
run: |- | ||
pip install csv-diff | ||
- name: Fetch latest data | ||
run: |- | ||
cp "CLR/Rec21/current/code-list.csv" code-list-new.csv | ||
curl -o code-list-old.csv "https://raw.githubusercontent.com/uncefact/vocab-codes/main/CLR/Rec21/current/code-list.csv" | ||
# Remove heading line and use it to start a new file | ||
## todo: check if need sorting, simple sort isn't working because CI is the first column | ||
#head -n 1 code-list-new.csv > code-list-new-sorted.csv | ||
## Sort all but the first line and append to that file | ||
#tail -n +2 "code-list-new.csv" | sort >> code-list-new-sorted.csv | ||
# Generate commit message using csv-diff | ||
csv-diff code-list-old.csv code-list-new.csv --key=Code --singular=record --plural=records > message.txt | ||
cat message.txt | ||
# todo: add check for message.txt content | ||
#mv code-list-new.csv "CRL/Rec21/current/code-list.csv" | ||
- name: Set variables | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
run: | | ||
MSG=$(cat message.txt) | ||
echo "MESSAGE=$MSG" >> $GITHUB_ENV | ||
- name: Comment a pull_request | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
uses: mb2dev/[email protected] | ||
with: | ||
message: | | ||
message: | ||
${{ env.MESSAGE }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit and push if it changed | ||
run: |- | ||
git config user.name "Automated" | ||
git config user.email "[email protected]" | ||
git add "CLR/Rec21/current/code-list.csv" | ||
timestamp=$(date -u) | ||
git commit -F message.txt || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Diff code list 23 | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'CLR/Rec23/current/code-list.csv' | ||
|
||
jobs: | ||
diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out this repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ github.event.pull_request.number }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Python dependencies | ||
run: |- | ||
pip install csv-diff | ||
- name: Fetch latest data | ||
run: |- | ||
cp "CLR/Rec23/current/code-list.csv" code-list-new.csv | ||
curl -o code-list-old.csv "https://raw.githubusercontent.com/uncefact/vocab-codes/main/CLR/Rec23/current/code-list.csv" | ||
# Remove heading line and use it to start a new file | ||
## todo: check if need sorting, simple sort isn't working because CI is the first column | ||
#head -n 1 code-list-new.csv > code-list-new-sorted.csv | ||
## Sort all but the first line and append to that file | ||
#tail -n +2 "code-list-new.csv" | sort >> code-list-new-sorted.csv | ||
# Generate commit message using csv-diff | ||
csv-diff code-list-old.csv code-list-new.csv --key=Code --singular=record --plural=records > message.txt | ||
cat message.txt | ||
# todo: add check for message.txt content | ||
#mv code-list-new.csv "CRL/Rec23/current/code-list.csv" | ||
- name: Set variables | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
run: | | ||
MSG=$(cat message.txt) | ||
echo "MESSAGE=$MSG" >> $GITHUB_ENV | ||
- name: Comment a pull_request | ||
if: ${{ hashFiles('message.txt') != '' }} | ||
uses: mb2dev/[email protected] | ||
with: | ||
message: | | ||
message: | ||
${{ env.MESSAGE }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit and push if it changed | ||
run: |- | ||
git config user.name "Automated" | ||
git config user.email "[email protected]" | ||
git add "CLR/Rec23/current/code-list.csv" | ||
timestamp=$(date -u) | ||
git commit -F message.txt || exit 0 | ||
git push |