Skip to content

Commit

Permalink
Add workflow to create documentation issues (#494)
Browse files Browse the repository at this point in the history
* Add workflow to create documentation issues

Signed-off-by: Mohammad Qureshi <[email protected]>

* Add license header to workflow file

Signed-off-by: Mohammad Qureshi <[email protected]>
  • Loading branch information
qreshi authored and ansjcy committed Jan 9, 2023
1 parent b6d29be commit e7ca148
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Is your feature request related to a problem?**
A new feature has been added.

**What solution would you like?**
Document the usage of the new feature.

**What alternatives have you considered?**
N/A

**Do you have any additional context?**
_Add any other context or screenshots about the feature request here._
45 changes: 45 additions & 0 deletions .github/workflows/create-documentation-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
##

name: Create Documentation Issue
on:
pull_request:
types:
- labeled
env:
PR_NUMBER: ${{ github.event.number }}

jobs:
create-issue:
if: ${{ github.event.label.name == 'needs-documentation' }}
runs-on: ubuntu-latest
name: Create Documentation Issue
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Checkout code
uses: actions/checkout@v2

- name: Edit the issue template
run: |
echo "https://github.com/opensearch-project/notifications/pull/${{ env.PR_NUMBER }}." >> ./.github/ISSUE_TEMPLATE/documentation.md
- name: Create Issue From File
id: create-issue
uses: peter-evans/create-issue-from-file@v4
with:
title: Add documentation related to new feature
content-filepath: ./.github/ISSUE_TEMPLATE/documentation.md
labels: documentation
repository: opensearch-project/documentation-website
token: ${{ steps.github_app_token.outputs.token }}

- name: Print Issue
run: echo Created related documentation issue ${{ steps.create-issue.outputs.issue-number }}

0 comments on commit e7ca148

Please sign in to comment.