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: PRs are added to repo-specific projects #222

Merged
merged 4 commits into from
Jan 27, 2023

Conversation

nedbat
Copy link
Contributor

@nedbat nedbat commented Jan 25, 2023

@feanil I need to write some docs, but the mechanisms and tests are here if you want to get a look.
@feanil This is ready for review.

Things I don't like about this:

  • I don't know if this will even work for the "pull request from fork" case, because I think the API still won't let you add an item from own organization (or owner) to another organization. We need to test this.
    • Tested: pull requests from forks are PRs in the original repo, so this will work.
  • It only does pull requests, not issues, because the bot currently only looks at pull requests. The shared action can do issues, but now we have two completely different mechanisms and configurations for issues vs pull requests.
  • glom and backstage don't get along because backstage requires a key of "openedx.org", but then glom can't parse it as "metadata.annotations.openedx.org/add-to-projects", because glom splits on dots.

@codecov
Copy link

codecov bot commented Jan 25, 2023

Codecov Report

Base: 89.14% // Head: 89.22% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (f5801f0) compared to base (cd733de).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
+ Coverage   89.14%   89.22%   +0.07%     
==========================================
  Files          77       77              
  Lines        4571     4603      +32     
  Branches      473      477       +4     
==========================================
+ Hits         4075     4107      +32     
  Misses        459      459              
  Partials       37       37              
Impacted Files Coverage Δ
openedx_webhooks/tasks/github_work.py 100.00% <ø> (ø)
openedx_webhooks/gh_projects.py 100.00% <100.00%> (ø)
openedx_webhooks/info.py 97.82% <100.00%> (+0.28%) ⬆️
openedx_webhooks/tasks/pr_tracking.py 97.13% <100.00%> (ø)
tests/conftest.py 97.89% <100.00%> (+0.09%) ⬆️
tests/test_data.py 100.00% <100.00%> (ø)
tests/test_faker.py 100.00% <100.00%> (ø)
tests/test_pull_request_opened.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nedbat nedbat force-pushed the nedbat/add-prs-to-projects-221 branch from b63c342 to 2f93ee9 Compare January 26, 2023 12:03
@nedbat nedbat marked this pull request as ready for review January 26, 2023 12:03
@nedbat nedbat linked an issue Jan 27, 2023 that may be closed by this pull request
@nedbat nedbat force-pushed the nedbat/add-prs-to-projects-221 branch from d1c1948 to f5801f0 Compare January 27, 2023 18:44
@nedbat nedbat merged commit 00e2711 into master Jan 27, 2023
@nedbat nedbat deleted the nedbat/add-prs-to-projects-221 branch January 27, 2023 18:52
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.

Auto-add pull requests and issues to GitHub projects
2 participants