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

Refactor Autoclose #19

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Refactor Autoclose #19

merged 1 commit into from
Jul 25, 2024

Conversation

EVDOG4LIFE
Copy link
Contributor

What does this PR do?

Breaks down the GH Action to auto close non member PRs to accommodate multiple access tokens. PAT for org membership, and the standard GH_TOKEN secret for commenting on and closing PRs.

Test Plan

  1. Created org Evdogs, added myself - modified action to account for that.
  2. Refactored workflow, to break down into multiple steps
  3. Generated PAT at the Organization level to read membership
  4. Generated PR in Fork to validate as non member - Update LICENSE EVDOG4LIFE/sdk-for-go#2
  5. Generated PR in Fork as member - Update avatars.go EVDOG4LIFE/sdk-for-go#1

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@EVDOG4LIFE EVDOG4LIFE requested a review from stnguyen90 July 25, 2024 05:19
@stnguyen90 stnguyen90 merged commit 75939ca into master Jul 25, 2024
1 check passed
@stnguyen90 stnguyen90 deleted the AutocloseRefactor branch July 25, 2024 05:25
@stnguyen90
Copy link
Contributor

We could have given the PAT access to the repos, but then that would:

  1. grant the PAT more access than it needs
  2. we'd have to make sure to update the access (as I only selected the applicable repos)
  3. the PR would have had a comment and closed by me:
image

However, using the GITHUB_TOKEN means the PR would be commented and closed by a github action:

image

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