Skip to content
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

Correct .gitignore for videos and screenshots created by running examples #677

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

MikeMcC399
Copy link
Collaborator

This PR resolves issue #676 "locally created screenshots and videos in examples are queued for commit".

It corrects the syntax in .gitignore so that the screenshots and videos directories, which may be created through running examples locally, are correctly found and excluded from any git commit. Additionally the directory downloads is marked for exclusion.

The incorrectly committed directory examples/v10/chrome/cypress/screenshots is removed from the repository.

Verification

  1. In a local clone of the repository, execute:
cd examples/v10/quiet
npm ci
npx cypress run --browser chrome
git status

and check that git finds no screenshots or videos to commit

$ git status
On branch master
nothing to commit, working tree clean
  1. Check that cypress-io/github-action/examples/v10/chrome/cypress/screenshots no longer exists.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Dec 16, 2022

Note that the line
cypress/videos/
in .gitignore is ineffective and could be removed. It would only match at the top level of the repository, where there is in fact no cypress directory present.

Edit: I decided to remove it. Having it there is misleading as it gives the impression it might be doing something.
node_modules/ finds nested directories because it only has a slash at the end, not in the middle. See reference documentation https://git-scm.com/docs/gitignore for details about how this works.

Ensure that videos, screenshots and downloads in the examples are excluded from git commit
Purge incorrectly committed screenshots
Copy link
Contributor

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Dec 19, 2022

@jaffrepaul

Great, thank you.

You're welcome! One of several minor things that just need a bit of attention.

yarn also needs to be dealt with at some stage in .gitignore, but I would separate this out. It only affects two examples. Edit: not necessary for yarn classic (v1).

@jaffrepaul jaffrepaul merged commit 35d6f54 into cypress-io:master Dec 19, 2022
@github-actions
Copy link

🎉 This PR is included in version 5.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jaffrepaul
Copy link
Contributor

@MikeMcC399 this merge triggered a release. My fault, my plan is to cut a release with everything else we worked on very soon.

kodiakhq bot referenced this pull request in weareinreach/InReach Dec 20, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://togithub.com/actions/checkout) | action | digest | `7dd9e2a` -> `755da8c` |
| [chromaui/action](https://togithub.com/chromaui/action) | action | digest | `0ec8cd8` -> `2440d35` |
| [cypress-io/github-action](https://togithub.com/cypress-io/github-action) | action | patch | `v5.0.0` -> `v5.0.2` |
| [github/codeql-action](https://togithub.com/github/codeql-action) | action | digest | `a669cc5` -> `959cbb7` |
| [tinkurlab/monorepo-pr-labeler-action](https://togithub.com/tinkurlab/monorepo-pr-labeler-action) | action | patch | `4.1.2` -> `4.1.3` |

---

### Release Notes

<details>
<summary>cypress-io/github-action</summary>

### [`v5.0.2`](https://togithub.com/cypress-io/github-action/releases/tag/v5.0.2)

[Compare Source](https://togithub.com/cypress-io/github-action/compare/v5.0.1...v5.0.2)

Numerous housekeeping updates to bring this action back up to speed.

\*In combination with v5.0.1, which triggered without a new dist build.

👏 Special thanks to [@&#8203;MikeMcC399](https://togithub.com/MikeMcC399) for all the diligent work! 👏

**Fix Failed Tests**

-   [https://github.com/cypress-io/github-action/pull/643](https://togithub.com/cypress-io/github-action/pull/643)
-   [https://github.com/cypress-io/github-action/pull/658](https://togithub.com/cypress-io/github-action/pull/658)
-   [https://github.com/cypress-io/github-action/pull/660](https://togithub.com/cypress-io/github-action/pull/660)

**Update Dependencies**

-   [https://github.com/cypress-io/github-action/pull/644](https://togithub.com/cypress-io/github-action/pull/644)
-   [https://github.com/cypress-io/github-action/pull/650](https://togithub.com/cypress-io/github-action/pull/650)

**Resolve Warnings**

-   [https://github.com/cypress-io/github-action/pull/651](https://togithub.com/cypress-io/github-action/pull/651)
-   [https://github.com/cypress-io/github-action/pull/666](https://togithub.com/cypress-io/github-action/pull/666)
-   [https://github.com/cypress-io/github-action/pull/670](https://togithub.com/cypress-io/github-action/pull/670)
-   [https://github.com/cypress-io/github-action/pull/675](https://togithub.com/cypress-io/github-action/pull/675)

**Docs/Example Updates**

-   [https://github.com/cypress-io/github-action/pull/665](https://togithub.com/cypress-io/github-action/pull/665)
-   [https://github.com/cypress-io/github-action/pull/668](https://togithub.com/cypress-io/github-action/pull/668)

**Tooling Updates:**

-   [https://github.com/cypress-io/github-action/pull/667](https://togithub.com/cypress-io/github-action/pull/667)
-   [https://github.com/cypress-io/github-action/pull/677](https://togithub.com/cypress-io/github-action/pull/677)

### [`v5.0.1`](https://togithub.com/cypress-io/github-action/releases/tag/v5.0.1)

[Compare Source](https://togithub.com/cypress-io/github-action/compare/v5.0.0...v5.0.1)

##### Bug Fixes

-   correct .gitignore for videos and screenshots ([89e59e5](https://togithub.com/cypress-io/github-action/commit/89e59e5cfc7760513fe9e9ce4c690345d94eb27a))

</details>

<details>
<summary>tinkurlab/monorepo-pr-labeler-action</summary>

### [`v4.1.3`](https://togithub.com/TinkurLab/monorepo-pr-labeler-action/releases/tag/4.1.3): Monorepo PR Labeler v4.1.3

[Compare Source](https://togithub.com/tinkurlab/monorepo-pr-labeler-action/compare/4.1.2...4.1.3)

Changes include:

Bug fix to ignore directories starting with a dot `.` but not directories that contain a dot `.`. According to the docs, this action should ignore mono repos that begin with a dot but it currently ignores also mono repo with a dot even if it is not the first character. Thanks to [@&#8203;MoLow](https://togithub.com/MoLow) for the fix!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/weareinreach/InReach).



PR-URL: #107
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@MikeMcC399 MikeMcC399 deleted the fix/gitignore branch December 20, 2022 06:22
@MikeMcC399
Copy link
Collaborator Author

@jaffrepaul

this merge triggered a release. My fault, my plan is to cut a release with everything else we worked on very soon.

Sorry, if this was not in line with your plans. I was the one who added fix: into the commit. It was the first fix which generically affected the repository, the other fixes were about tools or examples tests. I struggled a little deciding in the past whether or not to label something a fix: because the action and examples of using the action are bundled into one repository, so is the version number only supposed to refer to the action or should it also refer to the examples?

I will check with you in future before using any of the release-triggering tags fix: / feat: / perf:.

@jaffrepaul
Copy link
Contributor

@jaffrepaul

this merge triggered a release. My fault, my plan is to cut a release with everything else we worked on very soon.

Sorry, if this was not in line with your plans. I was the one who added fix: into the commit. It was the first fix which generically affected the repository, the other fixes were about tools or examples tests. I struggled a little deciding in the past whether or not to label something a fix: because the action and examples of using the action are bundled into one repository, so is the version number only supposed to refer to the action or should it also refer to the examples?

I will check with you in future before using any of the release-triggering tags fix: / feat: / perf:.

Not a problem. We're juggling a number of repos and I just didn't spot it. I'm happy to accept all the great fixes here, so we get them in even if it's a little clunky. This was a bit out of the normal routine here but I'm putting thought into how to better maintain these repos in the future, including the release strategy ✅

@MikeMcC399
Copy link
Collaborator Author

It's good that you are thinking about improvements. It seems that this repository has gathered dust over time and fixing it is a bit like peeling an onion, with layers of things which need to be looked at. This repository also links to many outdated examples, even non-working ones, in other repositories. These would also need reviewing at some stage.

@jaffrepaul
Copy link
Contributor

Indeed.

Side note, you should join the Cypress Discord server. If you shoot me a DM there, I can look into sending you some Cypress swag 🎉

@MikeMcC399
Copy link
Collaborator Author

@jaffrepaul

Side note, you should join the Cypress Discord server. If you shoot me a DM there, I can look into sending you some Cypress swag 🎉

Thanks for the recognition and offer! I have joined Cypress Discord with the same username as I´m using here on GitHub. I didn´t manage to find you there in order to connect up, so if you could either post your username or DM me, then we can move some of our conversations over there. I won´t be so active the next days though due to the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants