-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding workflow for creating documentation issues #1857
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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?** | ||
See please | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what the context should be for this, could you update? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So when the workflow runs, the PR number will be appended here (line). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hdhalter and I worked on together on a Docs specific issue template. I've added our initial draft here: What do you want to do?
Tell us about your request. For example, what feature or area does it affect? What versions? If it’s a change to existing documentation, which pages (URLs) are affected? Do you have any related resources to help us get started (e.g., link to a related fixed issue, design doc, etc.)? Any particular POCs (Eng or PM) who have more information? Is there anything else you'd like to add? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do we avoid accidently adding this label on backports or other issues that won't make sense? Maybe tag the user that applied the label in the new documentation issue or do you have thoughts on other mechanism to ensure good ownership after its been created? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me see if we can assign the documentation issue to the contributor who created the PR. WDYT about that? |
||
runs-on: ubuntu-latest | ||
name: Create Documentation Issue | ||
steps: | ||
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/github-app-token@v1.5.0 | ||
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/security/pull/${{ env.PR_NUMBER }}." >> ./.github/ISSUE_TEMPLATE/documentation-issue.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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we make this title more useful? otherwise the doc repos issues are going to be a mess to navigate with lots of the same title There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I will improve the template with better information. |
||
content-filepath: ./.github/ISSUE_TEMPLATE/documentation-issue.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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format doesn't seem very useful, could we re-write to provide the needed details for the documentation team, is the following all we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note; it might be worthwhile to see about using SED or another utility to allow env variables to be updated in the template file so the workflow can provide more information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I had tried using that but faced some issues as far as I remember. I will try again to see how it can be made better with more information.