Skip to content

Commit

Permalink
Merge pull request #1 from mapping-commons/add-basic-use-case-system
Browse files Browse the repository at this point in the history
Add basic system for collecting use cases and adding them to the docs
  • Loading branch information
matentzn authored Nov 12, 2024
2 parents 6743308 + 3d6731a commit 0265f07
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/use-case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: FAIR Mappings Use Case submission
description: Use this template to submit a FAIR Mappings Use Case for the RDA FAIR Mappings Working Group.
title: FAIR Mappings Use Case submission
labels: [ use-case ]
assignees: jkesanie
body:
- type: markdown
attributes:
value: |
Some instructions for the submission.
- type: input
id: use-case-title
attributes:
label: The title of your use case
description: A short but descriptive title that describes your use case.
validations:
required: true
- type: textarea
id: comments
attributes:
label: Additional comments
description: |
Please provide any additional comments here.
validations:
required: false
38 changes: 38 additions & 0 deletions .github/workflows/use-case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create Use Case Documentation

on:
issues:
types: [opened]

jobs:
generate-use-case:
if: contains(github.event.issue.labels.*.name, 'use-case')
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Extract Issue Data
id: extract_data
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
ISSUE_NUMBER="${{ github.event.issue.number }}"
FILE_NAME="use-case-${{ github.event.issue.number }}".md
# Create the markdown file
echo "# $ISSUE_TITLE" > "docs/use-cases/$FILE_NAME"
echo "" >> "docs/use-cases/$FILE_NAME"
echo "${{ github.event.issue.body }}" >> "docs/use-cases/$FILE_NAME"
- name: Create Pull Request for Use Case
uses: peter-evans/create-pull-request@v5
with:
branch-suffix: short-commit-hash
title: "Add Use Case Description from Issue #${{ github.event.issue.number }}"
body: "This PR adds use case description provided in Issue #${{ github.event.issue.number }}."
labels: ["use-case", "documentation"]
base: main
branch: use-case-${{ github.event.issue.number }}
token: ${{ secrets.GITHUB_TOKEN }}
reviewers: ["jkesanie"]

7 changes: 5 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ theme:
- content.code.select
plugins:
- search
- awesome-pages
markdown_extensions:
- toc:
permalink: true
Expand Down Expand Up @@ -50,8 +51,10 @@ extra_javascript:
- https://unpkg.com/[email protected]/dist/mermaid.min.js

nav:
- About the course: index.md
- Use cases: use_cases.md
- About our work: index.md
- Use Cases:
- use_cases.md
- Cases: !include 'use-cases/'
repo_url: https://github.com/mapping-commons/rda-fair-mappings/
site_url: https://mapping-commons.github.io/rda-fair-mappings/
edit_uri: edit/main/docs/

0 comments on commit 0265f07

Please sign in to comment.