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

feat: fill date opened field and owner in ospr project board #327

Merged
merged 7 commits into from
Jan 6, 2025

Conversation

navinkarkera
Copy link
Contributor

@navinkarkera navinkarkera commented Dec 30, 2024

Automatically adds PR open date and owner name to OSPR project board for new pull requests.

Test instructions

  • Set GITHUB_PERSONAL_TOKEN=<your_token> and GITHUB_OSPR_PROJECT="openedx:19" environment variables.
  • Select a PR to test and make sure to delete its entry from project board, you can use my PR from RecommenderXblock
  • Get PR json using github cli, for example,
gh api \
-H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
/repos/openedx/RecommenderXBlock/pulls/105 > /tmp/some.json
  • Update following lines in openedx_webhooks/tasks/pr_tracking.py to make the process faster.
Line 209 in `desired_support_state` function.
-    is_internal = is_internal_pull_request(pr)
+    is_internal = False
Line 273 in `desired_support_state` function.
-    has_signed_agreement = pull_request_has_cla(pr)
+    has_signed_agreement = True
  • Add below snippet to openedx_webhooks/tasks/pr_tracking.py file and execute it.
if __name__ == '__main__':
    import json
    with open('/tmp/some.json') as f:
        pr = json.load(f)
    fixer = PrTrackingFixer(pr, current_support_state(pr), desired_support_state(pr))
    fixer._fix_projects()
  • Verify that the PR was added to OSPR board along with its opening date and Repo owner info.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 30, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Dec 30, 2024

Thanks for the pull request, @navinkarkera!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @feanil. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 91.40625% with 11 lines in your changes missing coverage. Please review.

Project coverage is 89.53%. Comparing base (9f337f8) to head (3355ff2).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
openedx_webhooks/tasks/pr_tracking.py 76.00% 5 Missing and 1 partial ⚠️
openedx_webhooks/info.py 88.46% 2 Missing and 1 partial ⚠️
openedx_webhooks/utils.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
+ Coverage   89.49%   89.53%   +0.03%     
==========================================
  Files          38       38              
  Lines        2912     3009      +97     
  Branches      216      227      +11     
==========================================
+ Hits         2606     2694      +88     
- Misses        277      283       +6     
- Partials       29       32       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@navinkarkera navinkarkera marked this pull request as ready for review January 3, 2025 10:56
@mphilbrick211 mphilbrick211 requested a review from feanil January 3, 2025 21:25
Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

Makes sense to me, I can deploy the change.

@feanil feanil merged commit bcec1d0 into openedx:master Jan 6, 2025
6 checks passed
@feanil
Copy link
Contributor

feanil commented Jan 6, 2025

This is now deployed to production.

@itsjeyd
Copy link

itsjeyd commented Jan 7, 2025

@navinkarkera @feanil Thanks a lot! 🎉

@navinkarkera
Copy link
Contributor Author

@feanil Thanks! I noticed that all the commits including the fixup ones were merged as is (I was planning to squash them before merge). If looks really bad, maybe you can squash and force push. 😬

@feanil
Copy link
Contributor

feanil commented Jan 7, 2025

Cleaned up. Thanks

@navinkarkera
Copy link
Contributor Author

@feanil @itsjeyd noticed that after merging this PR, Primary PM field is not being automatically populated for new PRs. I am not sure if the code that populated it is in this repo or somewhere else and how it has was affected by this PR, so we were hoping you could help us investigate.

@itsjeyd
Copy link

itsjeyd commented Jan 10, 2025

FYI @mphilbrick211 ⬆️

@mphilbrick211
Copy link

FYI @mphilbrick211 ⬆️

This is great! Thanks, all!

@itsjeyd
Copy link

itsjeyd commented Jan 13, 2025

Closes openedx/wg-coordination#151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants