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

[feature] ok-to-test allows testing on forked branches with secrets #320

Merged
merged 10 commits into from Dec 3, 2020

Conversation

alldoami
Copy link
Contributor

@alldoami alldoami commented Dec 2, 2020

References:
https://github.com/imjohnbo/ok-to-test

Method:
Copied over the .github/workflows files and modified to use the preferred method of authentication:
Preferred: GitHub App installation access token with contents: write and metadata: read permissions

We had to follow these instructions to create a new Github App for the chanzuckerberg organization, not a personal account app. We were able to create and use the app id in the app settings and a private key after creating the app. Both are stored in Github secrets now. We changed the githash condition to be more strict than the one written in the original project.

@alldoami alldoami requested a review from a team as a code owner December 2, 2020 23:34
.github/workflows/integration.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Show resolved Hide resolved
.github/workflows/ok-to-test.yml Outdated Show resolved Hide resolved
.github/workflows/unit.yml Outdated Show resolved Hide resolved
private_key: ${{ secrets.OK_TO_TEST_PRIVATE_KEY }}

- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v1
Copy link

Choose a reason for hiding this comment

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

there's a v2 for this action, I wonder if worth upgrading (either now or subsequent pr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should try using v1 first and then try with v2 since I'm expecting some other things might need to change besides the version number.

.github/workflows/unit.yml Outdated Show resolved Hide resolved
.github/workflows/unit.yml Outdated Show resolved Hide resolved
.github/workflows/unit.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Show resolved Hide resolved
.github/workflows/integration.yml Outdated Show resolved Hide resolved
issue-type: pull-request
commands: ok-to-test
named-args: true
permission: write
Copy link

Choose a reason for hiding this comment

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

I wonder how we verify this is enforced

.github/workflows/unit.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Outdated Show resolved Hide resolved
@edulop91 edulop91 assigned alldoami and unassigned edulop91 Dec 3, 2020
@alldoami alldoami assigned edulop91 and unassigned alldoami Dec 3, 2020
Copy link

@edulop91 edulop91 left a comment

Choose a reason for hiding this comment

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

lgtm 🎉
idk if @ryanking wants to take a pass

@edulop91 edulop91 removed their assignment Dec 3, 2020
@alldoami alldoami merged commit badc47d into main Dec 3, 2020
@alldoami alldoami deleted the adoami/ok-to-test branch December 3, 2020 22:01
gjv9491 pushed a commit to gjv9491/terraform-provider-snowflake that referenced this pull request Mar 19, 2021
anton-chekanov pushed a commit to anton-chekanov/terraform-provider-snowflake that referenced this pull request Jan 25, 2022
daniepett pushed a commit to daniepett/terraform-provider-snowflake that referenced this pull request Feb 9, 2022
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.

None yet

3 participants