Skip to content

Commit bcffd89

Browse files
committed
Merge branch 'master' into devMaster17Sep
2 parents 07da915 + 2f9aff9 commit bcffd89

File tree

32 files changed

+558
-58
lines changed

32 files changed

+558
-58
lines changed

.circleci/config.yml

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ jobs:
238238
jsdocs-deploy:
239239
docker:
240240
- image: node:8.10.0
241+
working_directory: /home/circleci/build
241242
steps:
242243
- checkout
243244
- attach_workspace:
@@ -286,19 +287,53 @@ jobs:
286287
# Extract tag from CIRCLE_TAG environment variable
287288
TAG=${CIRCLE_TAG}
288289
289-
# Create the release using GitHub API
290-
RESPONSE=$(curl -s -X POST \
291-
-H "Authorization: token $GITHUB_TOKEN" \
292-
-H "Content-Type: application/json" \
293-
-d '{
294-
"tag_name": "'"$TAG"'",
295-
"name": "'"$TAG"'",
296-
"body": "Release notes for version '"$TAG"'"
297-
}' \
298-
"https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases")
290+
# Maximum number of retries
291+
MAX_RETRIES=3
292+
293+
# Function to create the release using GitHub API
294+
create_release() {
295+
local response
296+
response=$(curl -s -X POST \
297+
-H "Authorization: token $GITHUB_TOKEN" \
298+
-H "Content-Type: application/json" \
299+
-d '{
300+
"tag_name": "'"$TAG"'",
301+
"name": "'"$TAG"'",
302+
"body": "Release notes for version '"$TAG"'"
303+
}' \
304+
"https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases")
305+
306+
echo "$response"
307+
}
308+
309+
# Function to extract upload URL from GitHub API response
310+
extract_upload_url() {
311+
local response="$1"
312+
echo "$response" | jq -r '.upload_url' | sed -e 's/{.*}//'
313+
}
314+
315+
# Create the release with retries
316+
for ((retry_count=1; retry_count<=MAX_RETRIES; retry_count++)); do
317+
echo "Attempt $retry_count to create the release..."
318+
319+
RESPONSE=$(create_release)
320+
echo "RESPONSE: $RESPONSE"
321+
UPLOAD_URL=$(extract_upload_url "$RESPONSE")
322+
echo "UPLOAD_URL: $UPLOAD_URL"
323+
324+
# Check if UPLOAD_URL is not null or empty
325+
if [ -n "$UPLOAD_URL" ] && [ "$UPLOAD_URL" != "null" ]; then
326+
echo "Release successfully created."
327+
break # Successful response, exit the loop
328+
elif [ "$retry_count" -lt "$MAX_RETRIES" ]; then
329+
echo "Failed to create release. Retrying..."
330+
sleep 3 # Add a delay before the next attempt
331+
else
332+
echo "Error: Unable to create release after $MAX_RETRIES attempts."
333+
exit 1
334+
fi
335+
done
299336
300-
# Get the upload URL from the response
301-
UPLOAD_URL=$(echo "$RESPONSE" | jq -r '.upload_url' | sed -e 's/{.*}//')
302337
303338
# Upload release artifacts
304339
for ARTIFACT in ./all/target/*.zip; do
@@ -319,28 +354,38 @@ jobs:
319354
- run:
320355
name: Update VERSIONS.md and README.md with the new released version
321356
command: |
357+
# Echo Git version
358+
echo "Git Version: $(git --version)"
359+
360+
# Echo Circle CI tag
322361
echo "CIRCLE_TAG: $CIRCLE_TAG"
323-
RELEASE_BRANCH=$(git branch --contains ${CIRCLE_TAG} | awk 'FNR==2 {print $1}')
362+
# Hardcoding the branch on master, since finding branch name with tag does not return correct output
363+
RELEASE_BRANCH="master"
324364
325365
# Debugging output
326366
echo "RELEASE_BRANCH: $RELEASE_BRANCH"
327367
328368
# Checkout branch
329369
git checkout $RELEASE_BRANCH
330370
371+
# Fetch all branches and tags from the remote repository
372+
git fetch --tags
373+
331374
# Retrieve the branch name
332375
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
333376
334377
# Debugging output
335378
echo "BRANCH_NAME: $BRANCH_NAME"
336379
337-
# Find the last two tags on the branch
338-
LAST_TWO_TAGS=$(git tag -l --sort=-v:refname "core-forms-components-reactor-*" | head -n 2)
380+
# Find the last tag on the branch, ignoring the private release
381+
LAST_TAG=$(git tag -l --sort=-v:refname "core-forms-components-reactor-*" | grep -v -- '-[[:alnum:]]*$' | awk -v tag="$CIRCLE_TAG" '$0 < tag' | head -n 1)
382+
339383
# Debugging output
340-
echo "LAST_TWO_TAGS: $LAST_TWO_TAGS"
384+
# echo "LAST_TWO_TAGS: $LAST_TWO_TAGS"
341385
342386
# Extract the last released from the output
343-
LAST_TAG=$(echo "$LAST_TWO_TAGS" | tail -n 1)
387+
# LAST_TAG=$(echo "$LAST_TWO_TAGS" | tail -n 1)
388+
344389
# Debugging output
345390
echo "LAST_TAG: $LAST_TAG"
346391
@@ -364,13 +409,13 @@ jobs:
364409
# Debugging output
365410
echo "WCM_CORE_COMPONENTS_VERSION: $WCM_CORE_COMPONENTS_VERSION"
366411
367-
echo "Before sed: $(cat VERSIONS.md)"
412+
# echo "Before sed: $(cat VERSIONS.md)"
368413
# update versions.md
369414
sed -i "/$LAST_VERSION/ { p; b; }; 1,/$LAST_VERSION/ { p; d; }" VERSIONS.md
370415
sed -i -E "0,/(\| $LAST_VERSION\s*\|) [0-9]+\.[0-9]+\.[0-9]+\s*\|/s//| $NEW_VERSION \| $WCM_CORE_COMPONENTS_VERSION |/" VERSIONS.md
371416
echo "After sed: $(cat VERSIONS.md)"
372417
373-
echo "Before sed: $(cat README.md)"
418+
# echo "Before sed: $(cat README.md)"
374419
# update readme.md
375420
sed -i -E "s/(\| $LAST_VERSION\s*\|) [0-9]+\.[0-9]+\.[0-9]+ \s*\| /| $NEW_VERSION | $WCM_CORE_COMPONENTS_VERSION | /g" README.md
376421
echo "After sed: $(cat README.md)"

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ about: Having an issue? Please create a report to explain what it is about.
1414

1515
#### Platform and Version
1616

17+
#### AEM Version (mention the exact version in case of cloud SDK)
18+
19+
#### AEM Forms Version
20+
1721
#### Sample Code that illustrates the problem
1822

19-
#### Logs taken while reproducing problem
23+
#### Logs taken while reproducing problem

.github/workflows/sync-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
git config --global user.name "ci-build"
2121
2222
- name: Sync with Base Branch
23+
if: ${{ github.event.pull_request.base.ref != 'master' }}
2324
run: |
2425
git fetch origin
2526
git checkout ${{ github.event.pull_request.base.ref }}

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Adobe Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing
2+
3+
Thank you for choosing to contribute to the Adobe Experience Manager Forms Core Components project, we really appreciate your time and effort! 😃🎊
4+
5+
The following are a set of guidelines for contributing to the project.
6+
7+
#### Contents
8+
9+
* [Code of Conduct](#code-of-conduct)
10+
* [Ways to Contribute](#ways-to-contribute)
11+
* [Reporting and Fixing Bugs](#reporting-and-fixing-bugs-) 🐛
12+
* [Reviewing Code](#reviewing-code-) 👀
13+
* [Documenting](#documenting-) 📜
14+
* [Questions and Enhancement Requests](#questions-and-enhancement-requests-) 💭
15+
* [Contributing Code](#contributing-code-)
16+
* [Issue Report Guidelines](#issue-report-guidelines)
17+
* [Contributor License Agreement](#contributor-license-agreement)
18+
19+
## Code of Conduct
20+
21+
This project adheres to the Adobe [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the team.
22+
23+
## Ways to Contribute
24+
25+
There are many forms of contributions. New components or features, changes to existing features, tests, documentation, bug fixes, or just good suggestions. For any contribution to be considered, a related [issue](#issue-report-guidelines) is always required.
26+
27+
The Core Component Engineering Team reviews all issues and contributions submitted by the community. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks time, the issue will be closed.
28+
29+
Once a contribution is being reviewed, the Core Engineering Team will apply a relevant label to the associated issue. You can see our [label list on GitHub](https://github.com/adobe/aem-core-forms-components/labels) to better understand what each label means.
30+
31+
### Reporting and Fixing Bugs 🐛
32+
33+
#### Before Reporting a Bug
34+
* Have a quick search through the currently open [bug reports](https://github.com/adobe/aem-core-forms-components/labels/bug) to see if the issue has already been reported.
35+
* Ensure that the issue is repeatable and that the actual behavior versus the expected results can be easily described.
36+
* Check that the issue you are experiencing is related to the Core Components project. It may be that the problem derives from AEM itself, typically editor code, rather than the Core Components. If you're not sure, then feel free to report the issue anyway and the committers will clarify for you. Issues in the product can be reported via [Adobe Enterprise Support](https://helpx.adobe.com/contact/enterprise-support.ec.html).
37+
38+
#### Filing a Bug
39+
1. Visit our [issue tracker on GitHub](https://github.com/adobe/aem-core-forms-components/issues).
40+
1. File a `New Issue` as a `Bug Report`.
41+
1. Ensure your issue follows the [issue report guidelines](#issue-report-guidelines).
42+
1. Thanks for the report! The committers will get back to you in a timely manner, typically within one week.
43+
44+
#### Fixing a Bug
45+
If you have a fix ready for a bug, submit a [pull request](#contributing-code-) and reference it in the associated issue.
46+
47+
48+
### Reviewing Code 👀
49+
50+
Reviewing others' code contributions is another great way to contribute - more eyes on the code help to improve its overall quality. To review a pull request, check the [open pull requests](https://github.com/adobe/aem-core-forms-components/pulls) for anything you can comment on.
51+
52+
### Documenting 📜
53+
54+
We very much welcome issue reports or pull requests that improve our documentation pages. While the best effort is made to keep them error free, useful and up-to-date there are always things that could be improved. The component documentation pages (for example the [TextInput Component Documentation](https://github.com/adobe/aem-core-forms-components/tree/master/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/textinput/v1/textinput)), this contributing guide or our [GitHub Wiki](https://github.com/adobe/aem-core-forms-components/wiki) pages are good places to start.
55+
56+
### Questions and Enhancement Requests
57+
58+
You can also add your voice to discussions around new and existing component features by commenting on an RTC. New components and features that openly invite public comment are marked by an [RTC](https://github.com/adobe/aem-core-forms-components/labels/rtc) (Request to Comment) label.
59+
60+
## Contributing Code 👾
61+
High quality code is important to the project, and to keep it that way, all code submissions are reviewed by committers before being accepted. Close adherence to the guidelines below can help speed up the review process and increase the likelihood of the submission being accepted.
62+
63+
### Before Contributing
64+
* Consider [joining developer discussions](#joining-developer-discussions-) to get feedback on what you are thinking of contributing. It's better to get this early feedback before going ahead and potentially having to rewrite everything later.
65+
* Create a [bug report](#reporting-bugs-) or [feature request](#requesting-features-) issue summarizing the problem that you will be solving. This will again help with early feedback and tracking.
66+
* Have a look at our [component checklist](Guidelines.md), for an idea of what certifies a production-ready component.
67+
* Ensure you have [signed the Adobe Contributor License Agreement](http://opensource.adobe.com/cla.html). If you are an Adobe employee, you do not have to sign the CLA.
68+
69+
### Contributing
70+
71+
The project accepts contributions primarily using GitHub pull requests. This process:
72+
* Helps to maintain project quality
73+
* Engages the community in working towards commonly accepted solutions with peer review
74+
* Leads to a more meaningful and cleaner git history
75+
* Ensures sustainable code management
76+
77+
Creating a pull request involves creating a fork of the project in your personal space, adding your new code in a branch and triggering a pull request. Check the GitHub [Using Pull Requests](https://help.github.com/articles/using-pull-requests) article on how to perform pull requests.
78+
79+
Please base your pull request on the `main` branch and make sure to check you have incorporated or merged the latest changes!
80+
81+
The title of the pull request typically matches that of the issue it fixes, see the [issue report guidelines](#issue-report-guidelines).
82+
Have a look at our [pull request template](.github/pull_request_template.md) to see what is expected to be included in the pull request description. The same template is available when the pull request is triggered.
83+
84+
### Your first contribution
85+
Would you like to contribute to the project but don't have an issue in mind? Or are you still fairly unfamiliar with the code? Then have a look at our [good first issues](https://github.com/adobe/aem-core-forms-components/labels/good%20first%20issue), they are fairly simple starter issues that should only require a small amount of code and simple testing.
86+
87+
## Issue Report Guidelines
88+
89+
A well defined issue report will help in quickly understanding and replicating the problem faced, or the feature requested. Below are some guidelines on what to include when reporting an issue. You can also see [this community reported issue](https://github.com/adobe/aem-core-wcm-components/issues/247) for an example of a well written issue report.
90+
91+
##### Title
92+
93+
* **Descriptive** - Should be specific, well described and readable at a glance.
94+
* **Concise** - If the issue can't be easily described in a short title, then it is likely unfocused.
95+
* **Keyword-rich** - Including keywords can help with quickly finding the issue in the backlog. Component related issues can be prefixed with a bracketed label with the component name, for example `[Image]` for the image component.
96+
97+
Bad title: `Search component has security problems`
98+
Good title: `[Search] Fulltext search of pages might lead to DDOS`
99+
100+
##### Description
101+
See our [bug report template](.github/ISSUE_TEMPLATE/BUG_REPORT.md) or [feature request template](.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md) for details on what is expected to be described. The same information is available when creating a new issue on GitHub.
102+
103+
## Contributor License Agreement
104+
105+
By contributing your code to the Adobe Marketing Cloud Github Organisation you grant Adobe a non-exclusive, irrevocable, worldwide, royalty-free, sublicensable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the Apache License, Version 2.0; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
106+
107+
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make the Contributions on behalf of that employer, or that Your employer has waived such rights for the Contributions.
108+
109+
You represent that the Contributions are Your original works of authorship, and to Your knowledge, no other person claims, or has the right to claim, any right in any invention or patent related to the Contributions. You also represent that You are not legally obligated, whether by entering into an agreement or otherwise, in any way that conflicts with the terms of this license.
110+
111+
YOU ARE NOT EXPECTED TO PROVIDE SUPPORT FOR YOUR SUBMISSION, UNLESS AND EXCEPT TO THE EXTENT YOU CHOOSE TO DO SO. UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS PROVIDED WITHOUT WARRANTY OF ANY KIND.

0 commit comments

Comments
 (0)