Skip to content

Commit

Permalink
further automation for the project
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlapao committed Nov 1, 2024
1 parent 586d57f commit 6b242c4
Show file tree
Hide file tree
Showing 13 changed files with 696 additions and 12 deletions.
83 changes: 83 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Bug report
description: Create a bug report
title: "[BUG] "
labels:
- bug
- triage
assignees:
- cjlapao
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: DevOps Service version
description: |
DevOps Service version where you observed this issue
placeholder: |
vX.Y.Z
render: Markdown
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks.
Enable debug logging, when running it by setting the environment variable LOG_LEVEL.
render: Shell
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: |
Steps to reproduce the issue.
To speed up the triaging of your request, reproduce the issue running
placeholder: |
1. In this environment...
1. With this config...
1. Run '...'
1. See error...
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: validation
attributes:
label: Validation
options:
- label: Yes, I've included all of the above information (Version, settings, logs, etc.)
required: true
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEATURE]"
labels:
- triage
- feature request
assignees:
- cjlapao
body:
- type: textarea
id: feature_description
attributes:
label: Is your feature request related to a problem? Please describe.
value: |-
A clear and concise description of what the problem is. Ex. I'm always frustrated
when [...]
validations:
required: true
- type: textarea
id: describe_feature
attributes:
label: Describe how would you expect the feature to work
value: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: describe_alternatives
attributes:
label: Describe alternatives you've considered
value: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: additional_context
attributes:
label: Additional context
value: Add any other context or screenshots about the feature request here.
69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/product-backlog-item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Product Backlog Item
description: Create a product backlog item
title: "[PBI] "
labels:
- triage
- pbi
assignees:
- cjlapao
projects:
- "Parallels/6"
body:
- type: textarea
id: description
attributes:
label: Description
placeholder: |-
Provide a clear and concise description of the item. Explain the purpose and the expected outcome.
validations:
required: true
- type: textarea
id: user_story
attributes:
label: User Story
placeholder: |-
As a **[type of user]**, I want **[some goal]** so that **[some reason]**.
validations:
required: true
- type: textarea
id: describe_feature
attributes:
label: Acceptance Criteria
placeholder: |-
- [ ] **Criterion 1**: Detailed description of the first acceptance criterion.
description: |
Define the conditions that must be met for the item to be considered complete.
validations:
required: true
- type: checkboxes
id: definition_of_done
attributes:
label: Definition of Done
options:
- label: Code implemented following best practices.
- label: Unit tests written and passing.
- label: Code reviewed and approved.
- label: Merged into the main branch.
- label: Documentation updated (if applicable).
- label: Deployed to staging/production environment.

- type: textarea
id: assumptions_and_constraints
attributes:
label: Assumptions and Constraints
placeholder: |-
- **Assumption 1**: Detailed description of the first assumption.
- List any assumptions that are being made about the item.
- **Constraint 1**: Detailed description of the first constraint.
- List any constraints that may impact the implementation of the item.
- type: textarea
id: dependencies
attributes:
label: Assumptions and Constraints
placeholder: |-
- **Dependency 1**: Detailed description of the first dependency.
- type: textarea
id: additional_context
attributes:
label: Additional Notes
placeholder: Add any other context or screenshots about the item here.
7 changes: 4 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)
fixes # (issue)

## Type of change

Expand All @@ -13,12 +13,13 @@ Please delete options that are not relevant.
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Updated packages

### Checklist:
### Checklist

- [ ] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have run linting on my code
- [ ] I have run tests that prove my fix is effective or that my feature works
- [ ] I have updated the CHANGELOG.md file accordingly
- [ ] I have updated the CHANGELOG.md file accordingly
20 changes: 20 additions & 0 deletions .github/workflow_scripts/current-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

while getopts ":f:" opt; do
case $opt in
f)
FILE=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done

if [ -z "$FILE" ]; then
echo "You need to specify the version file with the -f flag"
fi

VERSION=$(cat "$FILE")
echo "$VERSION"
54 changes: 54 additions & 0 deletions .github/workflow_scripts/generate-blog-records.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

# Initialize variables
version=""
date=""
content=""

# Read the CHANGELOG.md line by line
while IFS= read -r line
do
# Check if the line contains a version number
if [[ $line =~ "## ["[0-9]+\.[0-9]+\.[0-9]+"]" ]]; then
highest_version_with_date=$(grep -E '## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | awk -F '[\\[\\]]' '{print $2}' | sort -Vr | head -n 1)

# If a version was previously found, write the content to the corresponding file
if [ ! -z "$version" ]; then
lines="---\n"
lines+="layout: post\n"
lines+="title: \"Release $version\"\n"
lines+="date: $date 00:00:00 +0000\n"
lines+="categories: release notes\n"
lines+="---\n"
lines+="\n"
lines+="# Whats New"
echo -e "$lines" > "./docs/_posts/${date}-v${version}.markdown"
echo -e "$content" >> "./docs/_posts/${date}-v${version}.markdown"
fi

# Extract the new version number, date and reset the content
version=$(echo $line | awk -F '[\\[\\]]' '{print $2}')
date=$(echo $line | awk '{print $NF}')
content=""
else
# Append the line to the content
content+="$line\n"
fi
done < "CHANGELOG.md"

# Write the content for the last version
if [ ! -z "$version" ]; then
highest_version_with_date=$(grep -E '## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | awk -F '[\\[\\]]' '{print $2}' | sort -Vr | head -n 1)
date_of_highest_version=$(echo $highest_version_with_date | awk '{print $NF}')

lines="---\n"
lines+="layout: post\n"
lines+="title: \"Release $version\"\n"
lines+="date: $date 00:00:00 +0000\n"
lines+="categories: release notes\n"
lines+="---\n"
lines+="\n"
lines+="# Whats New\n"
lines+="$content"
echo -e "$lines" > "./docs/_posts/${date}-v${version}.markdown"
fi
Loading

0 comments on commit 6b242c4

Please sign in to comment.