first commit
This commit is contained in:
103
.github/ISSUE_TEMPLATE/0-enhancement.yaml
vendored
Normal file
103
.github/ISSUE_TEMPLATE/0-enhancement.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
name: Add support of a missing OSM tag
|
||||
description: This requests an OSM tag to be added to the tagging schema in the form of a new preset, field or value.
|
||||
# title: ''
|
||||
labels: enhancement
|
||||
# assignees: ''
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this request to add a new tag to the tagging schema.
|
||||
- type: input
|
||||
attributes:
|
||||
label: OSM Tag(s)
|
||||
description: Please list the tag or tags which you would like to see included.
|
||||
placeholder: tourism=camp_site
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: How would you like this tag to see supported?
|
||||
description: 'A tag can be supported in different ways: A preset, a field or a option in a dropdown field.'
|
||||
options:
|
||||
- As a Preset
|
||||
- As a Field
|
||||
- As an Option of a Field
|
||||
- Other (please indicate below)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Label
|
||||
description: The title/name/label of the preset, field or field option (preferably in American English).
|
||||
placeholder: Campground
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Aliases
|
||||
description: 'Only for Presets: Synonyms of the name of the preset.'
|
||||
placeholder: Campsite
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Terms
|
||||
description: 'Only for Presets and Fields: Synonyms of the name of the preset.'
|
||||
placeholder: Camping, Tenting, Camp Site, Caravans, …
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Link to OSM Wiki page
|
||||
description: Link to the documentation of this tag on the OSM wiki.
|
||||
placeholder: https://wiki.openstreetmap.org/wiki/Tag:tourism=camp_site
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Status of the Tag
|
||||
description: The status of the tag(s) according to the OSM wiki.
|
||||
options:
|
||||
- Approved
|
||||
- De Facto
|
||||
- In Use
|
||||
- Unspecified / Unknown
|
||||
- Voting
|
||||
- Abandoned
|
||||
- Deprecated
|
||||
- Discardable
|
||||
- Draft
|
||||
- Imported
|
||||
- Obsolete
|
||||
- Proposed
|
||||
- Rejected
|
||||
- Other (please indicate below)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Usage of the tag
|
||||
description: How many OSM object exist currently which use the tag?
|
||||
placeholder: '126,000'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Replaces other Tag?
|
||||
description: Does this tag replace a different one which is already supported by the tagging schema?
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Regional Tag?
|
||||
description: Should this tag only be available in a specific region or country?
|
||||
placeholder: global
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Further Information
|
||||
description: Please add further details about this tag which should be considered. For example, include a link to taginfo, taghistory or to an overpass query, add a list tools which support this tag, etc.
|
||||
validations:
|
||||
required: false
|
||||
24
.github/ISSUE_TEMPLATE/1-bug.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/1-bug.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. …
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
37
.github/ISSUE_TEMPLATE/2-deprecating.yaml
vendored
Normal file
37
.github/ISSUE_TEMPLATE/2-deprecating.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Add a New Deprecation Rule
|
||||
description: This requests an OSM tag to be added to list of deprecated tags.
|
||||
# title: ''
|
||||
labels: deprecating
|
||||
# assignees: ''
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this request to enhance the tagging schema.
|
||||
- type: input
|
||||
attributes:
|
||||
label: Deprecated OSM Tag(s)
|
||||
description: Please list the tag(s) which are to be included in the list of deprecation rules.
|
||||
placeholder: highway=ford
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Replacement OSM Tag(s)
|
||||
description: Please list by which tag(s) the deprecated tag(s) should be replaced with.
|
||||
placeholder: ford=yes
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Link to OSM Wiki page
|
||||
description: Link to the OSM wiki where the deprecation of the tag(s) is documented.
|
||||
placeholder: https://wiki.openstreetmap.org/wiki/Deprecated_features
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Further Information
|
||||
description: Please add further details about this tag. For example, include a link to taginfo, taghistory or to an overpass query.
|
||||
validations:
|
||||
required: false
|
||||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
49
.github/workflows/build-preview.yml
vendored
Normal file
49
.github/workflows/build-preview.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Build Preview
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-preview:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm clean-install
|
||||
- run: npm run dist
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openstreetmap/iD
|
||||
path: './iD'
|
||||
- run: npm clean-install
|
||||
working-directory: './iD'
|
||||
- run: npm run all
|
||||
working-directory: './iD'
|
||||
env:
|
||||
ID_PRESETS_CDN_URL: '../../'
|
||||
- run: npm run dist
|
||||
working-directory: './iD'
|
||||
env:
|
||||
ID_PRESETS_CDN_URL: '../../'
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: preview
|
||||
path: |
|
||||
dist
|
||||
iD/dist
|
||||
|
||||
- name: Store pull request number for later use
|
||||
run: |
|
||||
echo ${{github.event.number}} > ./pr_number
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pr
|
||||
path: ./pr_number
|
||||
107
.github/workflows/deploy-preview.yml
vendored
Normal file
107
.github/workflows/deploy-preview.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
name: Deploy Preview
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Preview"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
deploy-preview:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'}}
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
- run: npm install --global netlify-cli@6
|
||||
- run: npm install unzipper@0.10
|
||||
|
||||
- name: Get pull request number
|
||||
uses: actions/github-script@v6
|
||||
id: pull-request-number
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const unzipper = require('unzipper');
|
||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{github.event.workflow_run.id}}
|
||||
});
|
||||
const artifact = artifacts.data.artifacts.filter(
|
||||
artifact => artifact.name === 'pr'
|
||||
)[0];
|
||||
if (!artifact) {
|
||||
throw new Error('No "pr" artifact found');
|
||||
}
|
||||
const download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: artifact.id,
|
||||
archive_format: 'zip'
|
||||
});
|
||||
const directory = await unzipper.Open.buffer(Buffer.from(download.data));
|
||||
const file = directory.files.find(d => d.path === 'pr_number');
|
||||
const content = await file.buffer();
|
||||
return content.toString();
|
||||
- uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||
workflow: build-preview.yml
|
||||
pr: ${{steps.pull-request-number.outputs.result}}
|
||||
name: preview
|
||||
|
||||
- name: Deploy to Netlify
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{secrets.NETLIFY_AUTH_TOKEN}}
|
||||
NETLIFY_SITE_ID: ${{secrets.NETLIFY_SITE_ID}}
|
||||
run: netlify deploy --dir=. --alias=pr-${{steps.pull-request-number.outputs.result}}
|
||||
|
||||
- name: Add comment to pull request
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const pullRequestNumber = parseInt(${{steps.pull-request-number.outputs.result}}, 10);
|
||||
const start = ':bento:';
|
||||
const author = 'github-actions[bot]';
|
||||
const comments = await github.rest.issues.listComments({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: pullRequestNumber
|
||||
});
|
||||
const commentExists = comments.data.some(
|
||||
comment => comment.user.login === author && comment.body.startsWith(start)
|
||||
);
|
||||
if (!commentExists) {
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: pullRequestNumber,
|
||||
body: `${start} You can preview the tagging presets of this pull request [here](https://pr-${pullRequestNumber}--ideditor-presets-preview.netlify.app/id/dist/#locale=en).`
|
||||
});
|
||||
} else {
|
||||
console.log(`Preview URL comment already added to PR #${pullRequestNumber}`);
|
||||
}
|
||||
|
||||
- name: Clean up artifact
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{github.event.workflow_run.id}}
|
||||
});
|
||||
const artifact = artifacts.data.artifacts.filter(
|
||||
artifact => artifact.name === 'preview'
|
||||
)[0];
|
||||
if (!artifact) {
|
||||
throw new Error('No "preview" artifact found');
|
||||
}
|
||||
await github.rest.actions.deleteArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: artifact.id
|
||||
});
|
||||
38
.github/workflows/deploy.yml
vendored
Normal file
38
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Deploy
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'Deploy') && github.repository == 'openstreetmap/id-tagging-schema'"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3 # If you're using actions/checkout@v3 you must set persist-credentials to false in most cases for the deployment to work correctly.
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm clean-install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||
with:
|
||||
BRANCH: main # The branch the action should deploy to.
|
||||
FOLDER: . # The folder the action should deploy.
|
||||
CLEAN: false # Automatically remove deleted files from the deploy branch
|
||||
40
.github/workflows/lint.yml
vendored
Normal file
40
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Code Style Checks
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
lint:
|
||||
name: Check file endings
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
notJSONs=`find data/ -type f -not -iname "*.json"`
|
||||
for f in $notJSONs
|
||||
do
|
||||
echo "::error file=$f::File $f is not a .json file."
|
||||
done
|
||||
if [ ! -z "$notJSONs" ]; then exit 1; fi
|
||||
|
||||
prettier:
|
||||
name: Check for code formatting mistakes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm clean-install
|
||||
- run: 'for f in `find data/ -type f -not -iname "*.json"`; do echo "::error File $f is not a .json file."; done'
|
||||
- run: npm run lint
|
||||
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
skip: ./.git,./dist,./data/deprecated.json
|
||||
ignore_words_list: "auxilary,casette,cemetary,chancel,discus,extentions,faiway,generat,goverment,guerilla,guyser,kindergarden,ore,pavillion,sculpter,storys,linz,te"
|
||||
only_warn: 1
|
||||
|
||||
27
.github/workflows/test.yml
vendored
Normal file
27
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# This workflow will do a clean install of node dependencies and run tests across different versions of node.
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: ['18']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm clean-install
|
||||
- run: npm run test
|
||||
Reference in New Issue
Block a user