diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml new file mode 100644 index 0000000..1e76ecf --- /dev/null +++ b/.github/workflows/add-issue-to-project.yml @@ -0,0 +1,20 @@ +name: '[Automation] Add issue to project' +on: + issues: + types: [opened] + +jobs: + cresate-issue-card: + runs-on: ubuntu-latest + steps: + - name: Add issue to project board + uses: actions/github-script@v5 + continue-on-error: true + with: + github-token: ${{ secrets.ADMIN_PAT }} + script: | + github.rest.projects.createCard({ + column_id: 17134543, + content_id: context.payload.issue.id, + content_type: "Issue" + }); diff --git a/.github/workflows/add-label-to-review.yml b/.github/workflows/add-label-to-review.yml new file mode 100644 index 0000000..e6898cf --- /dev/null +++ b/.github/workflows/add-label-to-review.yml @@ -0,0 +1,22 @@ +name: '[Automation] Add review label' +on: + pull_request_review: + types: [submitted] + pull_request: + types: [review_requested] + pull_request_target: + +jobs: + apply-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + github-token: ${{ secrets.ADMIN_PAT }} || ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['Review'] + }) diff --git a/.github/workflows/add-pr-to-project.yml b/.github/workflows/add-pr-to-project.yml new file mode 100644 index 0000000..f2a57a2 --- /dev/null +++ b/.github/workflows/add-pr-to-project.yml @@ -0,0 +1,38 @@ +# GitHub-script action https://github.com/actions/github-script +# GitHub context https://docs.github.com/en/actions/learn-github-actions/contexts#github-context +name: '[Automation] Add PR to project' +on: + pull_request_target: + pull_request: + types: [opened] + +jobs: + create-pr-card: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Add PR to project board + uses: actions/github-script@v5 + continue-on-error: true + with: + github-token: ${{ secrets.ADMIN_PAT }} + script: | + github.rest.projects.createCard({ + column_id: 17134543, # IN_PROGRESS column + content_id: context.payload.pull_request.id, + content_type: "PullRequest" + }); + + - name: Add PR to project board + continue-on-error: true + env: + USER: "${{ github.actor }}" + TOKEN: "${{ secrets.ADMIN_PAT }}" + run: | + curl -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -u ${USER}:${TOKEN} \ + -d '{"content_id": context.payload.pull_request.id, "content_type": "PullRequest", "column_id": 17134543 }' \ + https://api.github.com/projects/columns/17134543/cards diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 90216d7..aac208b 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,13 +1,3 @@ - - - - - - - - - - # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support @@ -45,9 +35,3 @@ jobs: run: gem install type-on-strap jekyll-theme-type-on-strap #- name: Run tests # run: bundle exec rake - - - - - - diff --git a/.github/workflows/view-context.yml b/.github/workflows/view-context.yml new file mode 100644 index 0000000..7da2871 --- /dev/null +++ b/.github/workflows/view-context.yml @@ -0,0 +1,30 @@ +name: 'Context' + +on: + push: + pull_request: + pull_request_review: + pull_request_target: + issues: + project: + workflow_call: + workflow_dispatch: + + +jobs: + view-context: + runs-on: ubuntu-latest + steps: + - name: View context attributes + continue-on-error: true + uses: actions/github-script@v5 + with: + script: console.log(context) + - name: Check secret + shell: bash + env: # Or as an environment variable + SUPER_SECRET: ${{ secrets.SuperSecret }} + USER: ${{ github.actor }} + run: | + echo "Secret: $SUPER_SECRET" + echo "${USER}" diff --git a/.gitignore b/.gitignore index 210ed3c..4cc7d8e 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,97 @@ dist # TernJS port file .tern-port .idea/* + + +Skip to content +Pull requests +Issues +Marketplace +Explore +@sylhare +sylhare / +Vermelinho +Public + +1 +0 + + 0 + +Code +Issues +Pull requests +Actions +Projects +Wiki +Security +Insights + + Settings + +Vermelinho/.gitignore +@sylhare +sylhare Add basic gem +Latest commit 44db84a on Jul 15 +History +1 contributor +58 lines (49 sloc) 1.19 KB +.idea/ +*.gem +*.iml +*.rbc +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +# .env + +# Ignore Byebug command history file. +.byebug_history + +## Specific to RubyMotion: +.dat* +.repl_history +build/ +*.bridgesupport +build-iPhoneOS/ +build-iPhoneSimulator/ + +## Specific to RubyMotion (use of CocoaPods): +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# vendor/Pods/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# Used by RuboCop. Remote config files pulled in from inherit_from directive. +# .rubocop-https?--* +Loading complete