-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adds GitHub action to update notion #1
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
Conversation
Apologies for the huge change, but there is no other way to do it. The node_modules has to be there in the repository. Example GitHub Action: |
Hey @techpool! Would it be possible to do an interactive rebase and have the node_modules be in a separate commit? This way we could review all the other changes rather easily and skip the node_modules. |
a2261c3
to
78d4e23
Compare
@shentao I cleaned up the commit history to be a bit clean and have a separate commit for node modules. Hope this helps! |
a5d73ef
to
27a7577
Compare
Frankly, it's still difficult to review this even if there is one commit with node modules. Can we create PR to this PR with the node modules to leave only "meaningful" changes here, please? Also, maybe I don't get how GHA works internally, but what prevents us from checking out the code and running |
Can do that as well. We'll anyway have to checkout to this repository in other repositories. |
Probably just has to be tried out to be sure it works that way. But technically that does make sense and also possible. |
@kubakrzempek have pushed in only relevant changes with no node_modules. Technically this should still be possible by installing node_modules before using it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely :)
@@ -0,0 +1,126 @@ | |||
# Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lot's of defaults there. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah just copied the default node.js .gitignore. 😅 . Shall I revert it back to a trimmed down minimal gitignore?
} else if (commitMessage.match(/#+[0-9]/)) { | ||
// direct from open PR to staging | ||
const prNumber = commitMessage.split('#')[1].replace(/\D/g, '') | ||
notionUtil.updateByPR(`${repositoryName}/pull/${prNumber}`, 'Completed (Production)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this possible to have a regex or wildcard here? What if someone posted PR link with /files
(e.g. https://github.com/coursedog/notion-scripts/pull/1/files
)? I see it from time to time on notion and I think in that case the integration won't work
utils/notion.js
Outdated
{ | ||
property: this.labels.GITHUB_PR, | ||
text: { | ||
ends_with: pr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... continue on my previous comment, starts_with:
? If it's available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it to starts_with
property. And it is available as a filter:
https://developers.notion.com/reference/post-database-query#text-filter-condition
Changes: