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

- ci - Add shell-functions shGitPullrequestCleanup(), shGitPullrequest() to automatically cleanup or create-and-push github-pull-commit to origin/alpha. #460

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master
workflow_dispatch:
env:
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
zzzz1234: 1
jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# Publish to GitHub Packages
- run: sh jslint_ci.sh shCiPublishNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_REGISTRY: github

# Setup .npmrc file to publish to npm
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- jslint - try to improve parser to be able to parse jquery.js without stopping.

# v2024.3.1-beta
- ci - Add shell-functions shGitPullrequestCleanup(), shGitPullrequest() to automatically cleanup or create-and-push github-pull-commit to origin/alpha.
- jslint - Allow destructuring-assignment after function-definition.
- ci - Replace npm-package used to auto-build vscode-plugin, vsce to @vscode/vsce.
- test - Update test-function jstestDescribe() to wait awhile for imports to initialize before running tests.
Expand Down
160 changes: 77 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ Douglas Crockford <douglas@crockford.com>
12. [License](#license)

13. [Devops Instruction](#devops-instruction)
- [pull-request merge](#pull-request-merge)
- [branch-master commit](#branch-master-commit)
- [branch-master publish](#branch-master-publish)
- [pull-request merge](#pull-request-merge)
- [vscode-jslint publish](#vscode-jslint-publish)


Expand Down Expand Up @@ -915,115 +915,109 @@ eval("1"); //jslint-ignore-line


<br><br>
### branch-master commit
- $ `shGitSquashPop <commit-beta> '# v20yy.mm.dd\n<release notes from CHANGELOG.md>'`
- verify correct-year `20yy`
- $ `git push origin alpha:branch-v20yy.mm.dd`
### pull-request merge
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, https://github.com/jslint-org/jslint/pulls/, and add +1 to it for PR-xxx
- $ `shGitPullrequest beta beta`
- verify ci-success for origin-branch-alpha
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- $ `git push upstream alpha -f`
- verify ci-success for upstream-branch-alpha
- verify ci-success for upstream-branch-alpha
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- goto https://github.com/kaizhu256/jslint/pulls
- click `New pull request`
- click `base repository: jslint-org/jslint base:beta`
- click `head repository: kaizhu256/jslint compare:branch-v20yy.mm.dd`
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.3.21
- click `Create pull request`
- input `Add your description here...` with:
```
Fixes #xxx.
- <primary-commit-message>

This PR will ...

this PR will additionally:
- <secondary-commit-message>
...

<screenshot>
```
- verify `commit into jslint-org:beta`
- click `Create pull request`
- verify ci-success for pull-request
- verify ci-success for pull-request
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
- wait awhile before continuing ...
- click `Rebase and merge`
- verify ci-success for upstream-branch-beta
- verify ci-success for upstream-branch-beta
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
```shell
git fetch upstream beta
git diff alpha..upstream/beta
# verify no diff between alpha..upstream/beta
git reset upstream/beta
git push origin alpha -f
git push origin alpha:beta
shMyciUpdate
git push upstream alpha -f
```
- verify ci-success for origin-branch-alpha
- $ `shGitPullrequestCleanup`
- verify ci-success for origin-branch-alpha
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- verify ci-success for upstream-branch-alpha
- $ `git push upstream alpha -f`
- verify ci-success for upstream-branch-alpha
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- click `Delete branch`
```shell
git push origin beta:master
git push upstream beta:master


<br><br>
### branch-master commit
- $ `shGitPullrequest master beta`
- verify ci-success for origin-branch-alpha
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- $ `git push upstream alpha -f`
- verify ci-success for upstream-branch-alpha
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2023.10.24
- click `Create pull request`
- input `Add a title` with: `# v20yy.mm.dd`
- input `Add a description` with:
```
- verify ci-success for origin-branch-master
- <primary-commit-message>
- <secondary-commit-message>
```
- verify `commit into jslint-org:beta`
- click `Create pull request`
- verify ci-success for pull-request
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
- wait awhile before continuing ...
- click `Rebase and merge`
- verify ci-success for upstream-branch-beta
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- $ `shGitPullrequestCleanup`
- verify ci-success for origin-branch-alpha
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- verify ci-success for upstream-branch-master
- $ `git push upstream alpha -f`
- verify ci-success for upstream-branch-alpha
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- click `Delete branch`
- $ `git push origin beta:master`
- verify ci-success for origin-branch-master
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- $ `git push upstream beta:master`
- verify ci-success for upstream-branch-master
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml


<br><br>
### branch-master publish
- $ `git push upstream beta:master`
- verify ci-success for upstream-branch-master
- verify ci-success for upstream-branch-master
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- goto https://github.com/jslint-org/jslint/releases/new
- input tag `v20yy.mm.dd`
- input `Choose a tag` with: `v20yy.mm.dd`
- click `Create new tag: v20yy.mm.dd on publish`
- verify correct-year `20yy`
- click `Target: master`
- input `Release title: v20yy.mm.dd - <description>`
- copy-paste release notes from CHANGELOG.md
- select `Target: master`
- select `Previous tag:auto`
- input `Release title` with: `v20yy.mm.dd - <primary-commit-message>`
- input `Describe this release` with:
```
- <primary-commit-message>
- <secondary-commit-message>
```
- click `Generate release notes`
- click `Set as the latest release`
- click `Preview` and review
- click `Publish release`
- verify ci-success for upstream-branch-publish
- verify ci-success for upstream-branch-publish
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`


<br><br>
### pull-request merge
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, https://github.com/jslint-org/jslint/pulls/, and add +1 to it for PR-xxx
```shell
git push origin alpha:branch_xxx
git push upstream alpha
```
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:alpha
- select branch to merge
- click `Create pull request`
- `Add a description` template:
```
Fixes #xxx.
- <primary-commit-message>

This PR will ...

this PR will additionally:
- <secondary-commit-messages>
...

<screenshot>
```
- verify `commit into jslint-org:beta`
- click `Create pull request`
- verify ci-success for pull-request
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
- click `Rebase and merge`
- verify ci-success for upstream-branch-beta
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
```shell
git fetch upstream beta
git diff alpha..upstream/beta
# verify no diff between alpha..upstream/beta
git reset upstream/beta
git push origin alpha -f
git push origin alpha:beta
shMyciUpdate
git push upstream alpha -f
```
- verify ci-success for origin-branch-alpha
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
- verify ci-success for upstream-branch-alpha
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
- click `Delete branch`
- verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`


<br><br>
Expand Down