Skip to content

Commit

Permalink
Merge pull request #2 from OmniOneID/develop
Browse files Browse the repository at this point in the history
Merge develop branch into main
  • Loading branch information
mikyung-lee authored Oct 28, 2024
2 parents ae16f9a + 884b269 commit 1739293
Show file tree
Hide file tree
Showing 46 changed files with 3,430 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
labels: ["bug", "triage"]
assignees: [""]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of our software are you running?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
id: feature
attributes:
label: Feature Description
description: Please provide a detailed description of the feature.
placeholder: Describe the feature you are requesting.
validations:
required: true

- type: textarea
id: purpose
attributes:
label: Purpose
description: What is the main purpose of this feature? Why is it needed?
placeholder: Explain the purpose of the feature.
validations:
required: true

- type: textarea
id: background
attributes:
label: Background
description: Provide any relevant context or background information for this feature.
placeholder: Provide background information.
validations:
required: false

- type: textarea
id: expected_outcome
attributes:
label: Expected Outcome
description: What are the expected results of implementing this feature?
placeholder: Explain the expected results or impact.
validations:
required: true

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
17 changes: 17 additions & 0 deletions .github/pull_request_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description
<!-- Briefly describe the changes in this pull request. -->

## Related Issue (Optional)
<!-- Mention the issue number that this PR addresses. -->
- Issue # (e.g., #123)

## Changes
<!-- List your changes in detail and what reviewers should focus on -->
- Change 1
- Change 2

## Screenshots (Optional)
<!-- Attach screenshots or GIFs to show the changes, if applicable. -->

## Additional Comments (Optional)
<!-- Any other comments or information that reviewers should be aware of. -->
47 changes: 47 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PR assignment
on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
auto-assign:
runs-on: ubuntu-latest
steps:
- name: Request Reviewers
uses: actions/github-script@v6
with:
script: |
const author = context.payload.pull_request.user.login;
let reviewers = ['jinhwankim6557', 'gw-nam', 'yoongyu-lee'];
if (reviewers.includes(author)) {
if(reviewers.length === 1)
reviewers = reviewers.map(reviewer => reviewer === author ? 'mikyung-lee' : reviewer);
else {
reviewers = reviewers.filter(reviewer => reviewer !== author);
}
}
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers: reviewers
});
- name: Assign PR author and reviewers
uses: actions/github-script@v6
with:
script: |
const assignees = ['mikyung-lee', 'yoongyu-lee']; // assignees
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
assignees: assignees
});
92 changes: 92 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build and Upload JAR to GitHub Releases

on:
pull_request:
branches:
- main
types: [closed]

jobs:
build:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/QA-')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write

defaults:
run:
working-directory: source/did-common-sdk-server
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Test
run: ./gradlew test

- name: Build JAR
run: |
./gradlew bootjar
echo "JAR file generated at:"
find ./build/libs -name "*.jar"
- name: Set release title
id: set_release_title
run: |
release_tag=${GITHUB_HEAD_REF#release/QA-}
echo "Release tag: $release_tag"
echo "release_tag=$release_tag" >> $GITHUB_ENV # Write to the environment file
- name: Get commit messages
id: get_commit_messages
run: |
commits=$(git log ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --pretty=format:"* %s")
echo "$commits" > commit_messages.txt
echo "commits=$commits" >> $GITHUB_ENV # Write to the environment file
- name: Find JAR file
id: find_jar
run: |
jar_path=$(find ./build/libs -name "*.jar" | head -n 1)
echo "JAR path found: $jar_path"
echo "jar_path=$jar_path" >> $GITHUB_ENV # Write to the environment file
- name: Calculate SHA-256
id: calculate_sha
run: |
sha256=$(sha256sum ${{ env.jar_path }} | awk '{ print $1 }')
echo "SHA-256: $sha256"
echo "jar_sha256=$sha256" >> $GITHUB_ENV # Write to the environment file
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.release_tag }}
release_name: ${{ env.release_tag }}
body: |
## Changes:
${{ env.commits }}
## Checksum:
SHA-256: ${{ env.jar_sha256 }}
- name: Upload JAR
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: source/did-common-sdk-server/${{ env.jar_path }}
asset_name: did-common-sdk-server-${{ env.release_tag }}.jar
asset_content_type: application/java-archive
Loading

0 comments on commit 1739293

Please sign in to comment.