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

Create github issue when user submits metadata #1208

Merged
merged 35 commits into from
May 8, 2024

Conversation

JamesTessmer
Copy link
Collaborator

@JamesTessmer JamesTessmer commented Apr 10, 2024

The goal of this PR is to add automated github issue creation.
Issues will contain:

  • the submission ID
  • the submitter
  • the PI
  • If data has already been generated
  • the status of the submission
  • the data types present in the submission
  • the sample type
  • the number of samples
  • a section for notes on the submission

Current example of the output of the automation:

If data has been generated:

Screenshot 2024-05-03 at 2 09 40 PM

If no data has been generated:
Screenshot 2024-05-03 at 2 16 07 PM

Git was having issues pushing changes up from my local branch so I copied them and pushed from a new version
@JamesTessmer JamesTessmer self-assigned this Apr 10, 2024
@JamesTessmer JamesTessmer marked this pull request as draft April 10, 2024 18:43
@JamesTessmer
Copy link
Collaborator Author

I see the branch is failing the server check. I'm not sure if that's because of the missing token. Everything seems to be working fine when I test on my end.

nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@pkalita-lbl pkalita-lbl left a comment

Choose a reason for hiding this comment

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

The changes look great!

nmdc_server/api.py Outdated Show resolved Hide resolved
@JamesTessmer
Copy link
Collaborator Author

The changes look great!

Great!
There are probably 1-2 minor touch ups to fix in terms of the content or formatting that I want to double check with Montana but those shouldn't affect anything.

@JamesTessmer
Copy link
Collaborator Author

@mslarae13 @pkalita-lbl
I've pushed up some new things and I think this will be the last of it.
After talking to Montana I added a new function that posts the created issue to a project board. I tried to anticipate similar fixes I had to make to the issue creation function so this one should (hopefully) be pretty close to done.
I also added 2 new variables to the .env and config to support posting an issue to a project board.

There are is also a new block of code in the issue creation to pull some IDs based on whether data has or has not been created for that submission.

I don't anticipate either of you looking at this until next week, but when you do hopefully everything is good or only requires minor fixes that can be done super quick.

@JamesTessmer JamesTessmer marked this pull request as ready for review May 3, 2024 22:05
Copy link
Collaborator

@pkalita-lbl pkalita-lbl left a comment

Choose a reason for hiding this comment

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

A couple of comments/questions based on the latest changes. Also looks like there's a conflict to resolve now, in case you hadn't seen that.

nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
nmdc_server/api.py Outdated Show resolved Hide resolved
@pkalita-lbl
Copy link
Collaborator

Recapping a conversation with @JamesTessmer on Slack:

  • James will remove the project board part from this PR since it complicates the authentication setup, and we don't want to be managing multiple personal access tokens for this.
  • I will make two new issues for follow-on work:
    • Set up a new, private GitHub App in the microbiomedata org with read/write permissions for issues and projects
    • Integrate the app's private key into nmdc-server. When necessary that private key can be exchanged for an API access token which can be used for the issue creation and adding it to a project board.

@JamesTessmer
Copy link
Collaborator Author

@pkalita-lbl I've removed all the project posting related code now and it looks like everything has passed checks.
If everything looks good can you hit merge? I don't have permission to merge anything in this repo.

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.

3 participants