Skip to content

refactor(preview-comment): auto-fill the github token#156

Merged
byCedric merged 3 commits intomainfrom
cedric/refactor/preview-token
Jan 25, 2022
Merged

refactor(preview-comment): auto-fill the github token#156
byCedric merged 3 commits intomainfrom
cedric/refactor/preview-token

Conversation

@byCedric
Copy link
Copy Markdown
Member

@byCedric byCedric commented Jan 24, 2022

Linked issue

This change allows the preview-action to inehrit the token from the current run. It does that by setting a default value for github-token to ${{ github.token }}.

This would make it way easier to set previews up, by not thinking about that token at all. But, it's a bit more "intrusive" compared to the previous way.

@byCedric byCedric requested a review from jonsamp January 24, 2022 13:05
github-token:
description: GitHub access token to comment on PRs
required: false
default: ${{ github.token }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is where the magic happens, it uses the github context to auto-fill the token on github-token.

@byCedric byCedric force-pushed the cedric/refactor/preview-token branch from d9d5d07 to e25237b Compare January 24, 2022 13:13
Copy link
Copy Markdown
Member

@jonsamp jonsamp left a comment

Choose a reason for hiding this comment

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

this makes things simpler so im a fan!

@byCedric byCedric merged commit 204dfed into main Jan 25, 2022
@byCedric byCedric deleted the cedric/refactor/preview-token branch January 25, 2022 16:47
github-actions Bot pushed a commit that referenced this pull request Jan 25, 2022
### [7.0.2](7.0.1...7.0.2) (2022-01-25)

### Code changes

* **preview-comment:** auto-fill the github token ([#156](#156)) ([204dfed](204dfed))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 7.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants