-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Added support for chatops using prettier and github actions #37
base: master
Are you sure you want to change the base?
Conversation
I saw some blogs, where we can put more features in this. Like putting a reaction ( emoji ) after jobs complete and admin-level rights to call the jobs. |
Ya... You can... I will suggest that can you open a issue for that, maybe others who are interested can also work on it. |
.github/workflows/prettier.yml
Outdated
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: r-lib/actions/setup-r@master | ||
- name: Install | ||
run: yarn run prettier --write '**/*.{css,js,vue}' |
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.
right now we won't have .vue type file. So you can remove it. Also, you must add .html.
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.
Sure 👍
.github/workflows/prettier.yml
Outdated
- id: file_changes | ||
uses: trilom/[email protected] | ||
- name: testing | ||
run: echo '${{ steps.file_changes.outputs.files_modified}}' |
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.
I won't think we need this as you are running prettier in all the files.
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.
ok, I will look into this step.
Thanks for pointing out
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.
Please make the changes.
package.json
Outdated
{ | ||
"name": "simple-static-website", | ||
"version": "1.0.0", | ||
"description": "This repository will help beginners who have just completed the Git course & want to apply their theoretical knowledge.", | ||
"main": "index.js", | ||
"dependencies": { | ||
"prettier": "2.0.5" | ||
}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tushar5526/simple-static-website.git" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/tushar5526/simple-static-website/issues" | ||
}, | ||
"homepage": "https://github.com/tushar5526/simple-static-website#readme" | ||
} |
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.
do we need this file?
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.
I am not well versed with node.js, but prettier was giving up errors. So I installed it before hand, but I can try a work around in which I install prettier at run time and add files by their extensions, instead of adding all files using git add .
yarn.lock
Outdated
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
[email protected]: | ||
version "2.0.5" | ||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" | ||
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== |
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.
same goes for this
Formatting will happen only when we use /style in conversation of a PR Currently, it formats the files with .js .html and .css extensions
right now we won't have JSX files in the repo. So it will have no significance. |
Any other changes @rahul799 ? |
https://github.com/tushar5526/simpleWebsiteSandbox/pull/9#issuecomment-645875108 please have a look. |
It will be good if you debug that. |
ok let us leave it for now. I think we are good to go. |
I have changed it in sandbox website I have, and made an issue for someone else to fix it here.` |
Job built successfully link |
Good job tushar. Keep it up.
…On Thu, 18 Jun, 2020, 4:46 pm Tushar, ***@***.***> wrote:
Job built successfully link
<https://github.com/tushar5526/simpleWebsiteSandbox/runs/784058068?check_suite_focus=true>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ43Q2X5OZ5PQEQAREGWLDLRXHZRBANCNFSM4N6PVAYA>
.
|
Looking for next tasks :P @rahul799 |
For now, we are good to merge it. |
@tushar5526. I think its better to wait till this gets merged. Especially since we might transition the entire code here as a config to hydrabot. Wait for the PR to be merged and then we can create a separate for the remainder |
Sure @und3fined-v01d |
@und3fined-v01d so are you going to merge it? |
Closes #35
This PR adds a workflow which uses prettier to auto-format the files with js css vue jsx files
Steps Followed :
Initialized npm in the repo
Added .gitignore to ignore node-modules
Added the workflow in prettier.yml inside .github/workflows
Formatting will happen only when we use /style in conversation of a PR