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

GH Infra: project automation and issue template fixes #297

Merged
merged 5 commits into from
Aug 16, 2023

Conversation

jarmak-nv
Copy link
Collaborator

@jarmak-nv jarmak-nv commented Aug 3, 2023

Description

closes #296
closes #263

This PR changes the project automation workflows from using the GitHub app authentication to an org secret - this should resolve the failures during the pull_request_review action trigger.

It does not. We could do a secondary workflow as a workaround, but it's too hack-y for me. https://stackoverflow.com/questions/67247752/how-to-use-secret-in-pull-request-review-similar-to-pull-request-target

Will update the logic so it still converts to draft (gh token can get pull_request write so that should be fine) and we'll just manually have to re-set to in_progress. I could add for pull_request_target on synchronize it checks if its in draft and sets to in progress so after a commit is pushed it will check and auto-update. My worry is it will run too often.

It also fixes the issue template labels so they should be correctly pre-assigned.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jarmak-nv jarmak-nv marked this pull request as ready for review August 3, 2023 14:54
@jarmak-nv jarmak-nv requested review from a team as code owners August 3, 2023 14:54
@jarmak-nv jarmak-nv requested review from jrhemstad and gevtushenko and removed request for a team August 3, 2023 14:54
Copy link
Collaborator

@jrhemstad jrhemstad left a comment

Choose a reason for hiding this comment

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

test

@jarmak-nv jarmak-nv marked this pull request as draft August 3, 2023 15:17
@jarmak-nv jarmak-nv marked this pull request as ready for review August 3, 2023 15:18
@jarmak-nv jarmak-nv marked this pull request as draft August 3, 2023 15:50
@jarmak-nv jarmak-nv marked this pull request as ready for review August 10, 2023 19:10
@jarmak-nv
Copy link
Collaborator Author

jarmak-nv commented Aug 10, 2023

After a bunch of digging and testing here's the results:

  • We technically could make this workflow work by creating a secondary workflow that's triggered by the pull_request_review which then runs in the context of the repo, but it's not an implementation I'm happy with and it drives up action-minute consumption
  • Instead I've changed it so on pull_request_review it sets to draft then exits successfully
  • Inside the project, I've enabled the built-in workflow to change the status to In Progress when changes are requested so the PR will automatically have its status change

This largely achieves the same results, except linked issues do not follow the status. We could edit https://github.com/NVIDIA/cccl/blob/main/.github/workflows/project_automation_sync_pr_issues.yml to be on synchronize as well, but I worry that would cause excessive unnecessary runs (it would run on every commit). Open to thoughts here.

Unfortunately, the default github token cannot trigger actions, otherwise the conversion to draft would re-trigger this action and make the challenges moot.

@jrhemstad jrhemstad merged commit 380d381 into NVIDIA:main Aug 16, 2023
174 of 430 checks passed
@jarmak-nv jarmak-nv deleted the project-automation-token-update branch August 23, 2023 00:41
alliepiper pushed a commit to alliepiper/cccl that referenced this pull request Aug 30, 2023
* Change from App auth to an org secret

* Fix labels in issue templates

* Revert app secret method, not the root cause

* Move draft conversion, exit if pull_request_review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants