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

Miss-islington as a GitHub App #659

Merged
merged 3 commits into from
Oct 16, 2023
Merged

Miss-islington as a GitHub App #659

merged 3 commits into from
Oct 16, 2023

Conversation

Mariatta
Copy link
Member

@Mariatta Mariatta commented Oct 11, 2023

Use Installation Access Token instead of Personal Access token.

Note that the Personal Access Token is still needed during cherry-picking/backport process, as there is no GitHub API for cherry-picking.

Deployment tasks:

  • Choose a name for the GitHub App.
  • Create a GitHub App under the Python org
  • Assign @Mariatta app manager role on app
  • Set environment variables in miss-islington's Heroku app: GH_APP_ID, GH_PRIVATE_KEY (from the newly created GitHub App in the previous step)
  • Deploy and test

Use Installation Access Token instead of Personal Access token.

Note that the Personal Access Token is still needed during cherry-picking/backport process, as
there is no GitHub API for cherry-picking.
@Mariatta
Copy link
Member Author

I still need to do some testing. Don't merge yet.

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #659 (34186a6) into main (1f71458) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #659   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          356       357    +1     
  Branches        29        29           
=========================================
+ Hits           356       357    +1     
Flag Coverage Δ
Python_3.11 100.00% <100.00%> (ø)
Python_3.12 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
miss_islington/backport_pr.py 100.00% <100.00%> (ø)
tests/test_backport_pr.py 100.00% <ø> (ø)

@Mariatta Mariatta marked this pull request as ready for review October 11, 2023 12:19
@Mariatta
Copy link
Member Author

Mariatta commented Oct 11, 2023

Tested on my personal repo and personal bot:

Original PR: Mariatta/cpython_for_test#2

Backport PR created by app: Mariatta/cpython_for_test#3

@Mariatta
Copy link
Member Author

You can compare with how we did the conversion for bedevere: python/bedevere#569

@Mariatta
Copy link
Member Author

Mariatta commented Oct 11, 2023

GitHub App settings:

  • webhook url: miss-islington's heroku url
  • webhook secret: miss-islington's GH_SECRET from before
  • enable SSL verification
  • logo: miss-islington's avatar

Permissions & events:

  • Contents: Read & write
  • Pull Requests: Read & write

Subscribe to events:

  • same events as the current miss-islington's webhook

@ambv ambv merged commit 7f2abdf into python:main Oct 16, 2023
5 checks passed
@Mariatta
Copy link
Member Author

During deployment, we realized additional things:

  • We needed to grant additional permission: "Checks"
  • We should have disabled miss-islington's webhook on CPython first.

After those are sorted out, things seem to work.
Example activity by the app: python/cpython#110090 (comment)

@Mariatta Mariatta deleted the gh-app branch October 16, 2023 18:50
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.

2 participants