Skip to content

Commit 7da3389

Browse files
committed
Merge remote-tracking branch 'upstream/dev'
2 parents ffc0a27 + 0ba559a commit 7da3389

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

.github/workflows/monitorIssues.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Monitor Issues
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
operations-per-run:
6+
description: 'Number of operations per run'
7+
required: false
8+
default: '30'
9+
schedule:
10+
- cron: "0 0 * * *" # Runs once a day at midnight
11+
jobs:
12+
monitor-issues:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
16+
steps:
17+
- uses: actions/stale@v9
18+
with:
19+
# Ignore issues with these labels
20+
exempt-issue-labels: 'feature request,question'
21+
# Days of inactivity before marking an issue as stale
22+
days-before-issue-stale: 180
23+
# Days of inactivity before closing an issue
24+
days-before-issue-close: 7
25+
# Name of the stale label
26+
stale-issue-label: "stale"
27+
stale-issue-message: "This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days"
28+
close-issue-message: "This issue was closed due to 7 days of inactivity after being marked as stale. Feel free to reopen it if it remains relevant."
29+
# Ignore pull requests
30+
days-before-pr-close: false
31+
days-before-pr-stale: false
32+
ascending: true
33+
# Get from input or resolve to default
34+
operations-per-run: ${{ github.event.inputs.operations-per-run || '30' }}
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}

common/project/projectconfig.go

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const (
4444
Swift
4545
Docker
4646
Podman
47+
Twine
4748
)
4849

4950
type ConfigType string
@@ -71,6 +72,7 @@ var ProjectTypes = []string{
7172
"swift",
7273
"docker",
7374
"podman",
75+
"twine",
7476
}
7577

7678
func (projectType ProjectType) String() string {

general/token/oidctokenexchange.go

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package token
22

33
import (
4+
"encoding/json"
45
"fmt"
56
rtUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"
67
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
@@ -74,6 +75,11 @@ type OidcParams struct {
7475
Repository string
7576
}
7677

78+
type ExchangeCommandOutputStruct struct {
79+
AccessToken string `json:"AccessToken"`
80+
Username string `json:"Username"`
81+
}
82+
7783
func NewOidcTokenExchangeCommand() *OidcTokenExchangeCommand {
7884
return &OidcTokenExchangeCommand{response: new(auth.OidcTokenResponseData), OidcParams: &OidcParams{}}
7985
}
@@ -150,7 +156,16 @@ func (otc *OidcTokenExchangeCommand) SetProviderTypeAsString(providerType string
150156
}
151157

152158
func (otc *OidcTokenExchangeCommand) PrintResponseToConsole() {
153-
log.Output(fmt.Sprintf("{ AccessToken: %s Username: %s }", otc.response.AccessToken, otc.response.Username))
159+
response := ExchangeCommandOutputStruct{
160+
AccessToken: otc.response.AccessToken,
161+
Username: otc.response.Username,
162+
}
163+
jsonOutput, err := json.Marshal(response)
164+
if err != nil {
165+
log.Error("Failed to marshal response to JSON:", err)
166+
return
167+
}
168+
log.Output(string(jsonOutput))
154169
}
155170

156171
func (otc *OidcTokenExchangeCommand) Run() (err error) {

0 commit comments

Comments
 (0)