Skip to content

Add GH workflow for updating external links gallery via issue template #86

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

Conversation

andersy005
Copy link
Member

@andersy005 andersy005 commented Jun 11, 2021

This is my attempt at addressing #80. This PR consists of an issue template and a GitHub workflow that will operate as follows:

  • A user opens a new issue using the template included in this PR
Screen Shot 2021-06-10 at 9 53 36 PM

Screen Shot 2021-06-10 at 9 53 47 PM

  • Here's what the filled out issue template looks like:

Screen Shot 2021-06-10 at 9 54 07 PM

  • Once the issue is created, GitHub triggers the workflow. The workflow does a few things
    • (1) Lets the user know that we are running some validation checks
    • (2) Runs the validation checks
    • (3) Once the validation checks are passing, the Github workflow opens a PR on behalf of the user
    • (4) Once the PR is opened, we post a reply to the original issue to let the user know that we opened a PR on their behalf

Screen Shot 2021-06-10 at 9 54 14 PM

Screen Shot 2021-06-10 at 9 54 25 PM

  • The workflow is designed to be triggered when the user updates the body of the issue. So, if anything needs to be updated, the user can just update the issue, and the pull request will get updated automatically.

@jukent, I haven't added tags to the template yet. From yesterday's conversation, I gathered that tags are optional. In case I misunderstood, let me know and I will make sure the validation checks include tags as well.

@ProjectPythia/infrastructure, your feedback on this is appreciated.

@andersy005 andersy005 requested a review from kmpaul as a code owner June 11, 2021 04:16
@andersy005 andersy005 requested review from a team, dopplershift, ktyle, brian-rose, clyne and jukent and removed request for a team, dopplershift and ktyle June 11, 2021 04:17
@brian-rose
Copy link
Member

This looks great, as far as I understand what's going on. Does github automatically combine issue templates housed in the .github/ISSUE_TEMPLATE/ directory of this repo with those that are stored separately in the .github repo?

Is it possible to somehow test out the whole workflow of submitting an issue before we merge this?

@clyne
Copy link
Contributor

clyne commented Jun 11, 2021

This looks great, as far as I understand what's going on. Does github automatically combine issue templates housed in the .github/ISSUE_TEMPLATE/ directory of this repo with those that are stored separately in the .github repo?

Is it possible to somehow test out the whole workflow of submitting an issue before we merge this?

My GitHub kung fu is too weak to review the implementation. I agree with @brian-rose that it would be super helpful to be able to evaluate the functionality though. Perhaps @dcamron, @dopplershift , or @pilotchute could review the yaml files, etc., we could merge, and then handle any needed changes thorough separate issues.

@jukent
Copy link
Contributor

jukent commented Jun 11, 2021

@andersy005 This looks great!

The tags dictionary with the packages or formats lists (even if one is empty) is necessary. Maybe we add both here. At least one tag is required. I can see how this is complicated and can try to change the function to match.

And second, can you point out somehow that the thumbnail can be a url to a direct image link.

Can the link on the website take you directly to that template or should it take you to the issues page to click "get started" there?

@jukent jukent mentioned this pull request Jun 11, 2021
@andersy005
Copy link
Member Author

Does github automatically combine issue templates housed in the .github/ISSUE_TEMPLATE/ directory of this repo with those that are stored separately in the .github repo?

It's my understanding that GitHub will combine them. There may be some caveats though, and the only way to confirm this works as expected is to merge and see what happens :)

Is it possible to somehow test out the whole workflow of submitting an issue before we merge this?

Unfortunately, this is very trick to test since the logic is tied to the GitHub API and the contents in the repo (e.g. the links.yaml file). Unless we want to create a separate repository for testing, I'd recommend that we merge this and run tests within this repository. This is not the cleanest approach but it would guarantee that things are working as expected.

@brian-rose
Copy link
Member

Unless we want to create a separate repository for testing, I'd recommend that we merge this and run tests within this repository.

Sounds good to me! I'm happy to merge and do some testing. I doubt we can cause too much damage this way...

Copy link
Member

@brian-rose brian-rose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving in order to expedite some real-world testing of the functionality!

@andersy005
Copy link
Member Author

Approving in order to expedite some real-world testing of the functionality!

and for discovering bugs as well :)

And second, can you point out somehow that the thumbnail can be a url to a direct image link.

@jukent, would a comment in the issue template be enough?

Can the link on the website take you directly to that template or should it take you to the issues page to click "get started" there?

See my comment in #87 (comment)

At least one tag is required. I can see how this is complicated and can try to change the function to match.

@jukent, should I add tags before merging this or is it okay to address this in a separate pull request?

Copy link
Contributor

@clyne clyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved to facilitate testing

@andersy005
Copy link
Member Author

Thank you, @brian-rose, @clyne, @jukent! I'm going to merge this shortly for testing. I will address issues pointed out and bugs in follow up PRs.

@andersy005 andersy005 merged commit 0c08817 into ProjectPythia:main Jun 11, 2021
@andersy005 andersy005 deleted the gh-action-update-external-links-gallery branch June 11, 2021 20:05
@andersy005
Copy link
Member Author

Does github automatically combine issue templates housed in the .github/ISSUE_TEMPLATE/ directory of this repo with those that are stored separately in the .github repo?

It's my understanding that GitHub will combine them. There may be some caveats though, and the only way to confirm this works as expected is to merge and see what happens :)

@brian-rose, I turns out that I was wrong about this :). It appears that the .ISSUE_TEMPLATE directory in the repository is overriding the organization wide templates in https://github.com/ProjectPythia/.github`. I am going to move the issue template to the organization wide .github/.github/ISSUE_TEMPLATE directory for the time being...

@brian-rose
Copy link
Member

@andersy005 live and learn!

@clyne
Copy link
Contributor

clyne commented Jun 11, 2021

@andersy005 thanks for taking care of this so quickly. A few comments/questions that hopefully find there way to you through a closed PR :-)

  1. Are the checkboxes things that are automatically populated somehow, or is the user supposed to check them?
  2. I think we need to give more guidance in the template than simply "Please fill out the template below". First, it would be good to have a description of what this template is for, possibly providing a link to the external links gallery. Second, I don't think it's clear to the contributor how to complete the template. How about instead of empty quotes after the keywords having something like 'YOUR_INPUT_GOES_HERE'?

@jukent
Copy link
Contributor

jukent commented Jun 11, 2021

Great job @andersy005 ! The new-link PR will fail if a tag is not listed. We can work on this now that it has been merged.

@jukent
Copy link
Contributor

jukent commented Jun 11, 2021

@clyne This PR gets the functionality and the content group (I can volunteer for this) can make it as user friendly as possible with explanations in another PR.

@clyne
Copy link
Contributor

clyne commented Jun 11, 2021

@jukent sounds good. Would you like me to open a separate issue with my comments/questions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants