Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:github [2024/12/04 08:42]
tomas
dev:github [2025/02/12 14:47] (current)
tomas
Line 1: Line 1:
-==GitHub Copilot===+==GitHub Copilot==
  
 Explain this project\\ Explain this project\\
Line 15: Line 15:
 Can you please write a terraform script that deploys azure web app with deployment slots\\ Can you please write a terraform script that deploys azure web app with deployment slots\\
 Can you add code comments into the script?\\ Can you add code comments into the script?\\
 +Can you add inline comments in this file?\\
 +Add JSDoc comments for the TaskManager function?\\
 +Refactor the code in the file. Add the inline comment explaining the purpose of the refactored code\\
 +Create usage examples or descriptions for the class and its methods\\
 Can you fix the bugs in the code?\\ Can you fix the bugs in the code?\\
 /tests\\ /tests\\
 Can you please generate unit test with terratest?\\ Can you please generate unit test with terratest?\\
 +Convert the current file from json to yaml format\\
 +
 +===VSCode Copilot zkratky===
 +ctrp-enter ... otevře okno pro doplňování kódu\\
  
 ==Repozitáře== ==Repozitáře==
Line 25: Line 33:
 ==GH - GitHub CLI== ==GH - GitHub CLI==
 gh alias set iv 'issue view --comments' ... vytvoření aliasu\\ gh alias set iv 'issue view --comments' ... vytvoření aliasu\\
 +gh api -X GET 'orgs/MYORG/teams/TEAM/members' -F per_page=100 --paginate --ca --jq '[.[].login] | map("involves:\(.)") | join(" ")' ... volání api, neřeším token jak v CURLu, použiji nativně jq zpracování\\
 gh iv https://github.com/a/b/issues/4 ... použití aliasu, zobrazení komentářů pro issue 5\\ gh iv https://github.com/a/b/issues/4 ... použití aliasu, zobrazení komentářů pro issue 5\\
 gh issue view --comments https://github.com/a/b/issues/4 ... zobrazení komentářů pro issue 5\\ gh issue view --comments https://github.com/a/b/issues/4 ... zobrazení komentářů pro issue 5\\
Line 31: Line 40:
 gh org list ... seznam organizací\\ gh org list ... seznam organizací\\
 gh pr list ... seznam pull requestů\\ gh pr list ... seznam pull requestů\\
 +gh pr view 462 ... zobrazí PR 462\\
 +gh pr merge 462 ... mergne PR 462\\
 gh run list ... reznam běhů akcí\\ gh run list ... reznam běhů akcí\\
 gh workflow list ... seznam akcí - workflow\\ gh workflow list ... seznam akcí - workflow\\
  
 +===GH CLI v GH Akcích===
 +<code>
 +steps:
 +  - name: Auto-merge nových PR
 +    run: gh pr merge --auto --merge "$PR_URL"
 +    env:
 +      PR_URL: ${{github.event.pull_request.html_url}}
 +      GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
 +</code>
  
 +<code>
 +- name: Vytvoření releasu, přiložení souborů
 +  run: |
 +    tagname="${GITHUB_REF#refs/tags/}"
 +    gh release create "$tagname" dist/*.tgz
 +  env:
 +    GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
 +</code>