├── README.md ├── CODEOWNERS ├── cat_picture1.jpg ├── cat_picture2.jpeg ├── cat_picture3.jpeg ├── cat_picture4.jpeg ├── cat_picture5.jpeg ├── app.js ├── index.html └── .github └── workflows └── manual.yml /README.md: -------------------------------------------------------------------------------- 1 | cat-clicker 2 | =========== 3 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @udacity/active-public-content -------------------------------------------------------------------------------- /cat_picture1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/udacity/ud989-cat-clicker-andy/HEAD/cat_picture1.jpg -------------------------------------------------------------------------------- /cat_picture2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/udacity/ud989-cat-clicker-andy/HEAD/cat_picture2.jpeg -------------------------------------------------------------------------------- /cat_picture3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/udacity/ud989-cat-clicker-andy/HEAD/cat_picture3.jpeg -------------------------------------------------------------------------------- /cat_picture4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/udacity/ud989-cat-clicker-andy/HEAD/cat_picture4.jpeg -------------------------------------------------------------------------------- /cat_picture5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/udacity/ud989-cat-clicker-andy/HEAD/cat_picture5.jpeg -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | 2 | var cats = $(".cat"); 3 | var buttons = $("button"); 4 | 5 | function hideAllCats(){ 6 | for (var i=0; i .counter").text(); 22 | count = parseInt(count) + 1; 23 | $(cat+" > .counter").text(count); 24 | }) 25 | } 26 | 27 | for (var i=1; i<=buttons.length; i++){ 28 | bindButtonToCat(i); 29 | } 30 | 31 | for (var i=1; i<=cats.length; i++){ 32 | bindCounterToCat(i); 33 | } 34 | 35 | hideAllCats(); 36 | $("#cat1").show(); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Cat Clicker 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 0 clicks 17 |
18 | 19 |
20 |
21 | 0 clicks 22 |
23 | 24 |
25 |
26 | 0 clicks 27 |
28 | 29 |
30 |
31 | 0 clicks 32 |
33 | 34 |
35 |
36 | 0 clicks 37 |
38 | 39 |
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /.github/workflows/manual.yml: -------------------------------------------------------------------------------- 1 | # Workflow to ensure whenever a Github PR is submitted, 2 | # a JIRA ticket gets created automatically. 3 | name: Manual Workflow 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on pull request events but only for the master branch 8 | pull_request_target: 9 | types: [opened, reopened] 10 | 11 | # Allows you to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | jobs: 15 | test-transition-issue: 16 | name: Convert Github Issue to Jira Issue 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@master 21 | 22 | - name: Login 23 | uses: atlassian/gajira-login@master 24 | env: 25 | JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} 26 | JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} 27 | JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} 28 | 29 | - name: Create NEW JIRA ticket 30 | id: create 31 | uses: atlassian/gajira-create@master 32 | with: 33 | project: CONUPDATE 34 | issuetype: Task 35 | summary: | 36 | Github PR [Assign the ND component] | Repo: ${{ github.repository }} | PR# ${{github.event.number}} 37 | description: | 38 | Repo link: https://github.com/${{ github.repository }} 39 | PR no. ${{ github.event.pull_request.number }} 40 | PR title: ${{ github.event.pull_request.title }} 41 | PR description: ${{ github.event.pull_request.description }} 42 | In addition, please resolve other issues, if any. 43 | fields: '{"components": [{"name":"Github PR"}], "customfield_16449":"https://classroom.udacity.com/", "customfield_16450":"Resolve the PR", "labels": ["github"], "priority":{"id": "4"}}' 44 | 45 | - name: Log created issue 46 | run: echo "Issue ${{ steps.create.outputs.issue }} was created" 47 | --------------------------------------------------------------------------------