Skip to content
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

Add a workflow for generating Hackday Github Discussion threads #914

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

Sherwin-14
Copy link
Contributor

@Sherwin-14 Sherwin-14 commented Jan 5, 2025

I have replaced the CATEGORY_ID and REPOSITORY_ID, though, it remains untested. (It would be funny if Github allowed me to open a discussions thread in another repository 😆)


📚 Documentation preview 📚: https://earthaccess--914.org.readthedocs.build/en/914/

Copy link

github-actions bot commented Jan 5, 2025

Binder 👈 Launch a binder notebook on this branch for commit aab593c

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit f0baaa6

Binder 👈 Launch a binder notebook on this branch for commit 0b872d5

Copy link
Collaborator

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

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

Since this isn't a user-facing change to earthaccess, I think we should omit this from the changelog!

@Sherwin-14 Sherwin-14 requested a review from mfisher87 January 6, 2025 06:27
@mfisher87
Copy link
Collaborator

@asteiker @betolink @ateucher I don't think I'll be available for tomorrow's hack day; are one of you willing to give this a shot?

Click the Actions tab, then select "Generate Discussion Thread for Hackdays", then click "Run workflow" to use.

@mfisher87 mfisher87 merged commit 393c3ac into nsidc:main Jan 6, 2025
3 checks passed
@mfisher87
Copy link
Collaborator

Looks great, thank you @Sherwin-14 :)

@mfisher87
Copy link
Collaborator

@Sherwin-14 tried to do a test run and got:

gh: Could not resolve to a node with the global id of 'DIC_kwDOF9V-ic4CdYaN!'
{"data":{"createDiscussion":null},"errors":[{"type":"NOT_FOUND","path":["createDiscussion"],"locations":[{"line":3,"column":3}],"message":"Could not resolve to a node with the global id of 'DIC_kwDOF9V-ic4CdYaN!'"}]}

https://github.com/nsidc/earthaccess/actions/runs/12636855658/job/35209870757

Any ideas?

@mfisher87 mfisher87 linked an issue Jan 6, 2025 that may be closed by this pull request
@mfisher87
Copy link
Collaborator

Looks like the category ID doesn't exactly match. I was able to successfully query from my local machine with:

  gh api graphql -f query='
  mutation
   {createDiscussion
     (
       input:
         {
         repositoryId: "MDEwOlJlcG9zaXRvcnkzOTk4Njc1Mjk=",
         categoryId: "DIC_kwDOF9V-ic4CdYaN",
         body: "Reporting out on earthaccess hack days. Use the comment button at the very bottom to send a message. Additionally, consider sending issues and PRs relevant to your work to help make the job of future readers easier. It is okay to duplicate information here! Use the reply feature to have a discussion under any comment. Enjoy!",
         title: "Hackathon 2025/01/06"
         }
     )
     {
       discussion {id}
     }
   }'

Note the trailing ! on categoryId is removed. I also needed to mess with the quotes a little.

@Sherwin-14
Copy link
Contributor Author

Sherwin-14 commented Jan 6, 2025 via email

@mfisher87
Copy link
Collaborator

mfisher87 commented Jan 6, 2025

Since these values are publicly accessible, I think it's fine to keep them as in-line envvars in the action :) Did you have another reason I'm missing?

Fixed with #917 !

@ateucher
Copy link
Collaborator

ateucher commented Jan 6, 2025

@mfisher87 @Sherwin-14 This is great, I'll give it a shot tomorrow!

@mfisher87
Copy link
Collaborator

🙌 Thanks Andy!

@mfisher87
Copy link
Collaborator

@ateucher I granted you write access to this repository; it's required to run workflows. Please accept the invitation here: https://github.com/nsidc/earthaccess/invitations

@ateucher
Copy link
Collaborator

ateucher commented Jan 6, 2025

Accepted, thanks @mfisher87 !

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.

Action to automatically create hack day discussion threads
3 participants