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

fix: generate previews from forked repos #1097

Merged
merged 23 commits into from
Feb 26, 2024

Conversation

xiaolou86
Copy link
Contributor

@xiaolou86 xiaolou86 commented Jan 31, 2024

Description of the Changes

fix: Generate previews from forked repos

Closes #1043

Description of the Solution

  1. Change the event from pull_request to pull_request_target. permissions-for-the-github_token

  2. Change the branch ref when checkout. Because its event (pull_request_target) runs in the context of the base of the pull request, rather than in the context of the merge commit as the pull_request event does. base branch

  3. Since of the above 2, the workflow triggered from pull_request_target event will run only after the .yml config has been merged into repo.

PR Preview URL

After you push a commit to this PR, a preview is built and a URL to the root of the preview appears in the comment feed.

Paste here the specific URL(s) of the content that this PR addresses.

Check List

  • Changes have been done against main branch, and PR does not conflict
  • PR title follows the convention: <docs/feat/fix/chore>(optional scope): <description>, e.g: fix: minor typos in code

This change is Reviewable

@xiaolou86 xiaolou86 changed the title [wip] fix: Generate previews from forked repos fix: generate previews from forked repos Feb 5, 2024
@xiaolou86
Copy link
Contributor Author

@stoobie I have finished, please help me to review.

@xiaolou86
Copy link
Contributor Author

The workflow triggered from pull_request_target event won't run until this .yml config has been merged into repo.
After that, the workflow will run when other PRs are created.

@stoobie
Copy link
Collaborator

stoobie commented Feb 5, 2024

@xiaolou86 Wonderful! Thank you for your hard work on this! I need to have another set of eyes review the code before I can merge it.

guyvelleman
guyvelleman previously approved these changes Feb 26, 2024
Copy link
Contributor

@guyvelleman guyvelleman left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @xiaolou86)

@stoobie stoobie merged commit f37a901 into starknet-io:main Feb 26, 2024
1 check failed
@stoobie
Copy link
Collaborator

stoobie commented Feb 26, 2024

@guyvelleman gave an LGTM offline.

stoobie added a commit that referenced this pull request Mar 14, 2024
@stoobie stoobie mentioned this pull request Mar 14, 2024
2 tasks
stoobie added a commit that referenced this pull request Mar 14, 2024
xiaolou86 pushed a commit to xiaolou86/starknet-docs that referenced this pull request Apr 7, 2024
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.

*Seeking Contribution* [FIX] Generate previews from forked repos. This currently doesn't work.
3 participants