Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octokit/auth-token.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.2
Choose a base ref
...
head repository: octokit/auth-token.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.3
Choose a head ref

Commits on Oct 13, 2022

  1. Copy the full SHA
    660fb04 View commit details

Commits on Oct 17, 2022

  1. build(deps): lock file maintenance (#284)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 17, 2022
    Copy the full SHA
    0c3ea9f View commit details

Commits on Oct 24, 2022

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2022
    Copy the full SHA
    69d0256 View commit details

Commits on Oct 31, 2022

  1. build(deps): lock file maintenance (#289)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 31, 2022
    Copy the full SHA
    902a172 View commit details

Commits on Nov 7, 2022

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 7, 2022
    Copy the full SHA
    a13c86e View commit details
  2. Copy the full SHA
    63e5e69 View commit details
  3. Copy the full SHA
    a614e6c View commit details

Commits on Nov 14, 2022

  1. Add PR templates (#294)

    feat: add pull_request_template.md PR template
    nickfloyd authored Nov 14, 2022
    Copy the full SHA
    4c075cc View commit details

Commits on Nov 23, 2022

  1. chore(deps): update dependency prettier to v2.8.0

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 23, 2022
    Copy the full SHA
    bfd7ce8 View commit details

Commits on Nov 28, 2022

  1. build(deps): lock file maintenance (#297)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 28, 2022
    Copy the full SHA
    ee430f2 View commit details

Commits on Dec 5, 2022

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 5, 2022
    Copy the full SHA
    8043ef7 View commit details

Commits on Dec 7, 2022

  1. Copy the full SHA
    c02df08 View commit details
  2. Copy the full SHA
    5f7d211 View commit details

Commits on Dec 12, 2022

  1. build(deps): lock file maintenance (#301)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 12, 2022
    Copy the full SHA
    ead9d6e View commit details
  2. Workflow linting fix (#302)

    Updates for workflows
    octokitbot authored Dec 12, 2022
    Copy the full SHA
    1d395a0 View commit details

Commits on Dec 16, 2022

  1. workflows(add_to_octokit_project): add pull_request_target event as…

    … a trigger (#303)
    
    Updates for workflows
    octokitbot authored Dec 16, 2022
    Copy the full SHA
    e5c6ffd View commit details

Commits on Dec 19, 2022

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 19, 2022
    Copy the full SHA
    d01267c View commit details

Commits on Dec 27, 2022

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 27, 2022
    Copy the full SHA
    0d7ac3a View commit details

Commits on Jan 3, 2023

  1. 🚧 Workflows have changed (#307)

    Updates for workflows
    octokitbot authored Jan 3, 2023
    Copy the full SHA
    14cb3d0 View commit details
  2. build(deps): lock file maintenance (#306)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 3, 2023
    Copy the full SHA
    fc898e8 View commit details

Commits on Jan 7, 2023

  1. chore(deps): update dependency prettier to v2.8.2 (#309)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 7, 2023
    Copy the full SHA
    f282d0b View commit details
  2. chore(deps): update dependency semantic-release to v20

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 7, 2023
    Copy the full SHA
    adc948f View commit details

Commits on Jan 8, 2023

  1. Copy the full SHA
    ce35464 View commit details

Commits on Jan 9, 2023

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 9, 2023
    Copy the full SHA
    2b376de View commit details
  2. 🚧 Workflows have changed (#311)

    Updates for workflows
    octokitbot authored Jan 9, 2023
    Copy the full SHA
    182f98e View commit details

Commits on Jan 10, 2023

  1. Copy the full SHA
    a90fcd8 View commit details

Commits on Jan 14, 2023

  1. chore(deps): update dependency prettier to v2.8.3

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 14, 2023
    Copy the full SHA
    2f5b5dd View commit details

Commits on Jan 16, 2023

  1. build(deps): lock file maintenance

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 16, 2023
    Copy the full SHA
    a187ec8 View commit details

Commits on Jan 20, 2023

  1. fix(deps): update dependency @octokit/types to v9 (#315)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 20, 2023
    Copy the full SHA
    18d36a1 View commit details
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bug
description: File a bug report
title: "[BUG]: "
labels: ["Type: Bug", "Status: Triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you do? What happened? What did you expect to happen?
placeholder: Put your description of the bug here.
validations:
required: true
- type: textarea
id: versions
attributes:
label: Versions
description: What versions of the relevant software are you running?
placeholder: Octokit.js v2.0.10, Node v16.18.0
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Please check your logs before submission to ensure sensitive information is redacted.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Documentation
description: Update or add documentation
title: "[DOCS]: "
labels: ["Type: Documentation", "Status: Triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill this out!
- type: textarea
id: describe-need
attributes:
label: Describe the need
description: What do you wish was different about our docs?
placeholder: Describe the need for documentation updates here.
validations:
required: true
- type: input
id: sdk_version
attributes:
label: SDK Version
description: Do these docs apply to a specific SDK version?
placeholder: Octokit.NET v4.0.1
validations:
required: false
- type: input
id: api_version
attributes:
label: API Version
description: Do these docs apply to a specific version of the GitHub REST API or GraphQL API?
placeholder: ex. v1.1.1
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Please check your logs before submission to ensure sensitive information is redacted.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Feature
description: Suggest an idea for a new feature or enhancement
title: "[FEAT]: "
labels: ["Type: Feature", "Status: Triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill this out!
- type: textarea
id: describe-need
attributes:
label: Describe the need
description: What do you want to happen? What problem are you trying to solve?
placeholder: Describe the need for the feature.
validations:
required: true
- type: input
id: sdk_version
attributes:
label: SDK Version
description: Does this feature suggestion apply to a specific SDK version?
placeholder: Octokit.rb v6.0.0
validations:
required: false
- type: input
id: api_version
attributes:
label: API Version
description: Does this feature suggestion apply to a specific version of the GitHub REST API or GraphQL API?
placeholder: ex. v1.1.1
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Please check your logs before submission to ensure sensitive information is redacted.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Maintenance
description: Dependencies, cleanup, refactoring, reworking of code
title: "[MAINT]: "
labels: ["Type: Maintenance", "Status: Triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill this out!
- type: textarea
id: describe-need
attributes:
label: Describe the need
description: What do you want to happen?
placeholder: Describe the maintenance need here.
validations:
required: true
- type: input
id: sdk_version
attributes:
label: SDK Version
description: Does this maintenance apply to a specific SDK version?
placeholder: terraform-provider-github v5.7.0
validations:
required: false
- type: input
id: api_version
attributes:
label: API Version
description: Does this maintenance apply to a specific version of the GitHub REST API or GraphQL API?
placeholder: ex. v1.1.1
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
Please check your logs before submission to ensure sensitive information is redacted.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
61 changes: 61 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- Please refer to our contributing docs for any questions on submitting a pull request -->


<!-- Issues are required for both bug fixes and features. -->
Resolves #ISSUE_NUMBER

----

## Behavior

### Before the change?
<!-- Please describe the current behavior that you are modifying. -->

*

### After the change?
<!-- Please describe the behavior or changes that are being added by this PR. -->

*


### Other information
<!-- Any other information that is important to this PR -->

*

----

## Additional info

### Pull request checklist
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
- [ ] Added the appropriate label for the given change

### Does this introduce a breaking change?
<!-- If this introduces a breaking change make sure to note it here any what the impact might be -->

Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/main/community/breaking_changes.md) to help!

- [ ] Yes (Please add the `Type: Breaking change` label)
- [ ] No

If `Yes`, what's the impact:

* N/A


### Pull request type

<!-- Please do not submit updates to dependencies unless it fixes an issue. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->

Please add the corresponding label for change this PR introduces:
- Bugfix: `Type: Bug`
- Feature/model/API additions: `Type: Feature`
- Updates to docs or samples: `Type: Documentation`
- Dependencies/code cleanup: `Type: Maintenance`

----

20 changes: 20 additions & 0 deletions .github/workflows/add_to_octokit_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Add PRs and issues to Octokit org project

on:
issues:
types: [reopened, opened]
pull_request_target:
types: [reopened, opened]

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/add-to-project@v0.4.0
with:
project-url: https://github.com/orgs/octokit/projects/10
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
labeled: "Status: Stale"
label-operator: NOT
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: Release
"on":
push:
branches:
- master
- main
- next
- beta
- "*.x"
@@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: Test
"on":
push:
branches:
- master
- main
pull_request:
types:
- opened
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -205,9 +205,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
const auth = createTokenAuth(TOKEN);
const authentication = await auth();

const response = await request("HEAD /", {
headers: authentication.headers,
});
const response = await request("HEAD /");
const scopes = response.headers["x-oauth-scopes"].split(/,\s+/);

if (scopes.length) {
@@ -227,9 +225,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
const auth = createTokenAuth(TOKEN);
const authentication = await auth();

const response = await request("HEAD /", {
headers: authentication.headers,
});
const response = await request("HEAD /");
const clientId = response.headers["x-oauth-client-id"];

if (clientId) {
@@ -252,12 +248,11 @@ const auth = createTokenAuth(TOKEN);
const authentication = await auth();

const response = await request("GET /repos/{owner}/{repo}", {
owner: 'octocat',
repo: 'hello-world'
headers: authentication.headers
owner: "octocat",
repo: "hello-world",
});

console.log(response.data.permissions)
console.log(response.data.permissions);
// {
// admin: true,
// push: true,
Loading