Skip to content

Commit

Permalink
Merge pull request #1265 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Oct 20, 2023
2 parents 7138853 + e2753d2 commit 6fd5cc6
Show file tree
Hide file tree
Showing 13 changed files with 34,351 additions and 17,803 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node:16-bullseye",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20-bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/typescript:2.0.9": {}
"ghcr.io/devcontainers-contrib/features/typescript:2.0.14": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set Node.js 16.x
- name: Set Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x

- name: Build Action
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set Node.js 16.x
- name: Set Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x

- name: Install NPM
run: |
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: echo "CHANGELOG"

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Build Changelog"
id: github_release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,20 @@ From GitHub codespaces, open the terminal panel -> Click the small arrow down be

Permissions depend on the specific usecase, however this action only requires `read-only` permissions as it will not make modifications to the repository.

### GitHub actions

Depending on the given environment it may be required to define teh token scope for GitHub actions to `read` for `contents` and `pull-requests`.

```
permissions:
contents: read
pull-requests: read
```

[GitHub Actions token scope](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes).

### `Fine-grained personal access tokens`

For `Fine-grained personal access tokens` this means:

- `read` for [Pull requests](https://github.com/mikepenz/release-changelog-builder-action/blob/develop/pr-collector/src/pullRequests.ts#L124)
Expand All @@ -638,8 +652,12 @@ For `Fine-grained personal access tokens` this means:
- `read` to [list reviews](https://github.com/mikepenz/release-changelog-builder-action/blob/develop/pr-collector/src/pullRequests.ts#L186)
- Covered by the `contents` scope

### Classic tokens

For Classic tokens you only have to create the token without special permissions.



## Developed By

* Mike Penz
Expand Down
6 changes: 1 addition & 5 deletions __tests__/releaseNotesBuilderPull.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ import {checkExportedData, mergeConfiguration, resolveConfiguration} from '../sr
import {Octokit} from '@octokit/rest'
import {buildChangelog} from '../src/transform'
import {pullData} from '../src/pr-collector/prCollector'
import fetch from 'node-fetch'
import {Data} from '../src/releaseNotesBuilder'

jest.setTimeout(180000)

// load octokit instance
const enablePullData = false // if false -> use cache for data
const octokit = new Octokit({
auth: `token ${process.env.GITHUB_TOKEN}`,
request: {
fetch: fetch
}
auth: `token ${process.env.GITHUB_TOKEN}`
})

it('Should have empty changelog (tags)', async () => {
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ outputs:
cache:
description: 'Cache containing this runs data. Allows to re-use collected information multiple times to generate different release notes.'
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
Loading

0 comments on commit 6fd5cc6

Please sign in to comment.